Closed iaindillingham closed 1 month ago
We do have concurrency set on the deploy
job in the main
workflow, which prevents more than one of those jobs running at once.
However, that will only prevent more than deploy
job happening at once.
There is no concurrency set on the entire main
workflow. So something like the following has happened:
main
run 1 starts firstmain
run 2 starts second, a short while after run 1deploy
steps in main
run 2 startdeploy
steps in main
run 1 wait until existing deploy
finishesdeploy
steps in main
run 2 complete, completing main
run 2deploy
steps in main
run 1 startdeploy
steps in main
run 1 complete, completing main
run 1, out of orderI guess that the concurrency
only actually applies when the job is actually ready to run, not blocking from the outset when the needs
dependencies are being waited on.
We're using the main
workflow for our general CI. As it is, if we set concurrency on the entire main
workflow as is, we'd only have one allowed workflow run for any merges or pull requests to this repository.
Maybe we could separate out test and deployment workflows, then the deployment workflow could:
That way, only one deployment (including tests) will run at once.
A variation could be: use cancel-in-progress
for concurrency
on the entirety of this separated out deployment workflow, which might speed things up if you launch a second deployment just after a first. Instead of waiting for the first to complete, we cancel it and run the second.
I'm going to follow up on this and check what happens when merging several Dependabot PRs in quick succession, week commencing 2024-10-07.
@benbc has noticed what look like out-of-order deploys. From Slack:^1