-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(pipelines): generates warning since CDK 2.128.0 due to addition of v2 pipeline support in aws-codepipeline #29199
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
Exemption Request |
So i think I was wrong and they are required...but i could use some guidance perhaps 😅 |
So I did try to run the integration tests and i got to a point where some of them fail with InternalFailure as mentioned in this PR #28447 Here are the tests that failed: packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.js From what i read in the conversation on the PR I linked, my impression here is that if I want to get these to pass in the short term I will need to do the following:
before i go down this road I wanted to maybe get a confirmation that I'm on the right track 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes @gossandr that would be the correct way to update those tests. it may be quite time-intensive. I see that the snapshot diff is simply explicitly specifying pipeline v1. That is to be expected, and in this case I am happy to assume that CFN accepts the property happily since it is exactly as documented.
In this case, I am happy with you doing a shortcut:
run the integration tests with --update-on-failed --dry-run
. This will simply update the snapshots without deploying the integ test. Not great, but I don't think this is a high risk change to the snapshot.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Pull request has been modified.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…f v2 pipeline support in aws-codepipeline (#29199) ### Issue # (if applicable) Closes #29190 ### Reason for this change CDK v2.128.0 introduced a warning in aws-codepipeline to warn users of the implicit behavior now that v2 pipelines are supported in CDK. This warning can cause established pipelines to fail if they are using cdk synth --strict. The warning can be suppressed, but the better fix is to have this module supply the `PipelineType` added in CDK v128.0 and set it to `v1`. A future change would have to address adding v2 pipeline support to this module, this only resolves the introduced warning. ### Description of changes - added the optional (and new) `PipelineType` property in the creation of the codepipeline in https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts#L467-L480 - slightly modified the README where it mentions using aws-codepipeline to include specifically an mention of v2 as a reason to use aws-codepipeline (until of course v2 is added properly in this lib) ### Description of how you validated changes - reverted a change in 40ffe2b as I believe this previously caught the new warning and was changed to fix the test rather than looking into the new warning. This would catch the warning if `PipelineType` is not supplied ### Checklist - [ x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Issue # (if applicable)
Closes #29190
Reason for this change
CDK v2.128.0 introduced a warning in aws-codepipeline to warn users of the implicit behavior now that v2 pipelines are supported in CDK. This warning can cause established pipelines to fail if they are using cdk synth --strict. The warning can be suppressed, but the better fix is to have this module supply the
PipelineType
added in CDK v128.0 and set it tov1
. A future change would have to address adding v2 pipeline support to this module, this only resolves the introduced warning.Description of changes
PipelineType
property in the creation of the codepipeline in https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts#L467-L480Description of how you validated changes
PipelineType
is not suppliedChecklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license