ci(docker): the prune counts the docker job by suffix, so #2219's rename no longer disables it #2231
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!2231
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/1120-0027"
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?
What was broken
Bound what the build left behind(ci.yml, docker job) only runsdocker builder prune --keep-storage 2GBwhen no other image build is sharing the host daemon. It answers"how many builds are running" from
/actions/tasks?status=runningwith#2219 merged the smoke test into that job and renamed it
Server smoke and Docker build. After the rename the equality matches no task at all, this job included,so the count is
0on every run, the0|1)case reads0as "alone", and the pruneruns even when another build is using the cache it is about to drop.
Evidence (/api/v1/repos/jaylouisw/packetforge/actions/tasks, 2026-11-20T00:30Z):
run 8060,
Server smoke and Docker build), 6 still namedDocker buildbecauseolder pull requests run the ci.yml they branched from.
a prune under a live build, the race that failed runs 7378, 7762, 7883 and 7887
with
failed to export image: ... unknown parent image IDand reddened main.The change
One expression and its comment: match
/(Docker build)$/instead of equality, so thisjob is counted whichever of the two names it carries (and pull requests on the old
ci.yml are still counted as siblings). An empty list now reports
unknowninstead of0— with this job's own task always in the list, "no build running" cannot be true,so the safe reading is the current skip-the-prune branch, not "alone".
Measured
Same snippet, three real payload shapes:
Docker buildBefore run: 8060 (task 21319,
Server smoke and Docker build, prune ran with thecounter reading 0). After: this pull request's own docker job, where the counter now
sees its own task.
Coverage
Unchanged: no job removed, no step skipped differently, no check weakened, no timeout
touched. The only behavioural difference is when the 2 GB cache bound runs: never
while another build is using that cache, which is what the step already intended.
node scripts/check-ci-disk-hygiene.jsandnode --test test/ci-disk-hygiene.test.js(12/12) pass with the change.
Red leg is real, and it is one character.
Server smoke and Docker buildfails ona6952463withThe
node -e '...'block is a single-quoted shell string, and the added comment linecarries an apostrophe in
job's. It closes the shell string early, so the{inif (!builds.length) { ... }is parsed by bash, not node — exactly the reported token. The block in main has no'inside it and runs clean; this is the only one introduced.Fix is to drop the apostrophe (
// this job has its own task in the list, so an empty resultetc.) — no logic change. I did not touch.forgejo/workflows/: that file is the ci loop's to change, and this run's action was merges. The other six legs ofa6952463are green (18/20/22, smoke, classify, rebase), so it should go green on a push of that one-line comment edit.