-
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
feat(cli): warn of non-existent stacks in cdk destroy
#32636
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #32636 +/- ##
===========================================
+ Coverage 66.96% 81.52% +14.55%
===========================================
Files 329 222 -107
Lines 18667 13715 -4952
Branches 3260 2417 -843
===========================================
- Hits 12501 11181 -1320
+ Misses 5839 2254 -3585
+ Partials 327 280 -47
Flags with carried forward coverage won't be shown. Click here to find out more.
|
cdk destroy
Exemption Request: The change was already approved in the last PR.
This PR just outputs warnings so I didn't change README.
No snapshot is needed because this PR is for CLI. And I'm waiting for cli-integ-tests to run. |
Thanks for your review! I have made all the suggested changes and added tests for the suggested stacks messages. I would love to see a review from you or the team. Happy Xmas! |
Thank you, fixed it! CI failed due to lack of Copyright changes in 2025, but incorporated it from main branch. |
➡️ PR build request submitted to A maintainer must now check the pipeline and add 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. |
Issue # (if applicable)
Closes #32545.
Fixes #27179.
Reason for this change
Once this PR was reverted by other cli-integ test regression.
cdk destroy
" #29577aws-cdk/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts
Line 190 in 07ce8ec
But the regression was apparently due to a cause unrelated to that PR. That has been corrected in this PR (see: https://github.com/aws/aws-cdk/blob/v2.173.1/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts#L286-L291).
Therefore, I submit the same PR again.
Description of changes
This PR for cli is to warn if stacks with wrong cases (=not exist) specified in
cdk destroy
.* It does not display the message
Are you sure you want to delete:
if there is no matching stack.* Even if the stack does not exist,
cdk destroy
will not fail, it will just print a warning.Actual Outputs:
Describe any new or updated permissions being added
<!— What new or updated IAM permissions are needed to support the changes being introduced ? -->
Nothing.
Description of how you validated changes
Both of unit tests and cli-integ tests.
The changes were already approved in the last PR.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license