Repository navigation
fix(release-please): queue overlapping runs to prevent branch races - #46
Conversation
This serializes the reusable release-please job per caller repo with a concurrency group that queues every run, plus a 30-minute timeout. Overlapping runs race to update the release PR branch and the loser fails with "Error updating ref heads/release-please--branches--main." On 2026-10-24 six Dependabot merges landed in oce-fe-harness within 25 seconds and one run failed this way (oce-fe-harness run 40051491975). The group is repo-wide, not per-ref, because release-please always targets the default branch. Queued runs read the branch's current HEAD, so a run whose commit was overtaken finds nothing to do. The timeout matters because a hung run holds the group. The slowest caller's job takes under five minutes. A caller that declares a concurrency group named release-please-reusable would deadlock with this job, so the README warns against it. PR #39 tried the same group but was closed because GitHub's default keeps one pending run and cancels it when a newer one queues. This shows as a failed check. The `queue: max` setting avoids this but was blocked on actionlint. PR #41 fixed that by moving the shared check to the actionlint fork build v1.7.12-oce.3. Upstream actionlint 1.7.12 still rejects `queue`, so repos linting with it need the fork build. Closes #40. Refs #39. Assisted-by: Claude Code
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: 🟡 Moderate · up to
|
This change queues overlapping release-please runs in each caller repository. It prevents runs from racing to update the release PR branch.
Callers must not declare a concurrency group named release-please-reusable. Doing so causes a deadlock. None do today.
Rollout needs a release, and the open release PR #45 for 1.2.0 will pick it up. Dependabot then bumps callers that have github-actions updates configured. Callers without that configuration need a manual bump.
Background
Tonight six Dependabot merges landed in oce-fe-harness within 25 seconds. Run https://github.com/openCoreEMR/oce-fe-harness/actions/runs/40051491975 failed with "Error updating ref heads/release-please--branches--main" because a newer run had already moved the branch. No release work was lost, but main went red.
This revives #39. That PR was closed because without
queue: maxGitHub cancels the waiting run when a third overlaps. That also causes a red check. Pull request #41 made the shared actionlint acceptqueue, so that blocker is gone.Behavior changes
The job uses a repo-wide group with
queue: maxand no cancel-in-progress. It sets a 30-minute timeout so a hung run cannot hold the queue. Runs are serialized. A burst of N merges takes about N times a ~1-minute run, and each run reads the current HEAD.The README now covers the new concurrency group behavior and the group naming restriction for callers.
Verification
The YAML parses successfully. A local upstream actionlint 1.7.12 rejects
queueas expected. This PR's actionlint check runs the v1.7.12-oce.3 fork build and is the real test. The workflow is not yet exercised in a caller.Closes #40. Refs #39.
Summary by CodeRabbit