mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-03 07:57:22 +00:00
Use the nsyte baked into the runner image
Falls back to downloading it, so the workflow still runs on a coordinator whose image does not carry it.
This commit is contained in:
1 parent
0d73c79d4c
commit
fd23c10f20
1 file changed
+27
-25
@@ -51,31 +51,33 @@ jobs:
|
||||
# Pin the binary. An unversioned install has been observed pulling
|
||||
# 0.10.1, which emits legacy kind-34128 events that every current
|
||||
# gateway ignores while still reporting a successful deploy.
|
||||
# This 115 MB download is the single flakiest thing in the job: from
|
||||
# this coordinator it fails perhaps half the time, mid-transfer, with
|
||||
# "SSL_read: decryption failed or bad record mac". curl's own --retry
|
||||
# is not enough because every attempt breaks the same way, so the
|
||||
# whole fetch is retried in a loop, forcing HTTP/1.1 (the fault has
|
||||
# the shape of an HTTP/2 framing problem) and proving the binary
|
||||
# actually runs before accepting it. A truncated download otherwise
|
||||
# surfaces much later as a confusing nsyte error.
|
||||
#
|
||||
# The durable fix is to bake nsyte into the coordinator's CI image,
|
||||
# the way it already pre-bakes the other toolchains.
|
||||
NSYTE_URL=https://github.com/sandwichfarm/nsyte/releases/download/v0.27.2/nsyte-linux-0.27.2
|
||||
ok=""
|
||||
for attempt in 1 2 3 4 5; do
|
||||
if curl -fsSL --http1.1 --retry 2 --retry-delay 5 --retry-all-errors \
|
||||
--connect-timeout 20 --max-time 900 -o /usr/local/bin/nsyte "$NSYTE_URL" \
|
||||
&& chmod +x /usr/local/bin/nsyte \
|
||||
&& nsyte --version; then
|
||||
ok=yes
|
||||
break
|
||||
fi
|
||||
echo "nsyte download attempt $attempt failed; retrying in 10s"
|
||||
sleep 10
|
||||
done
|
||||
test -n "$ok" || { echo "could not download a working nsyte after 5 attempts"; exit 1; }
|
||||
# nsyte is baked into the coordinator's CI image, alongside zsp and
|
||||
# the rest (armada's .ngit/ci-image/Dockerfile). Downloading it at
|
||||
# job time is the fallback for a coordinator that does not have it,
|
||||
# and is exactly what kept failing here: the 115 MB release asset
|
||||
# broke mid-transfer with "SSL_read: decryption failed or bad record
|
||||
# mac", identically on every attempt within a run, taking
|
||||
# deploy-nsite down across every repo. Hence the loop, HTTP/1.1, and
|
||||
# running the binary before trusting it.
|
||||
if command -v nsyte >/dev/null 2>&1; then
|
||||
echo "using the nsyte baked into the runner image"
|
||||
else
|
||||
NSYTE_URL=https://github.com/sandwichfarm/nsyte/releases/download/v0.27.2/nsyte-linux-0.27.2
|
||||
ok=""
|
||||
for attempt in 1 2 3 4 5; do
|
||||
if curl -fsSL --http1.1 --retry 2 --retry-delay 5 --retry-all-errors \
|
||||
--connect-timeout 20 --max-time 900 -o /usr/local/bin/nsyte "$NSYTE_URL" \
|
||||
&& chmod +x /usr/local/bin/nsyte \
|
||||
&& nsyte --version >/dev/null; then
|
||||
ok=yes
|
||||
break
|
||||
fi
|
||||
echo "nsyte download attempt $attempt failed; retrying in 10s"
|
||||
sleep 10
|
||||
done
|
||||
test -n "$ok" || { echo "could not download a working nsyte after 5 attempts"; exit 1; }
|
||||
fi
|
||||
nsyte --version
|
||||
|
||||
nsyte validate
|
||||
|
||||
|
||||
Reference in new issue
Block a user