Repository navigation
ci: fall back across Ubuntu mirrors when installing valgrind - #345
Conversation
archive.ubuntu.com stopped answering from the runners, so Install valgrind failed on every attempt and Checks, tests and replay failed before any check ran. apt now tries the runner's own mirror first, then archive.ubuntu.com, then mirrors.edge.kernel.org, and still verifies the archive's signatures.
When no mirror serves valgrind, the step now ends with an error annotation saying the failure is the infrastructure's, not the change's, and that the job should be rerun once a mirror answers.
kvlonge
left a comment
There was a problem hiding this comment.
Independent review of 2bfdb64 (both commits). No blocking findings.
Signatures. The fallbacks rewrite only the source URIs. Each stanza keeps its Signed-By keyring, and nothing adds trusted=yes or --allow-unauthenticated. mirrors.edge.kernel.org serves Ubuntu's own signed InRelease for noble, noble-updates, noble-security and noble-backports (checked by fetching each), so apt verifies it against the same key.
No success without valgrind. The step reaches exit 0 only after apt-get install ... valgrind returns 0. If every mirror fails, it ends with exit 1. The instruction-count guard is unchanged: make check-merge runs it, and count_instructions.rs:25-34 errors with "cannot run valgrind" when the binary is missing, so the guard cannot be skipped.
Failure message. The final ::error title=Infrastructure failure:: names all three mirrors and says the failure is infrastructure, not the change.
Source in the log. apt prints the mirror it actually used. The cancelled run for 99d44fc shows Hit:2 http://azure.archive.ubuntu.com/ubuntu noble InRelease, and every pocket was fetched from the runner's Azure mirror in 1 s.
Non-blocking:
- A line such as
echo "valgrind source: $mirror"beforeexit 0would name the winning fallback in one line, so readers would not need to scan apt'sGet:/Hit:lines. - The Verification note says the security pocket stays on security.ubuntu.com. On the runner, the image already points the security stanza at
mirror+file:(actions/runner-imagesconfigure-apt-sources.sh), so a fallback moves security to the chosen mirror. Both fallback mirrors carry noble-security, so this is harmless. - The step runs under
bash -ewithout pipefail. Ifsedfailed in the rewrite pipeline,xargswould return 123 and the step would stop before trying the next mirror, without the infrastructure message. This is very unlikely, and the change only moved this existing pattern.
Why
archive.ubuntu.com stopped answering from GitHub's runners (connection failed over IPv4, network unreachable over IPv6). The Install valgrind step points apt only at that host, so Checks, tests and replay fails before any check runs on every pull request.
Changes
apt-get installfinds no valgrind.Verification
mirror+file:, so a fallback moves it to the chosen mirror, which carries noble-security too.bash -n, and the clutter guard passes.