Fix deploy hang with --verbose and disableRollback: true#151
Open
yaronya wants to merge 1 commit intooss-serverless:mainfrom
Open
Fix deploy hang with --verbose and disableRollback: true#151yaronya wants to merge 1 commit intooss-serverless:mainfrom
yaronya wants to merge 1 commit intooss-serverless:mainfrom
Conversation
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
d49bc9e to
a556a77
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When deploying with both
--verboseanddisableRollback: true, the CLI hangs indefinitely after a CloudFormation resource fails. Without--verbosethe failure is reported immediately.The monitor loop in
lib/plugins/aws/lib/monitor-stack.jswaits for the stack to reachROLLBACK_COMPLETE,DELETE_FAILED, orDELETE_COMPLETEbefore throwing — but with rollback disabled, the stack stops atUPDATE_FAILEDorCREATE_FAILED, and none of those match the termination condition.This was originally reported in serverless/serverless#12770.
Resolves #150
Changes
CREATE_FAILEDandUPDATE_FAILEDto the terminal status list inmonitor-stack.js--verbosewithUPDATE_FAILEDandCREATE_FAILEDstack states