-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
CLI: give an error message and return 1 when trying to deploy a non-existent stack #15866
Labels
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
good first issue
Related to contributions. See CONTRIBUTING.md
p1
package/tools
Related to AWS CDK Tools or CLI
Comments
KTamas
added
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
labels
Aug 3, 2021
Sounds like a good idea! |
rix0rrr
added
effort/small
Small work item – less than a day of effort
p1
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Aug 10, 2021
kaizencc
added
bug
This issue is a bug.
and removed
feature-request
A feature should be added or improved.
labels
Aug 18, 2021
mergify bot
pushed a commit
that referenced
this issue
Aug 18, 2021
…n stack name (#16073) Currently, `cdk deploy` and `cdk diff` on stacks that do not exist return no output on the command line. This PR introduces a descriptive error message for those cases so it is easier to understand what happened. Leaving the idea of fuzzy matching for stack name suggestions to a (potential) future PR, I can open a new issue for that if this one goes through. For the linter, I'm not sure if anything of value can be added to the readme so I'm wondering if this would be a candidate for exemption. closes #15866 while adding the same idea to `diff` as well as `deploy`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
smguggen
pushed a commit
to smguggen/aws-cdk
that referenced
this issue
Aug 24, 2021
…n stack name (aws#16073) Currently, `cdk deploy` and `cdk diff` on stacks that do not exist return no output on the command line. This PR introduces a descriptive error message for those cases so it is easier to understand what happened. Leaving the idea of fuzzy matching for stack name suggestions to a (potential) future PR, I can open a new issue for that if this one goes through. For the linter, I'm not sure if anything of value can be added to the readme so I'm wondering if this would be a candidate for exemption. closes aws#15866 while adding the same idea to `diff` as well as `deploy`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd
pushed a commit
to hollanddd/aws-cdk
that referenced
this issue
Aug 26, 2021
…n stack name (aws#16073) Currently, `cdk deploy` and `cdk diff` on stacks that do not exist return no output on the command line. This PR introduces a descriptive error message for those cases so it is easier to understand what happened. Leaving the idea of fuzzy matching for stack name suggestions to a (potential) future PR, I can open a new issue for that if this one goes through. For the linter, I'm not sure if anything of value can be added to the readme so I'm wondering if this would be a candidate for exemption. closes aws#15866 while adding the same idea to `diff` as well as `deploy`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TikiTDO
pushed a commit
to TikiTDO/aws-cdk
that referenced
this issue
Sep 6, 2021
…n stack name (aws#16073) Currently, `cdk deploy` and `cdk diff` on stacks that do not exist return no output on the command line. This PR introduces a descriptive error message for those cases so it is easier to understand what happened. Leaving the idea of fuzzy matching for stack name suggestions to a (potential) future PR, I can open a new issue for that if this one goes through. For the linter, I'm not sure if anything of value can be added to the readme so I'm wondering if this would be a candidate for exemption. closes aws#15866 while adding the same idea to `diff` as well as `deploy`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
david-doyle-as24
pushed a commit
to david-doyle-as24/aws-cdk
that referenced
this issue
Sep 7, 2021
…n stack name (aws#16073) Currently, `cdk deploy` and `cdk diff` on stacks that do not exist return no output on the command line. This PR introduces a descriptive error message for those cases so it is easier to understand what happened. Leaving the idea of fuzzy matching for stack name suggestions to a (potential) future PR, I can open a new issue for that if this one goes through. For the linter, I'm not sure if anything of value can be added to the readme so I'm wondering if this would be a candidate for exemption. closes aws#15866 while adding the same idea to `diff` as well as `deploy`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
mergify bot
pushed a commit
that referenced
this issue
Sep 8, 2021
…n stack name (#16150) **second attempt as last PR failed integration tests** Currently, `cdk deploy` and `cdk diff` on stacks that do not exist return no output on the command line. This PR introduces a descriptive error message for those cases so it is easier to understand what happened. The behavior of the error is that **if** you specify a stack or stacks, the CLI expects to match at least one known stack. If the CLI cannot find a matching stack, the error is thrown. However, if you specify multiple stacks (i.e. `cdk deploy ThisStackExists ThisStackDoesnt`) and one of those stacks do not match, the CLI will silently ignore the request to deploy `ThisStackDoesnt` without throwing an error. closes #15866 while adding the same idea to `diff` as well as `deploy`. ---- *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
Labels
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
good first issue
Related to contributions. See CONTRIBUTING.md
p1
package/tools
Related to AWS CDK Tools or CLI
When trying to deploy a stack that does not exist (for example,
cdk deploy thisstackdoesnotexist
), the CDK simply gives no output, even the return code is 0. This is confusing, especially for people new to the CDK.Use Case
Use case is people not getting tripped up by this and scratching their heads, especially for people new to the CDK.
Proposed Solution
Exit with return code 1 and give some sort of error i.e.
Error: stack 'thisstackdoesnotexist' does not exist."
Could implement some sort of fuzzy matching for stack name suggestions, so it could also sayDid you mean [x]?
or something like that.This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: