-
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
[CLI] Intermittent ChangeSetNotFound: ChangeSet [CDK-xxx] does not exist #6674
Comments
I think a verbose log would help here in case you are able to provide one. @shivlaks I think we need to somehow always dump a verbose log to a file so users can upload it in case of intermittent issues like this. |
I agree, it's quite difficult to repro some of these issues... I'm going to pick that task up this week |
This has just happened to me. Ran the build in our CI system which failed. Ran it again, this time with The above was a cold deploy too - no existing stack to update. |
@shivlaks I'm encountering this in deploys multiple times per day and was able to compare verbose logs in successful and failing runs to learn a bit more detail. A few notes:
|
I am having this issue under similar but slightly different circumstances. It occurs when a stack fails once and is rolled back. When I next call cdk deploy, I receive an "Stack [mystack] does not exist" error. Calling cdk deploy a second time then succeeds, with no intervention. |
@rbright I'll run through those steps. Were any previous deploys attempted with the @cbp123 I'm going to try a minimal repro to cause that scenario. Does this mean the stack is in a |
@shivlaks No, none of the stack deploys pass the |
@rbright - I think I've gotten to the bottom of the bug. It seems to be in how we set the per CloudFormation documentation
We're trying to Stacks only end up in One thing I'm unsure about is how you're ending up with a stack in In the meantime, I'll put out a fix for setting the appropriate |
@shivlaks Excellent, thanks for digging into this further! I looked at the history of verbose logs for a branch that encountered this issue, and I see what's happening. For context, stacks in this setup exist in multiple npm packages and are deployed in parallel with Lerna. In the first failing build, Stack A fails for some legitimate reason - cyclical reference, access restriction, etc. However, Stack B is also deploying in parallel. The last message printed for Stack B before the process bails:
Some time after the process exits, the changeset will complete creation and land in a |
Stacks only end up in `REVIEW_IN_PROGRESS` state when they have never been deployed. It exists, but has never been deployed, and therefore has no resources or a template. Users can end up in this state if a changeset takes too long to deploy or if the `--no-execute` flag is used the first time a stack is deployed. Root cause: We're trying to `update` a stack that was never deployed. CloudFormation considers a stack ID with no template or resources to be a stack that does not exist. When we try to set the `ChangeSetType` to `UPDATE`, it results in a `ValidationException` Fix: When a stack is in `REVIEW_IN_PROGRESS` state, ensure we set the `ChangeSetType` to `CREATE` Closes #6674
#7731) Stacks only end up in `REVIEW_IN_PROGRESS` state when they have never been deployed by executing a changeset. It exists, but has no resources or a template. Users can end up in this state if a changeset takes too long to deploy or if the `--no-execute` flag is used the first time a stack is deployed. There are likely other scenarios. If a `cdk deploy` bails and a changeset finishes creation but does not get executed, a stack will have `REVIEW_IN_PROGRESS` as its status Root cause: We're trying to `update` a stack that was never deployed. CloudFormation considers a stack ID with no template or resources to be a stack that does not exist. When we try to set the `ChangeSetType` to `UPDATE`, it results in a `ValidationException` from CloudFormation Fix: When a stack is in `REVIEW_IN_PROGRESS` state, ensure we set the `ChangeSetType` to `CREATE` Closes #6674
Got below exception when deploying a stack
Reproduction Steps
failed: ChangeSetNotFound: ChangeSet [CDK-xxx] does not exist
Error Log
The issue is an intermittent issue, really hard to reproduce it. However I also met this issue few times in past month.
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: