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

Cancellation should use a CANCELLING state type instead of state name #7735

Closed
1 task done
zanieb opened this issue Dec 1, 2022 · 2 comments
Closed
1 task done
Assignees
Labels
development Tech debt, refactors, CI, tests, and other related work.

Comments

@zanieb
Copy link
Contributor

zanieb commented Dec 1, 2022

First check

  • I am a contributor to the Prefect codebase

Description

Cancellation is requested now with a transition from RUNNING -> Cancelling (CANCELLED). After cancellation completes, the state changes to Cancelled (CANCELLED). The state name is used as a filter at the agent level to avoid cancelling already cancelled runs.

There are some problems with this approach:

  • Concurrency slots are released immediately on transition to Cancelling — but the run is still running
  • The state name is being used to determine orchestration behavior — against our design for state types.

An alternative may be keeping the state name Cancelling (RUNNING), but this requires orchestration rules to allow RUNNING -> RUNNING transitions.

Impact

Improve the cancellation experience and internal coherence of orchestration.

Additional context

No response

@zanieb zanieb added the development Tech debt, refactors, CI, tests, and other related work. label Dec 1, 2022
@bunchesofdonald bunchesofdonald self-assigned this Dec 2, 2022
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. To keep this issue open remove stale label or comment.

@zanieb
Copy link
Contributor Author

zanieb commented Mar 30, 2023

Resolved in #7794

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Tech debt, refactors, CI, tests, and other related work.
Projects
None yet
Development

No branches or pull requests

2 participants