feat(CLI): synth displays "AssertDescription: CDK bootstrap stack version 6 required"#31092
feat(CLI): synth displays "AssertDescription: CDK bootstrap stack version 6 required"#31092mergify[bot] merged 8 commits intomainfrom
Conversation
aws-cdk-automation
left a comment
There was a problem hiding this comment.
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.
|
@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.
scanlonp
left a comment
There was a problem hiding this comment.
Approving with 1 nit.
We should update the cli option description here:
aws-cdk/packages/aws-cdk/lib/cli.ts
Line 263 in 9acd528
| // 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.
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.
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. |
aws-cdk-automation
left a comment
There was a problem hiding this comment.
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
CheckBootstrapVersionRule from the template when we print it, if it exists. If it is the only Rule, remove theRulessection 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