Skip to content

fix(install): retry transient HTTP errors on the wget path, and cut 0.14.0 - #492

Merged
scttfrdmn merged 8 commits into
mainfrom
fix/install-sh-wget-retry
Sep 15, 2026
Merged

scttfrdmn merged 8 commits into
mainfrom
fix/install-sh-wget-retry

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

The defect

install.sh's fetch() has two branches and they were not equivalent. Measured against a server
returning two 503s and then a 200:

fetch() branch HTTP 503 HTTP 429 HTTP 403
curl -fsSL --retry 3 (before, unchanged) recovered recovered fails (correct)
wget -q -O (before) fails immediately, exit 8 fails immediately, exit 8 fails (correct)
wget + --retry-on-http-error (after) recovered recovered fails (correct)

wget's --tries covers network-level failures only — a response that arrives carrying an error status
is not a failed attempt as far as wget is concerned, so its default of 20 tries retried a 503 exactly
zero times.

The asymmetry was invisible because each container in the install-script matrix exercises exactly one
branch: RHEL-family images ship curl, ubuntu:24.04 is given wget. It surfaced as an intermittent
failure on a required check — the post-merge run on bbc94ec reported

error: objectfs-linux-amd64.tar.gz exists for v0.13.0 but its .sha256 does not,
so the download cannot be verified. Refusing to install an unverified binary

against a release whose five .sha256 files were all present at 94 bytes each. Correct code reaching
a wrong conclusion from a fetch that gave up instantly. Re-running the identical commit went green,
which is what identified it as the flake rather than a defect in that merge.

Release-asset downloads are unauthenticated, GitHub rate limits them by IP, and a shared runner shares
that IP — so a user behind a busy NAT got the same answer.

What changed

  • Both wget call sites (fetch and resolve_latest) pass --tries=4 --waitretry=1 --retry-connrefused --retry-on-http-error=429,500,502,503,504.
  • 403 stays fatal on both paths. It is an authorization answer, not a transient one, and curl does
    not retry it either.
  • The flag is probed, not assumed, because an unrecognised option makes wget exit 2 without
    downloading. The probe matches with case rather than a pipe into grep, so it depends on no
    command but wget — the first harness for it ran under a PATH holding only wget, grep was
    therefore absent, the probe reported the capability as missing, and the measurement showed the fix
    not working.

Verification

  • Measured, not reasoned: the table above is install.sh's own fetch() run against a local
    server, with PATH restricted so each branch is the one actually exercised.
  • Mutation: 7/7 caught, each at a distinct intended assertion — drop the flag; drop 429; drop 503;
    add 403; strip the flags from resolve_latest's call site; replace case with a grep pipeline;
    remove curl's own --retry.
    Two of those survived the first version of the test, both because the assertion matched the file and
    the file contains comments naming curl -fsSL --retry 3 and wget_retry_flags. The assertions now
    run over comment-stripped command lines with a floor on how many were found.
  • shellcheck clean, gofmt clean, go vet clean, golangci-lint 0 issues, go test -race ./...
    passes.

Also: 0.14.0

Version constant 0.13.0 → 0.14.0, Unreleased promoted to [0.14.0] - 2026-09-15.

The v0.14.0 milestone closed at 14 of 14, with its two remaining items moved to Future Work
rather than finished: the /sbin/mount.objectfs fstab helper (#136), which was deferred deliberately,
and the Rocky Linux 9 install-to-fstab CI job that depends on it (#149). The release notes say so
rather than letting the version number imply they shipped. #138 is closed.

Worth noting for the ordering: the v0.15.0 — Test Harness, Coverage & Build Hygiene milestone was
already closed while v0.14.0 was still open, so that work is in this release too.

Tagging v0.14.0 after this merges is what produces the .deb and .rpm release assets — the actual
packaging deliverable, with no repository to add.

fetch()'s two branches were not equivalent. Measured against a server returning two 503s and then a
200, `curl -fsSL --retry 3` recovers and `wget -q -O` fails on the first response with exit 8; same
for 429. wget's --tries covers network-level failures only, so a response that arrives carrying an
error status is not a failed attempt and its default of 20 tries retried a 503 zero times.

The asymmetry was invisible because each container in the install-script matrix exercises exactly one
branch: RHEL-family images have curl, ubuntu:24.04 is given wget. It surfaced as a one-in-ten flake
on a required check, reporting "objectfs-linux-amd64.tar.gz exists for v0.13.0 but its .sha256 does
not" against a release whose five .sha256 files were all present at 94 bytes each — correct code
reaching a wrong conclusion from a fetch that gave up instantly. Release-asset downloads are
unauthenticated and GitHub rate limits them by IP, which a shared runner shares.

403 stays fatal on both paths: it is an authorization answer, not a transient one.

The flag is probed rather than assumed, since an unrecognised option makes wget exit 2 without
downloading. The probe matches with `case` rather than a pipe into grep so it depends on no command
but wget — the first harness for it ran under a PATH holding only wget, grep was absent, and the
probe reported the fix as not working.
Two mutations survived the first version: deleting curl's --retry, and stripping the flags from
resolve_latest's wget call. Both passed because the assertions matched the file, and the file contains
comments naming `curl -fsSL --retry 3` and wget_retry_flags. Asserting over the comment-stripped
command lines, with a floor on how many were found, catches both.
Promotes Unreleased to [0.14.0] and bumps the version constant, which is the only authority for the
version.

The v0.14.0 milestone closed at 14 of 14 with its two remaining items moved to Future Work rather
than finished — the fstab helper (#136), which was deferred deliberately, and the Rocky Linux 9
install-to-fstab CI job that depends on it (#149). The release notes say so instead of letting the
version number imply otherwise.
The heading said 2026-09-15 while the tag goes up on 2026-09-14, so the entry claimed a release
date one day in the future. Keep a Changelog's date is the release date; a future one is not a
rounding difference, it is a record that disagrees with the tag it describes.
@scttfrdmn
scttfrdmn enabled auto-merge (squash) September 15, 2026 05:57
@scttfrdmn
scttfrdmn merged commit ccfb73e into main Sep 15, 2026
43 checks passed
@scttfrdmn
scttfrdmn deleted the fix/install-sh-wget-retry branch September 20, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant