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

Flow Run Cancellation #92

Merged
merged 9 commits into from
Aug 11, 2020
Merged

Flow Run Cancellation #92

merged 9 commits into from
Aug 11, 2020

Conversation

znicholasbrown
Copy link
Contributor

PR Checklist:

  • add a short description of what's changed to the top of the CHANGELOG.md
  • add/update tests (or don't, for reasons explained below)

Describe this PR

Adds a cancellation button to the flow run actions bar too allow cancelling of in-progress runs.

Copy link
Member

@zhen0 zhen0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll also need to update the cancel button version check and the mutation we call - the current button simply sets state but there is now a specific cancel_flow_run mutation which handles cancelling/cancelled states.

@znicholasbrown
Copy link
Contributor Author

Ok made those updates @zhen0 - we'll limit this to Core 0.13.0.

Copy link
Member

@zhen0 zhen0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more small but important change and one question/suggestion.

src/graphql/FlowRun/cancel-flow-run.gql Outdated Show resolved Hide resolved
Upgrade your flow to Prefect 7.3 or higher to enable cancellation.
Your Flow was registered with version {{ flowRun.flow.core_version }} of
Prefect Core; please upgrade to version 0.13.0 or higher and re-register
your Flow to enable cancellation.
</span>
<span v-else-if="flowRun.state !== 'Running'">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still want this? I can imagine cases where it might be useful to cancel from a scheduled or submitted flow run?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think opening this up isn't a bad idea, let's do it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok - updated to allow cancellation when in a non-finished state.

zhen0
zhen0 previously approved these changes Aug 10, 2020
Copy link
Member

@zhen0 zhen0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@zhen0 zhen0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes @znicholasbrown

@znicholasbrown znicholasbrown merged commit d8ddf58 into master Aug 11, 2020
@znicholasbrown znicholasbrown deleted the cancellation-button branch August 11, 2020 14:24
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.

3 participants