Skip to content

ci: the Rust install is tried three times, so a failed download does not turn a job red (#1457) - #1506

Merged
DrunkOnJava merged 3 commits into
mainfrom
ci/setup-rust-retry
Nov 6, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
ci/setup-rust-retry

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

rustup toolchain install failed once on full / build + real files / macos-26 / stable on #1483 at 1811752 with "could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256'", with nothing wrong in the code. rustup's own retries are over in seconds. #1491 put the install in one composite action, so one change now covers every job.

The install is tried three times, 20 s and 40 s apart, each failure leaving a warning. A toolchain that really can't be installed still fails the job, with an error, about a minute later.

The one other rustup download in CI, rustup component add rustfmt in ifcopenshell-validate, moves into that job's setup step as component: rustfmt, so it goes through the same retry.

Cache keys don't move: no toolchain and no environment variable changes, and Swatinem/rust-cache v2.9.3 hashes neither the action file nor the installed components. Every rust-cache key on this PR's CI run 42134631531 equals the same job's on main's run 42131995046, the IfcOpenShell job's included (v0-rust-ci-release-Linux-x64-cdee7d24-2ff012fc).

Refs #1457.

Verification

  • The action's run block, run under bash --noprofile --norc -eo pipefail (as GitHub runs shell: bash) against a fake rustup, rustc and sleep:
    • 0 failures: exit 0, 1 install, no sleep.
    • 2 failures: exit 0, 3 installs, sleeps of 20 and 40, default set, 2 lines in GITHUB_ENV.
    • 3 and 9 failures: exit 1, 3 installs, the error annotation, no default set, nothing in GITHUB_ENV.
  • actionlint exits 0.
  • Not measured: a real download failure on a runner. tools/ci/check-workflows.py wasn't run locally (no PyYAML here); CI runs it.

No output, src/ or gate file changes, so no Measure.

@DrunkOnJava DrunkOnJava added the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 5, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 6, 2026 00:08
@DrunkOnJava DrunkOnJava removed the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 6, 2026
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 6, 2026 00:41
@DrunkOnJava
DrunkOnJava merged commit 1fa232a into main Nov 6, 2026
39 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/setup-rust-retry branch November 6, 2026 02:03
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