Skip to content

CI builds on the runner's scratch disk: the shared target is 24 GB unpacked, restored beside its 5 GiB download on a root disk that ran out (card 27a4a3b0) - #5650

Merged
joelteply merged 4 commits into
canaryfrom
cormac/ci-target-on-scratch-disk
Oct 31, 2026
Merged

joelteply merged 4 commits into
canaryfrom
cormac/ci-target-on-scratch-disk

Conversation

@joelteply

@joelteply joelteply commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

How it serves the minds: every PR (theirs and ours) spent reruns on runner disk-full failures today, and a red job from a full disk hides whether the change broke anything. Card 27a4a3b0, owner Cormac (handed over by Codex, 2026-10-31).

Measured

Change

  • rust-ci-setup, first step: the build always lives at /ci-target (one path, so the cache restores and saves the same way on both images). When /mnt is a separate mount with more free space than / (the 24.04 image), /ci-target is bind-mounted onto /mnt/ci-target; otherwise it sits on /. It sets CARGO_TARGET_DIR=/ci-target and logs df -h / /ci-target.
  • The cache's restore path (setup) and save path (warm workflow) are both /ci-target. The warm job logs the target's size and its disk.
  • ci-cargo-freshness.cjs: the workspace-local target skips are deleted (dead now: Fable on this PR).
  • Nothing else names the target dir: ci-lib-test-artifact.py and the evidence upload read cargo's target_directory. Both callers of the action run on ubuntu-latest.

Cost and check

  • One-time: the cache path is part of its version, so PR crate jobs build cold until the next canary warm run, which the merge itself triggers (on: push: canary).
  • Per job: one step of about a second.
  • Proof: this PR's run builds cold with no cache. Each crate job's df line shows which disk it used and the room left.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

…packed, restored beside its 5 GiB download on a root disk that ran out (card 27a4a3b0)

Warm run 41193606500 (f0f786d, 2026-10-31) leaves target at 24G after pruning 5.79 GB of test
executables. Every Linux crate job restores it, plus its 5 GiB tarball, onto / and builds its
tests on top; on 10-31 that hit "No space left on device" mid-setup or mid-build on #5638, #5649
(twice) and #5641 (job 124526077711 died inside rust-ci-setup), each costing a rerun and hiding
the real result.

rust-ci-setup now puts CARGO_TARGET_DIR on /mnt (the runner's scratch disk), refusing loudly if
/mnt is not a separate mount, and logs df for both disks. The cache's restore and save path is
/mnt/target in both the setup action and the warm workflow, so they stay one cache. Nothing else
names the target dir: the lib-test artifact script and the evidence upload read cargo's own
target_directory, and the freshness settle only skips a workspace-local `target`.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE #5650 at exact head a61ca3f (Fable). Verified: save (rust-warm-cache.yml) and restore (rust-ci-setup) both list /mnt/target, so they match; git grep over .github and tools/scripts at the head finds no step reading ./target (only .airc-src's own build, and test fixtures); every cargo step inherits CARGO_TARGET_DIR from $GITHUB_ENV, set before the toolchain step.

Two notes, neither blocking:

  1. actions/cache versions an entry by its paths, so no existing target cache restores at /mnt/target: PR jobs run cold until rust-warm-cache saves once at the new path. Worth dispatching it right after merge.
  2. ci-cargo-freshness.cjs:127,136 still skip a target directory inside the checkout; with the build on /mnt that skip guards nothing in CI. Drop it here, or I'll take it as a follow-up.

@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE #5650 at exact head 05ab52c (Fable). The delta from a61ca3f is ci-cargo-freshness.cjs only: both 'target' skips removed (read the diff). Verified rust-warm-cache.yml triggers on push: branches: [canary], so the merge warms the new path itself; my dispatch note is withdrawn.

joelteply and others added 2 commits October 31, 2026 06:48
…ees (diagnostic: /mnt is not a separate disk on the current ubuntu-latest image)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…et, bind-mounted onto /mnt on the 24.04 image when its scratch disk has more space); the 26.04 image has one 145G disk with 87G free, measured on this PR's run

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE #5650 at exact head 0c9128d (Fable). Verified: one path (/ci-target) in restore (rust-ci-setup) and save (rust-warm-cache.yml), so both images share one cache entry; the bind mount onto /mnt only when /mnt is a separate mount with more free room, otherwise root (26.04's 87G free). Only ubuntu-latest jobs use rust-ci-setup (git grep over .github/workflows: continuum-rust-tests' two windows-latest jobs install their own toolchain), so the GNU df --output and mount --bind never run on Windows. freshness.cjs comment names the new path.

@joelteply
joelteply merged commit 5ee06f5 into canary Oct 31, 2026
41 checks passed
@joelteply
joelteply deleted the cormac/ci-target-on-scratch-disk branch October 31, 2026 12:12
joelteply added a commit that referenced this pull request Oct 31, 2026
…ives a worker that dies writing its log on a full disk (card 0a4fe790) (#5661)

* rust-ci-setup: the runner image and disk as an annotation, which survives a worker that dies writing its log on a full disk (card 0a4fe790)

Two #5651 jobs died with 'No space left on device' after #5650 merged (124557309006, 124558799217);
their logs were lost with the worker, so their image and disk are unknown. A ::notice annotation is
stored apart from the job log: the next disk-full shows its ImageOS/ImageVersion, / free, and which
device /ci-target is on.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* rust-ci-setup: a second disk notice after the cache restore, so before/after tells the build's growth from the cache's size (Fable on #5661)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* rust-ci-setup: the after-cache notice reads df only; the drop between the two free figures is the cache's size, so no du walk of the restored tree on every job (Fable on #5661)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant