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

New Canceled status for Stopped/Terminated Workflows #11849

Open
jmeridth opened this issue Sep 20, 2023 · 4 comments
Open

New Canceled status for Stopped/Terminated Workflows #11849

jmeridth opened this issue Sep 20, 2023 · 4 comments
Labels
area/controller Controller issues, panics area/shutdown Shutdown Strategy: Stop and Terminate area/spec Changes to the workflow specification. type/feature Feature request

Comments

@jmeridth
Copy link
Member

Summary

new Canceled status

NOTE: debates can ensue regarding one l (American English) or two l (British English). Looks like CircleCI and TravisCI use one. They could be doing i18n and because I'm in the USA it renders as one. 🤷

Use Cases

Since many consumers of argo-workflows are using it for Continuous Integration (CI), when the following sequence occurs, a Cancelled status would be nice:

  • pull request created
  • workflow starts CI run
  • new commit(s) pushed to pull request
  • if the previous workflow is still running, it should be terminated and status set to Canceled (currently when terminated its status is set to Failed)
  • new workflow starts CI run, including new commits

This will allow for the analytics to be accurate on which workflows actually Failed 😄


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

@jmeridth jmeridth added the type/feature Feature request label Sep 20, 2023
@jmeridth
Copy link
Member Author

We currently determine previous workflows by having passed GitHub org, repo and pr number as labels and before we kick off a new workflow (via argo events to a custom service) we call the argo-workflows API to find any previously running workflows with those labels and terminate them (resulting in a ❌ Failed status with message Stopped with strategy 'Terminate'

@agilgur5 agilgur5 added the area/controller Controller issues, panics label Sep 20, 2023
@agilgur5
Copy link
Member

agilgur5 commented Sep 20, 2023

Yea I thought about this recently too, it is a bit confusing that there is no custom status for a shutdown and instead just a message. Had a question about this on Slack recently too.

This would be a breaking change and require a sizeable refactor (with a pretty large chance for bugs as there is quite a lot of code dependent on statuses), but I do think it would be a good to distinguish if possible.

There's also a question here of if we should add a Cancelled NodeStatus as well. I believe that currently the running node is marked as Failed and all later nodes are marked as Skipped, both of which require a bit of interpretation right now as they are not the same as regular failures or regular skips. This popped up in a code review too

NOTE: debates can ensue regarding one l (American English) or two l (British English).

Wait a minute, I'm American and thought this was always two l, i.e. "Cancelled" 😵‍💫

@agilgur5 agilgur5 added the area/spec Changes to the workflow specification. label Oct 4, 2023
@terrytangyuan
Copy link
Member

Some comments in #11992

@agilgur5
Copy link
Member

agilgur5 commented Oct 7, 2024

There's also a question here of if we should add a Cancelled NodeStatus as well. I believe that currently the running node is marked as Failed and all later nodes are marked as Skipped, both of which require a bit of interpretation right now as they are not the same as regular failures or regular skips. This popped up in a code review too

This was changed in #13214 to Failed, but Cancelled would still be easier to understand/interpret

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller Controller issues, panics area/shutdown Shutdown Strategy: Stop and Terminate area/spec Changes to the workflow specification. type/feature Feature request
Projects
None yet
Development

No branches or pull requests

3 participants