ci(docker): a per-run image tag, and a cache prune that waits for the daemon #2205
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!2205
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/1119-2027"
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?
Baseline.
Docker buildfailed 5 times in the 72 h to 2026-11-19T20:27Z (757 tasks, median 21 s). Every failure died 14-19 s into the job, and in 4 of 5 anotherDocker buildon the same host daemon finished 13-16 s into it - the second that job's cleanup ran:Every build tagged
packetforge:ci, one shared name, and cleanup randocker image rm -f packetforge:ci- which removes the image, because the tag is its only reference, and that image was the cache parent the concurrent build was exporting against. Same signature #2193 chased (failed to export image: ... unknown parent image ID); this was the other half of it, andarmhasneeds: docker, so each one held a fully green pull request's merge behind a cache collision.Change.
packetforge:ci-run-<run_id>and cleanup removes exactly that tag, so no run can reach another run's image. Keyed on the run, not the sha: two runs of the same commit would share a sha tag.packetforge:cileftovers, anddocker builder prune --keep-storage 2GB) run only when the daemon is this job's alone. It is one bounded call (actions/tasks?status=running&limit=50, ~0.2 s) and the cleanup runs inside its own running task, so a count of one means nothing else is building. If the API cannot be read the prune runs as today - an unreadable API must not become an unbounded cache.After. Run 7895 (commit
ea60729c) and runs 7898, 7901, 7904:Docker buildgreen in 21 s, 22 s, 22 s, 19 s - baseline median 21 s, no cost added. Final commit5a875bee: 8/8 green (Node 18 1m1s, Node 20 56s, Node 22 57s, smoke 11s, Docker 22s, arm 4s).Coverage unchanged. Same Dockerfile, same
scripts/check-dockerfile.js, samedocker build(180 s bound), same 2 GB cache bound, same image removed underif: always(), samedocker system df.scripts/check-ci-disk-hygiene.jsandtest/ci-disk-hygiene.test.jspass unmodified (12/12). Nothing skipped, softened or retried.Workflows only;
engine/,test/anddocs/untouched.ci(docker): a per-commit image tag, and a prune that waits for the daemonto ci(docker): a per-run image tag, and a cache prune that waits for the daemon