My team uses GitHub Actions 18 in total jobs across about 12 workflows. When we get multiple pull requests we end up driving contention on the workflows and resources we use. I ran across concurrency control for the workflows.
To take advantage of concurrency control add this snippet to the bottom of your pull request workflow:
concurrency:
group: audit-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
When you stack the commits you end up with this warning, and the prior job is stopped:
e2e-db2-with-bulkdata (11)
Canceling since a higher priority waiting request for 'integration-3014' exists
Comments
2 responses to “GitHub Actions: Concurrency Control”
I also am experiencing the same problem. I’m wondering if it’s a timeout. More specifically, the clock for timeout-minutes starts before the job is forced to wait and the clock keeps on running even though the job is effectively paused, ultimately timing out and being canceled.
Thanks for the comment, that makes sense – pause would explain it.