fix: Parallel image pushes race on shared layers and fail the release #66
Labels
No labels
priority/P0
priority/P1
priority/P2
priority/P3
size/L
size/M
size/S
size/XL
size/XS
state/blocked
state/done
state/in-progress
state/in-review
state/needs-refinement
state/ready
type/bug
type/chore
type/feature
type/refactor
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#69 chore: Publish images from one job in the six multi-image repositories
amtronics/platform-actions
Reference
amtronics/platform-actions#66
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
A release can fail because two of its own jobs push the same layer at the same moment.
ahmad/imamahrun 2564 is the example:publishis a matrix overapiandweb, both pushing to the same package, and the two images share base layers. The api push died withfailed to push …: unknown, which is buildkit reporting a server-side failure it could not classify. On the server the same second shows what actually happened:Two identical blobs are inserted concurrently, one loses the unique-constraint race, and the loser's error path dereferences nil. The server bug is tracked separately (
amtronics/infrastructure-vps); this issue is about not standing in front of it. The failure is intermittent by nature, which is why it reads as "CI is flaky" rather than as a defect.The blast radius is every repository that publishes more than one image from one matrix — the copy-in release template, so imamah, larda, expiro and trip at least.
Scope
templates/release.yml, so concurrent pushes of shared layers cannot collide; the same change carried to the consumer repositories that already copied the template.Acceptance criteria
Note on the trade-off
Serialising the matrix (
max-parallel: 1) is the smallest change and removes the race by construction, at the cost of wall-clock time on multi-image releases. A bounded retry keeps the parallelism and treats the race as the transient it is. Either satisfies the criteria; a retry is the better answer if it can be made to distinguish a transient push failure from a real one, and serialising is the honest fallback if it cannot.