I kept having GitHub Actions workflow runs canceled with the message:
Canceling since a higher priority waiting request for 'your-project' exists
Looking at the GitHub Actions docs, I see:
When a concurrent job or workflow is queued, if another job or workflow using the same
concurrency group in the repository is in progress, the queued job or workflow will be
pending. Any previously pending job or workflow in the concurrency group will be canceled.
So that means that only one pending workflow run is allowed. Is there a way that I could queue more than one without going to some sort of external queuing mechanism?
As of 2023-11-17 the answer is no.
The concurrency feature of GitHub Actions creates two slots for a given group:
The cancel-in-progress input controls the behavior of these two slots.
cancel-in-progress: falseWorkflow run number 3 will have the message Canceling since a higher priority waiting request for 'YOUR_GROUP_NAME' exists.
This behavior is designed to ensure the "latest state" is what gets run after the currently-running operation completes.
cancel-in-progress: trueThis behavior is designed to quickly stop running jobs that no longer matter, such as pull request builds when new changes are added to the branch and need to be built.
There is currently (2023-11-17) no way to accomplish this from a workflow, there are only workarounds like having a single runner with a special label or having a step that blocks the workflow from proceeding until other workflows complete.
Use the below queue: max
This can queue up to 100 jobs.
https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency#example-queueing-multiple-pending-runs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
queue: max
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With