-
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
base: main
Are you sure you want to change the base?
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 80.54% 80.83% +0.28%
==========================================
Files 106 106
Lines 6954 6975 +21
Branches 1287 1292 +5
==========================================
+ Hits 5601 5638 +37
+ Misses 1175 1158 -17
- Partials 178 179 +1
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. |
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.
See inline comments. We also need tests for the new suggested stacks messages.
Approved exemptions. |
PS @go-to-k I'll be off on xmas holidays, I've asked the team to do reviews. If there's no movement by the new year feel free to ping me on cdk.dev. 🎄 |
5d7e9e5
to
fd245af
Compare
change order for calling methods foreach to for suggestStacks args to object
fd245af
to
c55590a
Compare
The pull request linter fails with the following errors:
PRs must pass status checks before we can provide a meaningful review. If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing ✅ A exemption request has been requested. Please wait for a maintainer's review. |
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! |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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