Skip to content

Run one release image publish at a time - #2698

Merged
kmcginnes merged 1 commit into
mainfrom
serialize-release-image-publish
Dec 2, 2026
Merged

kmcginnes merged 1 commit into
mainfrom
serialize-release-image-publish

Conversation

@kmcginnes

Copy link
Copy Markdown
Collaborator

Summary

Two release runs of build_docker.yml started together could both pass the publish checks before either pushed, because each release run had a concurrency group of its own. Every release run now shares one fixed group and waits for the run ahead of it, while snapshot builds keep replacing each other.

User-facing: none

 concurrency:
-  group: <workflow>-<release ? run_id : ref>
-  cancel-in-progress: true
+  group: <workflow>-<release ? 'release' : ref>
+  cancel-in-progress: <not release>

The release group leaves the ref out, so a release dispatched from a 3.3.x tag and one from a main tag also wait for each other.

A third release run

GitHub keeps one running and one pending run per concurrency group (the default queue: single). When a third release is dispatched while one runs and one waits, GitHub cancels the waiting one, before it checks or pushes anything, and the third takes its place. The cancelled release needs dispatching again. The workflow comment says so.

GitHub also documents queue: max, which would keep up to 100 pending runs. I left it out: it can't be combined with cancel-in-progress: true, and the docs don't say whether that check applies when cancel-in-progress is an expression, so trying it here could stop snapshot builds too.

Evidence

Before: evaluating the concurrency expressions for two release dispatches gives groups ending in their run ids, both with cancel-in-progress: true.

After: both release dispatches get Build Docker image and publish to ECR-release with cancel-in-progress: false; a push to main and a latest dispatch both get Build Docker image and publish to ECR-refs/heads/main with cancel-in-progress: true.

Merge Danger

Door: two-way

Impact: CI

Only the concurrency block and comments change. The 3.3.x branch needs the same change in its own PR, since a release dispatched from a 3.3.x tag uses that branch's copy of the workflow.

Related


🤖 Written by an AI agent on my behalf.

Layer: 1-serialize-release-publish

@kmcginnes kmcginnes left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@kmcginnes
kmcginnes merged commit 332f339 into main Dec 2, 2026
6 checks passed
@kmcginnes
kmcginnes deleted the serialize-release-image-publish branch December 2, 2026 03:11
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.

Run one release image publish at a time

1 participant