Problem
The Update Dependencies workflow (.github/workflows/update-dependencies.yml) fails intermittently with a concurrent push conflict when running multiple npm package update matrix jobs in parallel.
Error
! [remote rejected] main -> main (cannot lock ref 'refs/heads/main': is at c96d2611989a558ae0784c1ab9043bc9373021f2 but expected 7e427a8777ec98506d62278bedfd2a6e8d3aa770)
error: failed to push some refs to 'https://github.com/Cratis/Samples'
Root Cause
The workflow contains a matrix job that updates npm packages in three directories concurrently:
- Arc/React
- Library/Lending
- Library/Members
When these jobs run in parallel:
- All jobs checkout main at the same commit (e.g.,
7e427a8...)
- Library/Lending finishes first and successfully pushes, moving main to
c96d261...
- Arc/React then tries to push but fails because main has advanced
- The git push is rejected by the server as the base commit no longer matches expectations
This is a classic race condition where concurrent jobs on the same branch conflict.
Solution
Add a workflow-level concurrency group to serialize execution:
concurrency:
group: update-dependencies
cancel-in-progress: false
This ensures only one instance of the Update Dependencies workflow can run at a time. New runs will wait for existing ones to complete rather than being canceled.
Implementation
The fix requires modifying .github/workflows/update-dependencies.yml to add the concurrency configuration immediately after the on: section, before jobs:.
This is tracked by #585.
Problem
The Update Dependencies workflow (
.github/workflows/update-dependencies.yml) fails intermittently with a concurrent push conflict when running multiple npm package update matrix jobs in parallel.Error
Root Cause
The workflow contains a matrix job that updates npm packages in three directories concurrently:
When these jobs run in parallel:
7e427a8...)c96d261...This is a classic race condition where concurrent jobs on the same branch conflict.
Solution
Add a workflow-level concurrency group to serialize execution:
This ensures only one instance of the Update Dependencies workflow can run at a time. New runs will wait for existing ones to complete rather than being canceled.
Implementation
The fix requires modifying
.github/workflows/update-dependencies.ymlto add the concurrency configuration immediately after theon:section, beforejobs:.This is tracked by #585.