Concurrency Cancel Pending #63136
Replies: 10 comments 13 replies
-
Yes, this will be an amazing feature to add! For monorepos especially useful! |
Beta Was this translation helpful? Give feedback.
-
+1. Lack of |
Beta Was this translation helpful? Give feedback.
-
Hi guys, our use case is that we need a passive queue mechanism, two levels of concurrency instead of just one. Our workflow for status checks should cancel pending tasks from the same group 1 (pull request), but keep pending tasks from a different group 2 (repository). Essentially, the workflow should never run in parallel, but should always be queued if it comes from a different pull request. Not being able to specify more groups would be fine as long as we can at least disable cancelling pending tasks at all. This is what we had in Jenkins CI. I find it hard to believe that this is such a rare use case unsolved for years. |
Beta Was this translation helpful? Give feedback.
-
Considering they have merge queues on PRs (for public or Enterprise users 👀) they probably won't implement this |
Beta Was this translation helpful? Give feedback.
-
We have a Slack integration that triggers our workflow but sometimes they are cancelled because of this behavior. |
Beta Was this translation helpful? Give feedback.
-
The action |
Beta Was this translation helpful? Give feedback.
-
Yet another 👍 from me, very similar problem: We need a proper mutex behaviour in order to ensure sequential runs. It's important so that we ensure consistency of the concurrent merges over time, but also so that we don't lose traceability of what merge caused what action to change status. In addition to this, actions don't only run on merges, they can be scheduled. This issue also arises in that case, scheduled runs end up cancelling in progress merge actions, or vice versa. |
Beta Was this translation helpful? Give feedback.
-
I think, one needs to think thoroughly about concurrency and workflows. My current bet is that following configuration works: concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}"
cancel-in-progress: true Reasons:
The property of the merge queue ensures that the build are run as if they were executed one after another. (Even with size of parallel builds > 1) However, if one uses external services and some ordering is required there, one needs to set the size of the merge builds to |
Beta Was this translation helpful? Give feedback.
-
Yes please! This is so aggravating. Concurrency control should not kill off running jobs!
Concurrency control is frequently a means to gatekeep a resource that can only handle one transaction/modification at a time. The choice to randomly kill of queued jobs in the same concurrency group violates the Principle of Least Surprise. Please fix this! It is clear that numerous customers have been afflicted by this implementation for years. |
Beta Was this translation helpful? Give feedback.
-
Merge queues don't solve this. Merging and actions are two different things. Not every build is a merge. For example I run tests against a production resource at regular intervals. The tests cannot be run from multiple sources simultaneously. They need to be run one-by-one. Similarly, I run against a singular dev resource whenever you push to a dev branch. These tests also can only be run serially against the singular resource, but you'd never want any cancelled - they are running on completely different branches and testing completely different code. I never want to cancel a pending job in this group. Just line them up. |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Product Feedback
Body
Follow-up on https://github.com/orgs/community/discussions/5435
Numerous member of the community have been asking for this feature for years now, however we haven't heard back from a Github employee in 2 years.
I am creating a new issue in hope to attract attention to this, as the referenced discussion is incorrectly closed as answered.
Beta Was this translation helpful? Give feedback.
All reactions