Skip to content

ci: serialize Publish Image runs to prevent stale :latest#13

Merged
donbeave merged 1 commit into
mainfrom
ci/serialize-publish-image
Jun 20, 2026
Merged

ci: serialize Publish Image runs to prevent stale :latest#13
donbeave merged 1 commit into
mainfrom
ci/serialize-publish-image

Conversation

@donbeave

Copy link
Copy Markdown
Member

Problem

Publish Image runs on every push to main with no concurrency guard. When several PRs merge within seconds (common with Renovate batches), multiple publish runs execute concurrently and race on the :latest tag. An older commit's run can push :latest last, so :latest ends up baked from an older role commit than main HEAD.

Downstream, jackin' inspects the published base's jackin.role_git_sha label, sees it behind the role repo HEAD, marks it published_image_stale, and rebuilds the entire role image from the workspace Dockerfile on every launch instead of reusing the published base.

Fix

Add a top-level concurrency group keyed on the branch with cancel-in-progress: true, so simultaneous publishes serialize and the newest push wins :latest.

🤖 Generated with Claude Code

Concurrent merges to main (e.g. several Renovate PRs landing within
seconds) each trigger Publish Image with no concurrency guard, so the
runs race on the :latest tag. An older commit's run can push :latest
last, leaving it pointing at a stale image. Consumers then see the
published base as out of date and rebuild the whole role image from the
workspace Dockerfile instead of reusing it.

Add a per-branch concurrency group with cancel-in-progress so the newest
push wins and :latest always reflects the latest commit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
@donbeave donbeave merged commit d8c671f into main Jun 20, 2026
5 checks passed
@donbeave donbeave deleted the ci/serialize-publish-image branch June 20, 2026 11:10
@sonarqubecloud

Copy link
Copy Markdown

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