Skip to content

ci: retry every network fetch in the workflow - #921

Merged
Mearman merged 4 commits into
mainfrom
fix/curl-retry
Nov 26, 2026
Merged

Mearman merged 4 commits into
mainfrom
fix/curl-retry

Conversation

@Mearman

@Mearman Mearman commented Nov 26, 2026

Copy link
Copy Markdown
Member

The install.sh verify jobs and the Homebrew bootstrap fetched with a plain curl -fsSL, so one dropped HTTP/2 stream failed the job and, through the aggregate, turned main red. The three calls now use --retry 6 --retry-delay 5 --retry-all-errors, as the checksum fetches already do.

A test over the workflow fails when a curl step lacks --retry. It failed on exactly those three lines before the change.

Fixes #920

The install.sh verify jobs and the Homebrew bootstrap fetched with a plain curl, so
one dropped stream failed the job and turned main red. A test over the workflow now
fails when a curl step lacks --retry.

Fixes #920
A retry after a dropped stream appends the whole body to the part already received
when curl writes into a command substitution, so the retried script would run
garbled. Each script is written to a file, which a retry truncates, and run from
there. The workflow test now requires --retry as its own flag and refuses a retried
download fed straight into a shell.

Refs #920
…not a file name ending in .sh

The workflow guard now sees curl output fed to a shell through a command substitution,
a pipe or a process substitution, with or without a path before the shell, and no
longer mistakes install.sh in a URL for one.

Refs #920
…t real line numbers

The pipe form now sees curl piped into sudo bash, env sh or /bin/bash, and a failing
workflow test names the physical line a command starts on, not an index into the
joined text.

Refs #920
@Mearman

Mearman commented Nov 26, 2026

Copy link
Copy Markdown
Member Author

Review of head 53dcd15 was clean. Three non-blocking notes are left as deliberate No decisions, each checked against the workflow:

  • A comment line ending in a backslash would join the next line into the comment, so a real curl there would go unchecked. Shell does not continue a comment that way, and no such line exists in ci.yml. Revisit if a workflow gains a comment ending in a backslash.
  • curl | sudo env FOO=1 bash, curl | sudo -u root bash and curl | xargs sh are not matched by the pipe check. None appears in the workflow. Revisit if a step needs an environment assignment or a user switch before the shell.
  • A backslash on the last line of the file would drop the pending command. ci.yml ends with a plain command, so this cannot occur today. Revisit if the workflow's last line becomes a continuation.

@Mearman
Mearman merged commit 72e1105 into main Nov 26, 2026
38 checks passed
@Mearman
Mearman deleted the fix/curl-retry branch November 26, 2026 18:39
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.

CI downloads from the network without retrying, so one dropped stream turns main red

1 participant