Skip to content
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

No exception when stack with wrong cases is deployed #27179

Closed
fulcus opened this issue Sep 18, 2023 · 4 comments · Fixed by #27921 · May be fixed by NOUIY/aws-solutions-constructs#98, NOUIY/aws-solutions-constructs#99 or NOUIY/aws-solutions-constructs#101
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort p2 package/tools Related to AWS CDK Tools or CLI

Comments

@fulcus
Copy link

fulcus commented Sep 18, 2023

Describe the bug

When invalid stack name is given to cdk destroy, it does not give an error, but does nothing.

Expected Behavior

Should give an error: "Stack does not exist"

Current Behavior

Nothing happens

Reproduction Steps

Stack "IAMStack" exists, but not "iamstack".

> cdk destroy iamstack
Are you sure you want to delete:  (y/n)? y

Also notice that it skips the stack name after the word "delete", as it is invalid.

Possible Solution

Just a check if the stack exists, if not throw error.

Additional Information/Context

No response

CDK CLI Version

2.89.0 (build 2ad6683)

Framework Version

No response

Node.js Version

20

OS

Mac M1 13.5.2 (22G91)

Language

Typescript

Language Version

No response

Other information

I'm willing to fix the issue if core team approves :)

@fulcus fulcus added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 18, 2023
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Sep 18, 2023
@fulcus fulcus changed the title (module name): (short issue description) No exception when stack with wrong cases is deployed Sep 18, 2023
@peterwoodworth peterwoodworth added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Sep 18, 2023
@peterwoodworth
Copy link
Contributor

If you know how to fix it then go for it. Inputting the name of a stack in your account + region doesn't work if it's not in your CDK app, so there would be no downsides i'm aware of for implementing this

@go-to-k
Copy link
Contributor

go-to-k commented Sep 26, 2023

@fulcus

Sorry, i missed Other information in the description (I'm willing to fix the issue if core team approves :)), I put out a PR...

So I will drop my PR if you would submit PR. Until then, I'll keep my PR in draft for now.

@fulcus
Copy link
Author

fulcus commented Sep 26, 2023

I didn't have time to work on it. Please go ahead with your PR and thanks for the consideration.

@mergify mergify bot closed this as completed in #27921 Mar 18, 2024
mergify bot pushed a commit that referenced this issue Mar 18, 2024
This PR for cli is to warn if stacks with wrong cases (=not exist) specified in `cdk destroy`.

Closes #27179.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

ahammond pushed a commit to ahammond/aws-cdk that referenced this issue Mar 26, 2024
This PR for cli is to warn if stacks with wrong cases (=not exist) specified in `cdk destroy`.

Closes aws#27179.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment