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

Queued cancel action can't cancel others #34

Closed
thomwiggers opened this issue Sep 8, 2020 · 5 comments
Closed

Queued cancel action can't cancel others #34

thomwiggers opened this issue Sep 8, 2020 · 5 comments

Comments

@thomwiggers
Copy link
Contributor

I added this action to my workflows, but I have a lot of them. Then I realised an important limitation of this tool: if your pipeline is saturated, this action won't be scheduled. This means that the behaviour is a bit different from what you might get on, e.g., Travis CI, where the scheduler terminates stale workflows, thus clearing a saturated pipeline for CI to immediately start working on the new commit.

It may be helpful to document this limitation.

@thomwiggers
Copy link
Contributor Author

Would it make sense to add a feature where a run cancels all but the latest workflow, including itself? That would alleviate this issue a bit.

thomwiggers added a commit to thomwiggers/cancel-workflow-action that referenced this issue Sep 8, 2020
@styfle
Copy link
Owner

styfle commented Sep 11, 2020

Try the Advanced Usage where cancel is handled in a single workflow so it can cancel other workflows.

This allows you to cancel queued workflows.

@thomwiggers
Copy link
Contributor Author

I have too many workflows and they are partially generated automatically, so that is not feasible for me. My queue can be hundreds of jobs, so the "cancel these workflows" task would still be postponed for hours, while I want (as implemented in #35) other workflows to cancel themselves and all-but-the-last one.

@RhinosF1
Copy link

This is a slight issue for us too. Allowing cancel self would be good.

we have in excess of 80 jobs per commit on average so a few commits going at once can easily send it high.

@styfle styfle changed the title Document limitations Queued cancel action can't cancel others Feb 13, 2021
thomwiggers added a commit to thomwiggers/cancel-workflow-action that referenced this issue Feb 15, 2021
@styfle
Copy link
Owner

styfle commented Apr 11, 2021

Fixed in #35 with a new all_but_latest flag.

@styfle styfle closed this as completed Apr 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants