Found while working #672 (PR for #679/#672/#675). Filed, not folded: #672's narrow fix is about a download that fails loudly in the wrong place; this one fails silently in the right place, which needs a different fix.
The finding
Ten steps across two workflows install Clang this way:
wget -qO- https://apt.llvm.org/llvm.sh | sudo bash -s -- ${{ env.CLANG_VERSION }}
nine in .github/workflows/ci.yml (lines 281, 467, 630, 849, 1589, 1855, 2210, 2277 and the new bank-sanitizers job, which copies the same line) and one in .github/workflows/mutation.yml:79.
wget -qO- does not write an error document to stdout. On an HTTP 5xx it exits 8 having written zero bytes. bash then reads an empty script, does nothing, and exits 0. GitHub runs run: under bash -e without pipefail, so the pipeline's status is bash's, not wget's.
The step therefore reports success having installed no compiler.
Verification status: reproduced locally, against a server that returns 503
Not observed in CI. The 503 is synthetic — a local http.server returning 503 Service Unavailable with a short HTML body — but the apt.llvm.org / Launchpad outages #672 records are exactly this condition, and three of them happened in one day.
=== wget -qO- <200> | bash -s -- 22 ===
llvm.sh ran
exit=0
=== wget -qO- <503> | bash -s -- 22 (the outage case) ===
exit=0
=== wget -qO- <503> alone, exit code and stdout bytes ===
wget exit=8
0
The second block is the defect: the same exit code as the first, and no output at all.
Measured on 95aa5686, GNU wget 1.25.0, bash 5.3, Arch Linux. Not verified: the exact wget version on ubuntu-24.04 runners, and whether it differs here (wget's "write the error document" behaviour is --content-on-error, off by default, and has been for a long time — but I did not check the runner's build).
What it costs
Less than a red leg, because the failure is deferred rather than hidden outright: every one of these jobs then configures with an explicit -DCMAKE_CXX_COMPILER=clang++-22, which fails when the compiler is not there. So the leg does go red — at the Configure step, saying the compiler is missing, several steps after the step that was supposed to install it and reported success.
That is #672's complaint in its purest form: the check list, and the log, both name the wrong thing. It is worse than the sccache case in one respect — there, the failing step at least was the installer.
What would resolve it
Any one of:
All three are local to the step and need no CI-wide decision. Ten copies, so whichever is chosen is a ten-line change plus one comment.
What would change the verdict
Close as invalid if wget on the runner image does exit non-zero in a way bash -e propagates, or if it writes the error document so that bash fails on it — either would need checking on ubuntu-24.04 rather than here. Close as wontfix if the deferred Configure failure is judged legible enough.
Related
Found while working #672 (PR for #679/#672/#675). Filed, not folded: #672's narrow fix is about a download that fails loudly in the wrong place; this one fails silently in the right place, which needs a different fix.
The finding
Ten steps across two workflows install Clang this way:
wget -qO- https://apt.llvm.org/llvm.sh | sudo bash -s -- ${{ env.CLANG_VERSION }}nine in
.github/workflows/ci.yml(lines 281, 467, 630, 849, 1589, 1855, 2210, 2277 and the newbank-sanitizersjob, which copies the same line) and one in.github/workflows/mutation.yml:79.wget -qO-does not write an error document to stdout. On an HTTP 5xx it exits 8 having written zero bytes.bashthen reads an empty script, does nothing, and exits 0. GitHub runsrun:underbash -ewithoutpipefail, so the pipeline's status isbash's, notwget's.The step therefore reports success having installed no compiler.
Verification status: reproduced locally, against a server that returns 503
Not observed in CI. The 503 is synthetic — a local
http.serverreturning503 Service Unavailablewith a short HTML body — but the apt.llvm.org / Launchpad outages #672 records are exactly this condition, and three of them happened in one day.The second block is the defect: the same exit code as the first, and no output at all.
Measured on
95aa5686, GNU wget 1.25.0, bash 5.3, Arch Linux. Not verified: the exact wget version onubuntu-24.04runners, and whether it differs here (wget's "write the error document" behaviour is--content-on-error, off by default, and has been for a long time — but I did not check the runner's build).What it costs
Less than a red leg, because the failure is deferred rather than hidden outright: every one of these jobs then configures with an explicit
-DCMAKE_CXX_COMPILER=clang++-22, which fails when the compiler is not there. So the leg does go red — at the Configure step, saying the compiler is missing, several steps after the step that was supposed to install it and reported success.That is #672's complaint in its purest form: the check list, and the log, both name the wrong thing. It is worse than the sccache case in one respect — there, the failing step at least was the installer.
What would resolve it
Any one of:
set -o pipefailat the top of the step, which makeswget's exit 8 the pipeline's;wget -q -O /tmp/llvm.sh+ a non-empty check +sudo bash /tmp/llvm.sh.All three are local to the step and need no CI-wide decision. Ten copies, so whichever is chosen is a ten-line change plus one comment.
What would change the verdict
Close as
invalidifwgeton the runner image does exit non-zero in a waybash -epropagates, or if it writes the error document so thatbashfails on it — either would need checking onubuntu-24.04rather than here. Close aswontfixif the deferred Configure failure is judged legible enough.Related