-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(cli): unable to update stacks in ROLLBACK_COMPLETE #8779
Conversation
The CLI mistakingly determined that a stack in `ROLLBACK_COMPLETE` status is not updatable. This change cleans up this logic so that a stack update will fail only if the stack is in `_FAILED` status, which is a non-updatable state. Fixes #8126
I currently have a production environment stuck in this state and I would really love to use this fix! |
@cursive-ide wrote:
If you feel adventurous, you can try to patch up your local CLI. Update the get isRollback() {
return this.name.indexOf('ROLLBACK') !== -1;
} To this: get isRollback() {
return this.name.indexOf('ROLLBACK_FAILED') !== -1;
} LMK if this helps. |
Yes, I actually did this last night (I applied the whole patch rather than just that one change - the JS is mostly the same as the TypeScript) and it allowed me to get my system out of the stuck state - thanks! |
picking this up, will update the PR as I go |
…ing rollback_in_progress" This reverts commit 5b67fa9.
@eladb - looked into this a bit more as I was trying to get rid of per the Stack status codes
The bug this addresses is the updating the tests to verify the |
@eladb - think I addressed the TODO list, can you take a look when you get a chance? |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
get isSuccess(): boolean { | ||
return !this.isNotFound && !this.isRollback && !this.isFailure; | ||
get isComplete(): boolean { | ||
return this.name.endsWith('_COMPLETE'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the use case for the isComplete
function? I think this function might be deceiving because Rollback_Complete
state isn't technically fully functional... I think it might be best to just remove it or add some documentation to each function.
If this function is used so our customers can check on their state then I think we should add some documentation to this!
Also, if isComplete
is added as a function for customers to use.. I think then I think isRollback
can arguably be put in as well but never called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
users don't have programmatic access to the CLI yet, so these methods are only used internally. However, I think you have a good point about whether it's deceiving what isComplete
means and maybe it's better to leave it off for now since we're not using it.
might be handy to have a method indicate whether a stack is updateable. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we dont use it might as well just remove it I think.. might be confusing when we look back and get confused as to why we have it in the code anyways..
isComplete
doesn't indicate if a stack is updateable though. If it is Rollback_Complete
then it can only be deleted right?
superseded by #8948 |
Supersedes #8779 The CLI determined that a stack in `UPDATE_ROLLBACK_COMPLETE` status is not updateable. related [comment](#8779 (comment)) This change modifies this logic by splitting up `waitForStack` into `waitForStackDelete` and `waitForStackDeploy` which evaluate stack status after it reaches a stable state depending on the operation that was performed. Closes #8126 #5151 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Supersedes aws#8779 The CLI determined that a stack in `UPDATE_ROLLBACK_COMPLETE` status is not updateable. related [comment](aws#8779 (comment)) This change modifies this logic by splitting up `waitForStack` into `waitForStackDelete` and `waitForStackDeploy` which evaluate stack status after it reaches a stable state depending on the operation that was performed. Closes aws#8126 aws#5151 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The CLI mistakingly determined that a stack in
ROLLBACK_COMPLETE
status is not updatable.This change cleans up this logic so that a stack update will fail only if the stack is in
_FAILED
status, which is a non-updatable state.Fixes #8126 #5151
TODO:
isCreationFailed
. It appears that if a stack is in ROLLBACK_XXX status, it will be determined that it's creation was failed, and it will be deleted (??). Is that a bug?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license