-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
support cancellation #13717
Comments
There is already a What is the approach with exit handlers going to be? |
okay
exit handlers by wait container |
I'm not sure what you're trying to say. My question wasn't well phrased, sorry. I was trying to ask: Will exit-handlers be run in the case of a cancelled workflow? I think there are arguments for both options, and I wondered if you'd thought through the cases and come up with a suggestion. My inclination is to say they should run. |
hi @Joibel , I got what you mean, I haven’t considered |
Workflows can already be "Stopped" or "Terminated" via the API/CLI/UI. I'm not sure how "cancelled" is different from either of those?
Alan asked this because "Stop" and "Terminate" are different based on how they interact with exit handlers, like
This is an interesting alternative that may make #13307 possible 👀 |
Summary
support cancellation for workflow
Use Cases
Cancel the running workflow. If the current user wants to cancel the executed workflow, they can only delete it, so that the current environment cannot be retained. It is expected that the user can choose to cancel the workflow.
What I thought of is to add a field
cancelled
in the spec. When it istrue
, kill all containers through thewait
containerThe controller injects the downward api volume into the
wait
container. When the user cancels the workflow, the controller injects values into the annotations (workflows.argoproj.io/cancellation
) of the workflow pods.wait
listens to specific files under the downward api path. When the file generates content, it callskillContainers
to cancel all tasks.draft pr #13708, test case can refer to e2e test
cancel_test
Message from the maintainers:
Love this feature request? Give it a 👍. We prioritise the proposals with the most 👍.
The text was updated successfully, but these errors were encountered: