-
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): re-bootstrapping loses previous configuration #10120
Conversation
Various properties of the bootstrapping stack you configured with switches on the command line would be lost again if you performed bootstrapping again. This includes: - Template parameters such as the `qualifier`, `public-access-block-configuration`, `trust`, `cloudformation-execution-roles`. - Stack attributes such as `termination-protection`, `tags`. ALSO IN THIS PR - In the CLI integ tests, only show the CLI output if the test fails. This reduces noise when trying to inspect the causes of a failed test. - Some light refactoring (but not too much) of the division of responsibilities between `BootstrapStack`, `ToolkitInfo` and `CloudFormationStack`. Fixes #10091.
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.
Looks good. One minor nit, one question/comment.
if (argTags === undefined) { return undefined; } | ||
if (argTags.length === 0) { return undefined; } | ||
const nonEmptyTags = argTags.filter(t => t !== ''); | ||
if (nonEmptyTags.length === 0) { return []; } |
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.
Is the input to this function just the input from the cli (cli.ts
), or could it also be from an existing stack? I'm trying to wrap my head around if passing the CLI tags through arrayFromYargs
would effectively de-dupe this logic.
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 know! I wanted to do that originally but the types of doing that don't really work out (string[]
vs Tag[]
that magically appears out of nowhere and is returned as an any
).
It doesn't sit well with me where this parsing is done, but I didn't want to change the existing code too much more because the diff was already growing too large for my tastes.
Co-authored-by: Nick Lynch <[email protected]>
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from master 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 |
Various properties of the bootstrapping stack you configured with
switches on the command line would be lost again if you performed
bootstrapping again. This includes:
qualifier
,public-access-block-configuration
,trust
,cloudformation-execution-roles
.termination-protection
,tags
.ALSO IN THIS PR
This reduces noise when trying to inspect the causes of a failed test.
responsibilities between
BootstrapStack
,ToolkitInfo
andCloudFormationStack
.Fixes #10091.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license