Repository navigation
ci: reuse apt downloads in scoped Linux plugin builds - #1335
Conversation
|
First live result found an archive HIT without usable apt reuse: 337 MB restored, then 147 MB downloaded again. Automatic merge has been disabled and the PR dequeued. Actions toolkit resolvePaths stores paths relative to GITHUB_WORKSPACE; the container /__w/repo/repo and hosted /home/runner/work/repo/repo differ in depth. Added a real local tar reproduction and package-only normalization into the real apt directory, plus archive-count diagnostics and the existing docker-clean safeguard. Thirteen focused tests pass; next CI run must show actual retained packages and reduced downloads before requeueing. |
|
Current HEAD passes CI. Live host-archive cold run 39066443172 / job 117495175835 starts with zero packages, retains 323 .debs totaling 142 MiB, and records 41/41 compiler hits. Retention is below the 200 MiB declared family bound. Re-enabled normal auto-merge so trusted master can seed this exact host package set. Subsequent warm download/runtime validation remains under #1286; the failed shared-container experiments are superseded and not claimed as useful. |
Refs #1286.
Measured problem
The first plugin warm PR had 41/41 compiler hits but still took 169 s (70 s target step) versus 153 s / 57 s cold. Apt downloaded 147 MB in 30 s, masking the compiler benefit.
We tested sharing the existing container archive. Its first restore hit downloaded 337 MB but apt still fetched 147 MB. A workspace-layout normalization then made 563 .debs available, yet apt still needed 142 MB: only about 5 MB of the host requirement matched. That run took 145 s / 46 s with 41 hits, but network conditions differ and the large shared archive is not justified by those small package savings. Both attempts are preserved in commit history and audit evidence; they are superseded at HEAD.
Current implementation
Use a host-specific workspace-relative .targets-apt/*.deb archive. Apt installs consume that exact directory and retain downloaded packages. PRs and merge groups restore only; selected trusted master pushes save fresh commit-keyed snapshots, avoiding a permanently frozen package set. The declared targets-apt family is bounded to 200 MB LRU (actual host downloads ~147 MB). No container cache paths, extra container dependency payload, or new workflow file. The existing Tier 2 cache stays unchanged.
Developer-note changes select linux-v4l2 so real CI validates installation and reports usable/retained package counts. Ten focused apt/cache/stdlib/uv checks pass. Live master seeding and later PR download/runtime benefit still need verification; no net apt-cache speedup is claimed yet. Compiler reuse itself is already 41/41.