Skip to content
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

Merged
merged 2 commits into from
Apr 19, 2018
Merged

Add a pulumi cancel command. #1230

merged 2 commits into from
Apr 19, 2018

Conversation

pgavlin
Copy link
Member

@pgavlin pgavlin commented Apr 18, 2018

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.

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.
Copy link
Member

@joeduffy joeduffy left a 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" +
Copy link
Member

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.)

Copy link
Member Author

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 {
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member Author

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)

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.

None yet

4 participants