Skip to content

fix: disable cache-bin in rust-cache to fix macos-15 cargo#5897

Merged
max-sixty merged 2 commits into
mainfrom
fix/ci-25882534028
May 14, 2026
Merged

fix: disable cache-bin in rust-cache to fix macos-15 cargo#5897
max-sixty merged 2 commits into
mainfrom
fix/ci-25882534028

Conversation

@prql-bot
Copy link
Copy Markdown
Collaborator

Problem

The tests workflow on main has been failing on the macos-15, aarch64-apple-darwin matrix legs (run 25882534028, and earlier run 25867121979 closed as transient in #5886). Same shape both times — after Swatinem/rust-cache@v2 restores its cache, /Users/runner/.cargo/bin/cargo resolves to rustup-init (the installer) instead of the rustup proxy, so every subsequent cargo invocation dies with:

error: error: unexpected argument 'build' found
Usage: rustup-init[EXE] [OPTIONS]

Root cause is upstream and not transient: Swatinem/rust-cache#341 ("cache-bin: true breaks cargo subcommands on new github macos runner"), filed 2026-05-13 against a new macos-15 runner image rollout (actions/runner-images#14037). The fix the upstream issue documents is cache-bin: "false".

Solution

Set cache-bin: "false" on every Swatinem/rust-cache@v2 invocation in the repo (11 sites across workflows and composite actions). This stops ~/.cargo/bin/ from being restored from cache, so the rustup-managed cargo/rustc symlinks installed by the prior rustup target add step survive intact.

This loses nothing in practice — none of our workflows install cargo subcommands to ~/.cargo/bin/. baptiste0928/cargo-install already uses a custom root (/Users/runner/.cargo-install/...) with its own cache, so cargo-insta, cargo-nextest, wasm-pack, mdbook, etc. are unaffected.

Applying it everywhere (not just the failing macos legs) keeps the configuration consistent and protects the Linux/Windows legs from the same issue if the bug surfaces on other runner images.

Testing

Can't reproduce locally (the bug needs a macos-15 runner). The fix is the workaround documented in the upstream issue, and matches what the reporter confirmed unblocked their jobs. CI on this PR will verify the macos legs pass.


Automated fix for failed run 25882534028.

prql-bot and others added 2 commits May 14, 2026 20:26
The new macos-15 runner image causes Swatinem/rust-cache@v2 to restore
a corrupted ~/.cargo/bin/cargo (resolves to rustup-init instead of the
rustup proxy), breaking every subsequent cargo invocation with
'error: unexpected argument <subcommand> found / Usage: rustup-init'.

Upstream-tracked at Swatinem/rust-cache#341
with the workaround being cache-bin: false. Apply it to every
rust-cache invocation in the repo so the bin directory is never
restored from cache.

Co-Authored-By: Claude <noreply@anthropic.com>
Three ubuntu-24.04 rust-cache sites in tests.yaml were missed in the
initial pass (check-links-book, measure-code-cov, test-deps-min-versions).
The bug currently only fires on macos-15, but the PR's stated intent is
to disable cache-bin everywhere for consistency.

Co-Authored-By: Claude <noreply@anthropic.com>
@prql-bot
Copy link
Copy Markdown
Collaborator Author

The same failure recurred on the next push to main: run 25886221899 on commit 815cbd1 — identical shape on build-prqlc-c (macos-15, aarch64-apple-darwin, default,test-dbs), cargo resolving to rustup-init after the rust-cache restore. Just bumping the failure count, no other action needed — this PR's fix still applies as-is.

@max-sixty max-sixty merged commit 793913b into main May 14, 2026
78 checks passed
@max-sixty max-sixty deleted the fix/ci-25882534028 branch May 14, 2026 23:01
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.

2 participants