Skip to content

fix: delete and recreate stack in ROLLBACK_COMPLETE state#191

Merged
kddejong merged 2 commits intoaws-actions:masterfrom
kddejong:fix/issue/107
Apr 1, 2026
Merged

fix: delete and recreate stack in ROLLBACK_COMPLETE state#191
kddejong merged 2 commits intoaws-actions:masterfrom
kddejong:fix/issue/107

Conversation

@kddejong
Copy link
Copy Markdown
Contributor

Problem

When a stack is in ROLLBACK_COMPLETE state (e.g., after a failed first deploy), it cannot be updated. The action would fail with an error, requiring manual intervention to delete the stack.

Solution

Detect ROLLBACK_COMPLETE state in deployStack, automatically delete the stuck stack, wait for deletion to complete, then recreate it via a new change set.

Adds a waitUntilStackDeleteComplete helper that handles all delete completion scenarios (DELETE_COMPLETE, stack disappears, ValidationError).

Testing

  • Stack in ROLLBACK_COMPLETE is deleted and recreated
  • Stack not in ROLLBACK_COMPLETE is left alone
  • Delete completes when stack disappears (empty response)
  • Delete completes via ValidationError (stack gone)
  • DELETE_FAILED throws appropriate error
  • Timeout waiting for deletion

Closes #107

…s#107)

When a stack is in ROLLBACK_COMPLETE state it cannot be updated. This
change detects that state, deletes the stack, and recreates it via a
new change set.

Closes aws-actions#107
@kddejong kddejong merged commit 84d33bd into aws-actions:master Apr 1, 2026
2 checks passed
@kddejong kddejong deleted the fix/issue/107 branch April 1, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stack is in ROLLBACK_COMPLETE state and can not be updated

1 participant