Skip to content

Release 0.6.2: serialize image builds of the same commit - #24

Merged
andrewfraley merged 2 commits into
mainfrom
ci-serialize-image-builds
Sep 27, 2026
Merged

andrewfraley merged 2 commits into
mainfrom
ci-serialize-image-builds

Conversation

@andrewfraley

Copy link
Copy Markdown
Owner

Every push to a PR branch starts two runs for the same commit, the push run and the pull_request run, and both build the image into the same GitHub Actions cache. Two builds writing that cache at once is a known way for buildx to stall. Another project using this CI setup had a PR run hang in the build step for 17+ minutes while its twin finished in 83 seconds. The re-run took 57 seconds, and GitHub reported no incident.

Change

The image job gets a concurrency group keyed by the commit being built (pull_request.head.sha, falling back to github.sha), with cancel-in-progress: false. The second run's image build waits for the first, then finds a fresh cache.

It's on the job, not the whole workflow, so:

  • tests in both runs still run in parallel
  • the release job isn't queued behind anything
  • a merge to main builds a new merge commit, so it never waits on the PR's runs

Tags, publishing, releases and the stable move don't change.

One GitHub quirk: a concurrency group holds one running job and one pending job. A third run for the same commit, such as a manual workflow_dispatch while both are queued, cancels the pending one. That's rare, and a re-run fixes it.

Release

Bumps to 0.6.2 (patch: nothing for users to do) with docs/releases/0.6.2.md.

🤖 Generated with Claude Code

andrewfraley and others added 2 commits September 27, 2026 16:48
A push to a PR branch starts a push run and a pull_request run for the
same commit, and both build the image into the same gha cache. Two
concurrent cache writes can stall buildx for many minutes. Group the
image job by the commit being built so the second run waits for the
first, then finds a fresh cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrewfraley
andrewfraley merged commit 6f4894e into main Sep 27, 2026
6 checks passed
@andrewfraley
andrewfraley deleted the ci-serialize-image-builds branch September 27, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant