-
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
fix(toolkit): endless wait if CDKToolkit stack is REVIEW_IN_PROGRESS
#23230
Conversation
If a `cdk bootstrap` operation is interrupted after the ChangeSet has been created, but before it is executed, the CDKToolkit stack will be left in the `REVIEW_IN_PROGRESS` state, which is a stable state until something or someone either executes or deletes the pending ChangeSet. This resulted in an endless (and silent, unless `cdk bootstrap` is executed in verbose mode) wait, as this was considered an "in progress" (aka unstable) state. This changes `REVIEW_IN_PROGRESS` to be treated as stable, while still debug-logging an indication that we are "ignoring" the existing ChangeSet.
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.
@@ -371,6 +371,14 @@ export async function stabilizeStack(cfn: CloudFormation, stackName: string) { | |||
if (status.isInProgress) { | |||
debug('Stack %s has an ongoing operation in progress and is not stable (%s)', stackName, status); | |||
return undefined; | |||
} else if (status.isReviewInProgress) { | |||
// This may happen if a stack creation operation is interrupted before the ChangeSet execution starts. Recovering | |||
// from this would requiring manual intervention (deleting or executing the pending ChangeSet), abd failing to do |
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.
nit: and
// so will result in an endless wait here (the ChangeSet wont delete or execute itself). Instead of blocking | ||
// "forever" we proceed as if the stack was existing and stable. If there is a concurrent operation that just | ||
// hasn't finished proceeding just yet, either this operation or the concurrent one may fail due to the other one | ||
// having made progress. Which is file. I guess. |
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.
nit: fine
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.
Added suggestions for comment typos. G2G either way.
Added a hold label so that you can choose to accept the typo fixes or not. |
Co-authored-by: Ryan Parker <me@ryanparker.dev>
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). |
aws#23230) If a `cdk bootstrap` operation is interrupted after the ChangeSet has been created, but before it is executed, the CDKToolkit stack will be left in the `REVIEW_IN_PROGRESS` state, which is a stable state until something or someone either executes or deletes the pending ChangeSet. This resulted in an endless (and silent, unless `cdk bootstrap` is executed in verbose mode) wait, as this was considered an "in progress" (aka unstable) state. This changes `REVIEW_IN_PROGRESS` to be treated as stable, while still debug-logging an indication that we are "ignoring" the existing ChangeSet.
aws#23230) If a `cdk bootstrap` operation is interrupted after the ChangeSet has been created, but before it is executed, the CDKToolkit stack will be left in the `REVIEW_IN_PROGRESS` state, which is a stable state until something or someone either executes or deletes the pending ChangeSet. This resulted in an endless (and silent, unless `cdk bootstrap` is executed in verbose mode) wait, as this was considered an "in progress" (aka unstable) state. This changes `REVIEW_IN_PROGRESS` to be treated as stable, while still debug-logging an indication that we are "ignoring" the existing ChangeSet.
aws#23230) If a `cdk bootstrap` operation is interrupted after the ChangeSet has been created, but before it is executed, the CDKToolkit stack will be left in the `REVIEW_IN_PROGRESS` state, which is a stable state until something or someone either executes or deletes the pending ChangeSet. This resulted in an endless (and silent, unless `cdk bootstrap` is executed in verbose mode) wait, as this was considered an "in progress" (aka unstable) state. This changes `REVIEW_IN_PROGRESS` to be treated as stable, while still debug-logging an indication that we are "ignoring" the existing ChangeSet.
If a
cdk bootstrap
operation is interrupted after the ChangeSet has been created, but before it is executed, the CDKToolkit stack will be left in theREVIEW_IN_PROGRESS
state, which is a stable state until something or someone either executes or deletes the pending ChangeSet.This resulted in an endless (and silent, unless
cdk bootstrap
is executed in verbose mode) wait, as this was considered an "in progress" (aka unstable) state. This changesREVIEW_IN_PROGRESS
to be treated as stable, while still debug-logging an indication that we are "ignoring" the existing ChangeSet.