Repository navigation
ci: guard the Linux .deb archive copy against an empty apt cache - #3939
Conversation
An unmatched glob stays literal, so cp fails under set -e when /var/cache/apt/archives holds no .deb. That happens when the runner image already ships every package and nothing is downloaded. Guard the copy with compgen so the step skips it instead of failing.
Size Report
Startup median (7 runs, lower is better):
|
|
This PR is ready at e40b6da. All 16 checks pass, and the Linux smoke job exercises the changed install step. There are no conflicts. I did not rerun the scratch-dir bash test, and I did not confirm from CI logs that the empty-glob path was reached, because it is a defensive branch that cannot fire on current runner images. Not blocking, and you can take or leave these: the comment at .github/workflows/linux.yml#L132 would be clearer as "An unmatched glob stays literal and fails cp under set -e when the runner image already has every package.", and when the guard skips, the save step may store an empty cache entry at .github/workflows/linux.yml#L138, which is harmless because apt downloads the packages again. |
|
Summary
Follow-up to the non-blocking review notes on #3919. One file:
.github/workflows/linux.yml. No linked issue: #3918 was auto-linked there but is an unrelated iPad fix, and the timeout reports were never filed.The final
cp /var/cache/apt/archives/*.deb ~/apt-archives/runs underset -euo pipefail. An unmatched glob stays literal, so thecpfails the step when the archives dir holds no.deb— as it would when a future runner image already ships every package.compgen -Gnow skips the copy there; a realcpfailure still fails the step.Cache question: kept. Would
--no-install-recommendsplus the bound alone be simpler? The first push of #3919 was exactly that, and it failed after 3 bounded attempts while the mirror was slow: an 11 MB package could not download inside the deadline. The cache is why most runs never ask the mirror (13–14 s on a hit). A singleactions/cachewould save a partial archive after a failed install, so the restore/save pair stays unchanged.Validation
Base
a9fc9a1, tested SHAe40b6da.pnpm check:affected --run --head e40b6da09c: exit 0,exactCommit: true.bash -eo pipefailin a scratch dir: unguardedcp *.debon an empty dir exits 1; the guarded form skips and still copies when files exist.Risk: none beyond #3919; the guard only removes a failure mode.
🤖 Generated with Claude Code