-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat(CLI): synth displays "AssertDescription: CDK bootstrap stack version 6 required" #31092
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.
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.
This seems like not a great idea to me to obscure things from the template the we later deploy regardless. What other options where considered as a solution?
Feel free to dismiss my review if the has been discussed sufficiently in your team.
@mrgrain the team has not discussed this yet. I think this is the best path forward, and it's a precedent we've set by obscuring I see the following options:
I don't think the first two address the issue. For 1: People will likely run 3 addresses the issue by ensuring people only see the error message where they need to see it; if a deployment is failing because of it. If people want to see the full, un-altered diff, they can pass |
Hmm I've forget about metadata, my bad. That's a great argument for it. There were a few other ideas in the issue:
I also wonder if this check needs to be in the template or if it could be done by the cli. |
@mrgrain that's a good point. The reason this is a Rule in the template is that deployments are sometimes initiated from pipelines, without the CDK CLI; this is documented here: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/core/lib/stack-synthesizers/stack-synthesizer.ts#L309 |
Cool! This is probably true, but if you are curious let's dig deeper. How are pipelines deploying stacks? What do they need the Bootstrap stack for? My guess here is that it's the Either way, this is not a blocker. |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
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.
Approving with 1 nit.
We should update the cli option description here:
aws-cdk/packages/aws-cdk/lib/cli.ts
Line 263 in 9acd528
.option('strict', { type: 'boolean', desc: 'Do not filter out AWS::CDK::Metadata resources or mangled non-ASCII characters', default: false }) |
// see https://github.com/aws/aws-cdk/issues/17942 | ||
if (template.Rules.CheckBootstrapVersion) { | ||
if (Object.keys(template.Rules).length > 1) { | ||
delete template.Rules.CheckBootstrapVersion; |
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.
I thought you had mentioned that the rules would only be deleted if the check bootstrap version was the only rules. Did I misinterpret that, or did we switch to always removing the bootstrap version check?
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 intention is to always remove the Rule, but to remove the entire Rules section if that is the only rule.
➡️ PR build request submitted to A maintainer must now check the pipeline and add the |
@mrgrain I am curious but I'm not able to dig deeper into this right now. |
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.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
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). |
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). |
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #17942.
Reason for this change
The CDK CLI shows the stack template, which includes the CFN Rule
CheckBootstrapVersion
. This rule will fail a deployment if the bootstrap is not right. Customers think this rule is an error message.Description of changes
Obscure this
CheckBootstrapVersion
Rule from the template when we print it, if it exists. If it is the only Rule, remove theRules
section entirely.Description of how you validated changes
Manual testing, unit tests, and CLI integration tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license