Skip to content

Fix deploy hang with --verbose and disableRollback: true#151

Open
yaronya wants to merge 1 commit intooss-serverless:mainfrom
yaronya:fix/verbose-disable-rollback-hang
Open

Fix deploy hang with --verbose and disableRollback: true#151
yaronya wants to merge 1 commit intooss-serverless:mainfrom
yaronya:fix/verbose-disable-rollback-hang

Conversation

@yaronya
Copy link
Copy Markdown

@yaronya yaronya commented Apr 9, 2026

Summary

When deploying with both --verbose and disableRollback: true, the CLI hangs indefinitely after a CloudFormation resource fails. Without --verbose the failure is reported immediately.

The monitor loop in lib/plugins/aws/lib/monitor-stack.js waits for the stack to reach ROLLBACK_COMPLETE, DELETE_FAILED, or DELETE_COMPLETE before throwing — but with rollback disabled, the stack stops at UPDATE_FAILED or CREATE_FAILED, and none of those match the termination condition.

This was originally reported in serverless/serverless#12770.

Resolves #150

Changes

  • Add CREATE_FAILED and UPDATE_FAILED to the terminal status list in monitor-stack.js
  • Add two test cases covering --verbose with UPDATE_FAILED and CREATE_FAILED stack states

When both --verbose and disableRollback: true are set, the CLI hangs
indefinitely after a CloudFormation resource failure. The monitor loop
waits for ROLLBACK_COMPLETE, DELETE_FAILED, or DELETE_COMPLETE, but
with rollback disabled the stack stays in UPDATE_FAILED or
CREATE_FAILED — none of which matched the termination condition.

Add CREATE_FAILED and UPDATE_FAILED to the status check so the CLI
exits on failure regardless of whether rollback is enabled.

Resolves oss-serverless#150
@yaronya yaronya force-pushed the fix/verbose-disable-rollback-hang branch from d49bc9e to a556a77 Compare April 9, 2026 19:48
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.

serverless deploy hangs with --verbose and disableRollback: true

1 participant