Repository navigation
ci: cache LibreOffice .debs and fall back off a stalled Azure apt mirror - #55
Merged
Merged
Conversation
Three PRs (#50, #51, #52) went red on the integration job's Install LibreOffice step, killed at its 5-minute cap. Not a code failure: the runner's azure.archive.ubuntu.com mirror served the ~100 MB of .debs at ~35 KB/s while metadata stayed fast. Acquire::Retries can't help, since a slow transfer never errors. - Resolve the exact package set after `apt-get update` and key an actions/cache entry on the .deb filenames (name_version_arch, not URIs, so a mirror switch doesn't change the key). restore-keys gives partial hits; apt fetches only what's missing and verifies every cached .deb against the signed index. - Download-only with a per-attempt timeout; a stalled first attempt rewrites the mirrorlist to archive.ubuntu.com and retries. Install then runs with --no-download, so a timeout never interrupts dpkg. - Save right after download (not post-job) so a red test run still warms the cache; autoclean before saving so old versions don't accumulate, and re-key from the lists actually downloaded against. - Job-level `shell: bash` for pipefail, so a failed --print-uris fails the step instead of keying on an empty list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#50, #51 and #52 are red on Integration Tests (LibreOffice), all killed at the 5-minute cap on
Install LibreOffice. That isn't a test failure. The runner'sazure.archive.ubuntu.commirror served the ~100 MB of LibreOffice.debs at ~35 KB/s (the first 7.4 MB package took 3m15s), whileapt-get updatemetadata still came down at 10 MB/s. Healthy runs install in 15–21s.Acquire::Retriesdoesn't help, because a slow transfer never errors.What
.debs withactions/cache/restore+save. The key is built from the resolved package filenames (name_version_arch), so it changes only when Ubuntu ships a new build.restore-keysgives partial hits, so apt downloads only what's missing. apt verifies every cached.debagainst the signed index, so a stale or corrupt entry gets re-fetched, never installed.archive.ubuntu.com,apt-get updateruns again, and the download retries. Install then runs with--no-download, so a timeout can't interrupt dpkg partway through.autocleanruns before the save so old versions don't pile up, and the save key is recomputed from the package lists that were actually downloaded against.shell: bashon the job (pipefail), so a failed--print-urisfails the step instead of producing a key from an empty package list.Verification
This can only be tested on GitHub's runners. The YAML parses locally, but neither actionlint nor Docker is available here. Things to check on this PR's run:
libreoffice-debs-ubuntu-26.04-X64-….debdownloads in the Download stepReviewed with
/code-review --fix(6 of 8 findings fixed). The two skipped: Resolve'sapt-get updatehas no mirror fallback, since metadata stayed fast during the stall; and the mirror switch isn't checked against future runner images.🤖 Generated with Claude Code