-
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(cli): bootstrap respects qualifier from cdk.json #31410
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.
I've made the decision that the --qualifier parameter takes precedent over the cdk.json context if they are both set but I can see a reasonable argument for throwing an error too
@kaizencc That's usually how it's done. But to confirm, how do other flags work?
Also the issue expects cdk.json
to work. But you say you are fixing it for context.json
? Can you clarify please.
➡️ PR build request submitted to A maintainer must now check the pipeline and add the |
I mean |
The only other place in cli.ts where I see two ways of describing the same thing is here: case 'synth':
const quiet = configuration.settings.get(['quiet']) ?? args.quiet; and it is in fact defaulting to the opposite. But this line was written by a community contributor and it doesn't look like that decision was made with any intentionality (and in fact maybe was done to make testing easier). I think we should default to command line arguments before context values and would support switching the |
✅ 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. |
closes #28249.
The qualifier property can be set via the context key "@aws-cdk/core:bootstrapQualifier" and if omitted, the arbitrary default is
hnb659fds
. In the case ofcdk bootstrap
, there is an additional way to set the qualifier via the--qualifier
CLI option. Specific to thecdk bootstrap
logic, we currently only honor the command line argument, which is an error.Ultimately, the following
cdk bootstrap
calls should be identical:cdk bootstrap
with the followingcdk.json
file:cdk bootstrap --qualifier="abcde"
I've made the decision that the
--qualifier
parameter takes precedent over thecdk.json
context if they are both set.