-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add a pulumi cancel
command.
#1230
Conversation
This command cancels a stack's currently running update, if any. It can be used to recover from the scenario in which an update is aborted without marking the running update as complete. Once an update has been cancelled, it is likely that the affected stack will need to be repaired via an pair of export/import commands before future updates can succeed. This is part of #1077.
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.
LGTM!
cmd/cancel.go
Outdated
Use: "cancel [<stack-name>]", | ||
Args: cmdutil.MaximumNArgs(1), | ||
Short: "Cancel a stack's currently running update, if any", | ||
Long: "Cancel a stack's currently running, if any \n" + |
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.
Super duper nit pick; usually the first line of long ends with punctuation. (Extra space in here too.)
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.
We should audit the other commands as well; I pulled this style from https://github.com/pulumi/pulumi/blob/master/cmd/stack_rm.go#L26
|
||
// Ensure that we are targeting the Pulumi cloud. | ||
backend, ok := s.Backend().(cloud.Backend) | ||
if !ok { |
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.
Just for my own understanding, will cancel also work for PPCs? If not, should we also be checking RunLocally
?
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.
It will not work for PPCs: the service will issue a 400.
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.
(which we will then render to the user with its message)
This command cancels a stack's currently running update, if any. It can
be used to recover from the scenario in which an update is aborted
without marking the running update as complete. Once an update has been
cancelled, it is likely that the affected stack will need to be repaired
via an pair of export/import commands before future updates can succeed.
This is part of #1077.