Skip to content

fix(cli): show DELETE_FAILED events as skipped during stack updates#1564

Merged
aws-cdk-automation merged 2 commits into
mainfrom
otaviom/improve-delete-failed-progress
May 29, 2026
Merged

fix(cli): show DELETE_FAILED events as skipped during stack updates#1564
aws-cdk-automation merged 2 commits into
mainfrom
otaviom/improve-delete-failed-progress

Conversation

@otaviomacedo
Copy link
Copy Markdown
Contributor

@otaviomacedo otaviomacedo commented May 28, 2026

Summary

  • During a stack update, DELETE_FAILED events are now displayed in yellow with a "(skipped)" label instead of alarming red, since CloudFormation will eventually skip these and complete the update anyway.
  • Stack traces and error reasons are suppressed for these skipped failures. Instead, a "(this will take a few minutes to recover)" note is shown at the end of the row.
  • At the end of the deployment, a warning is printed telling the user that skipped resources may still exist and could incur charges.
  • Fixed a pre-existing bug where per-deployment state (failures, rollback status, in-progress resources) was not reset between consecutive stack deployments in the same session, causing status messages and warnings from one stack to bleed into the next.
  • During stack creation, the original behavior (red, full error details, stack traces) is preserved unchanged.

Motivation

When CloudFormation updates a stack and encounters a DELETE_FAILED on a resource being replaced, it will retry and ultimately succeed (or the overall update will fail for a different reason). Showing these transient states in red with full stack traces gives users the false impression that their deployment has failed, when in reality it's still in progress.

Screenshots

While deployment is in progress

update-in-progress

After deployment completes

update-complete

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

## Summary

- During a stack update, `DELETE_FAILED` events are now displayed in gray/dim with a "(provisional)"
  label instead of alarming red, since CloudFormation will eventually skip these and complete the
  update anyway.
- Stack traces and error reasons are suppressed for these provisional failures, and they are
  excluded from the "Failed resources" recap at the end of deployment.
- During stack creation, the original behavior (red, full error details, stack traces) is preserved
  unchanged.

## Motivation

When CloudFormation updates a stack and encounters a `DELETE_FAILED` on a resource being replaced,
it will retry and ultimately succeed (or the overall update will fail for a different reason).
Showing these transient states in red with full stack traces gives users the false impression that
their deployment has failed, when in reality it's still in
progress.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@aws-cdk-automation aws-cdk-automation requested a review from a team May 28, 2026 14:20
@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue May 29, 2026
Merged via the queue into main with commit a1bcb7b May 29, 2026
54 of 56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants