auto-rebase: measure the room a checkout needs, and stand down green (#1508) #1624
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!1624
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/1116-0705"
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?
Fixes #1508.
While the volume was full (#1507) every tick of
auto-rebasechecked this repository out into the runner workspace and then failed at its first write: six red crosses an hour that were indistinguishable from a regression in the code being rebased, and each one spending the bytes the host was waiting for.What changed
rebasejob's first step measures free space where the checkout will land (df -Pk, walking up to a directory that exists) and stands down green below the threshold, printing the number it measured and naming #1507.MIN_FREE_MBoverrides the 512 MB default.exit 0, which ends the step and nothing else - the checkout on the next line then runs anyway and the bytes are still spent. The verdict is published as a step output (room = true|false) and the checkout and theRebase and armstep are both gated on it, so a stand-down is a stand-down.room=true: adfthat answers nothing (or a runner that never creates the workspace) must not be able to switch this workflow off silently with a green tick.docs/CI.md: the workflow table row says it stands down when short of disk, and the troubleshooting table gains the "green and did not even check out" row.Test
test/ci-disk-hygiene.test.jsgainsthe rebase tick measures the room it needs before it checks out, which was written first and failed againstorigin/main(nodf, no gate). It asserts the measurement exists and comes before the checkout, the stand-down is green and names #1507, a threshold is compared rather than printed,room=trueis the default, and both the checkout and the rebase are gated on the step output.Extracted the guard script and ran it: with room it prints
81098 MB free ...and writesroom=true; with a threshold above the free space it prints the::errorannotation, writesroom=false, and exits 0.node -e 'yaml'parses the file to three steps in the right order.Gates:
node scripts/syntax-check.js- 342 files, all OK.node scripts/check-control-bytes.js- clean.test/ci-disk-hygiene.test.js- 9/9.test/canonical-urls.test.js- 52/52. No engine code touched, so no fullnpm test.Not in this PR
The issue also notes the other workflows that check out (
ci.yml,pr-rebase.yml,closed-audit.yml,wiki-sync.yml). They are deliberately untouched here: gating a checkout there means a job that can silently pass without running its tests, which needs its own decision, not a copy of this step.a5114627eff6aefb02e4