Skip to content

Commit

Permalink
Merge branch 'main' into userpool-advancedSecurityMode
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Dec 7, 2022
2 parents d8500e7 + 4e7fdae commit db1a392
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions packages/aws-cdk/lib/api/util/cloudformation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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), and failing to do
// 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 fine. I guess.
debug('Stack %s is in REVIEW_IN_PROGRESS state. Considering this is a stable status (%s)', stackName, status);
}

return stack;
Expand Down
6 changes: 5 additions & 1 deletion packages/aws-cdk/lib/api/util/cloudformation/stack-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ export class StackStatus {
}

get isInProgress(): boolean {
return this.name.endsWith('_IN_PROGRESS');
return this.name.endsWith('_IN_PROGRESS') && !this.isReviewInProgress;
}

get isReviewInProgress(): boolean {
return this.name === 'REVIEW_IN_PROGRESS';
}

get isNotFound(): boolean {
Expand Down
4 changes: 4 additions & 0 deletions scripts/bump-cfnspec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ cd ${pwd}/packages/@aws-cdk/cfnspec
yarn update
version=$(cat cfn.version)

# Running a full build saving awslint exclusion rules in case any of them fails
export AWSLINT_SAVE=true
yarn lerna run build --stream --include-dependencies

# Come back to root, add all files to git and commit
cd ${pwd}
git add .
Expand Down

0 comments on commit db1a392

Please sign in to comment.