Skip to content

Commit

Permalink
CONFIGURATION_COMPLETE is an inprogress state.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Mar 12, 2024
1 parent 236d79a commit df1c7b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This is the changelog for [AWS Architect](readme.md).
* Support the new version of openapi-factory 5.4.
* Duplicate all .html files as cleaned files. `file.html` => `file` and `file/`, all three will work
* Fix validateTemplate so that it actually uses S3 when available.
* Add support for new status `CONFIGURATION_COMPLETE`

## 6.6 ##
* Add support to `deleteWebsiteVersion(version)`
Expand Down
5 changes: 3 additions & 2 deletions lib/CloudFormationDeployer.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class CloudFormationDeployer {
}
let stackStatus = data.Stacks[0].StackStatus;
let stackExistsDict = {
CONFIGURATION_COMPLETE: true,
CREATE_COMPLETE: true,
UPDATE_COMPLETE: true,
UPDATE_ROLLBACK_COMPLETE: true
Expand Down Expand Up @@ -141,7 +142,7 @@ class CloudFormationDeployer {
throw { title: 'Deployment to the stack failed.', status: stackStatus, code: stackStatus };
}

if (stackStatus.match(/PROGRESS$/i)) {
if (stackStatus.match(/PROGRESS$/i) || stackStatus === 'CONFIGURATION_COMPLETE') {
return iteratePromise();
}

Expand Down Expand Up @@ -377,7 +378,7 @@ class CloudFormationDeployer {

// If the stack already existed, and there are no new regions, all the stacks are updated then check to see if the template matches the new template
if (stackExists && !newRegions && existingStacks.every(s => s.Status === 'CURRENT')) {
const regionStacks = await this.cloudFormationClient.listStacks({ StackStatusFilter: ['CREATE_COMPLETE', 'UPDATE_COMPLETE', 'UPDATE_ROLLBACK_COMPLETE'] }).promise()
const regionStacks = await this.cloudFormationClient.listStacks({ StackStatusFilter: ['CONFIGURATION_COMPLETE', 'CREATE_COMPLETE', 'UPDATE_COMPLETE', 'UPDATE_ROLLBACK_COMPLETE'] }).promise()
.then(r => r.StackSummaries);

const thisRegionsStackId = existingStacks.find(s => s.Region === this.cloudFormationClient.config.region).StackId;
Expand Down

0 comments on commit df1c7b6

Please sign in to comment.