fix(cli): empty non top-level stack does not get deleted#21624
fix(cli): empty non top-level stack does not get deleted#21624mergify[bot] merged 8 commits intoaws:mainfrom
Conversation
TheRealAmazonKendra
left a comment
There was a problem hiding this comment.
Please make sure that your PR title confirms to the conventional commit standard (fix, feat, chore) and that it is written in a style that will reflect correctly in the change log (See Contributing Guide, Pull Requests). Your PR body should describe the problem the PR is solving, and the design approach and alternatives considered. Explain why the PR solves the problem. A link to an issue is helpful, but does not replace an explanation of your thought process.
Additionally, we cannot provide a meaningful review for PRs without any testing. Please add tests for this change. If this is not a change that automated tests can be written for, please explain how this change has been manually tested.
Pull request has been modified.
|
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). |
|
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 |
Fixed selector pattern for the empty stack which must be deleted during the deployment. I set stack selector pattern as
stack.hierarchicalIdbecause hierarchicalId is used inselectMatchingStacksmethod which is called when destroy logic is looking for the stack to be deleted.aws-cdk/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts
Line 138 in 92d6d58
There is also existing integration test which covers destroy logic and it works now without additional modifications:
aws-cdk/packages/aws-cdk/test/integ/cli/cli.integtest.ts
Line 685 in 92d6d58
How I tested it locally?
yarn packageand installed withnpm install -g dist/js/aws-cdk-0.0.0.tgzcloses #20822
All Submissions:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license