ci: disable Swatinem/rust-cache cache-bin to fix flaky macos rust jobs#945
Merged
Conversation
The new macos runner image (20260511.0048+) ships a Homebrew rustup whose ~/.cargo/bin/cargo is a broken rustup-init shim. With cache-bin defaulting to true since rust-cache v2.8, the shim gets cached and restored across runs, making `cargo fmt`/`clippy` fail intermittently with: `error: unexpected argument 'fmt' found / Usage: rustup-init[EXE]`. Failure is intermittent because the runner pool still mixes old and new images. Tracked upstream in Swatinem/rust-cache#341 and actions/runner-images#14099.
Contributor
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
eryue0220
added a commit
to eryue0220/rslint
that referenced
this pull request
May 19, 2026
… into feat/jest-expect-expect * 'feat/jest-expect-expect' of github.com:eryue0220/rslint: (22 commits) chore: sync typescript-go submodule to 6a088fbd7 (web-infra-dev#968) chore(deps): update tailwindcss monorepo to ^4.3.0 (web-infra-dev#967) fix: handle exhaustive-deps shorthand references (web-infra-dev#963) feat: port rule @typescript-eslint/no-unnecessary-type-conversion (web-infra-dev#960) feat: port rule @typescript-eslint/no-unnecessary-parameter-property-assignment (web-infra-dev#958) feat: port rule @typescript-eslint/no-unnecessary-qualifier (web-infra-dev#959) feat: port rule @typescript-eslint/no-invalid-this (web-infra-dev#957) feat: port rule @typescript-eslint/no-import-type-side-effects (web-infra-dev#956) feat: port rule @typescript-eslint/init-declarations (web-infra-dev#955) feat: port rule @typescript-eslint/no-confusing-non-null-assertion (web-infra-dev#954) feat: port rule @typescript-eslint/explicit-module-boundary-types (web-infra-dev#953) feat: port rule @typescript-eslint/class-methods-use-this (web-infra-dev#952) feat: port rule @typescript-eslint/no-wrapper-object-types (web-infra-dev#951) feat: port rule @typescript-eslint/no-unsafe-declaration-merging (web-infra-dev#949) feat: port rule @typescript-eslint/no-empty-object-type (web-infra-dev#946) feat: port rule no-unsafe-function-type (web-infra-dev#947) ci: disable Swatinem/rust-cache cache-bin to fix flaky macos rust jobs (web-infra-dev#945) feat: port rule jsx-a11y/prefer-tag-over-role (web-infra-dev#942) feat: port rule jsx-a11y/no-aria-hidden-on-focusable (web-infra-dev#943) chore: sync typescript-go submodule to c282336ea (web-infra-dev#944) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cache-bin: 'false'on theSwatinem/rust-cachestep inTest Rustso the macOS Rust job stops failing intermittently witherror: unexpected argument 'fmt' found / Usage: rustup-init[EXE] [OPTIONS].Why
The new GitHub macOS runner image (
20260511.0048+) ships a Homebrew rustup whose~/.cargo/bin/cargois a brokenrustup-initshim. SinceSwatinem/rust-cachev2.8 enabledcache-bin: trueby default (Swatinem/rust-cache#325), the shim is cached and restored across runs, socargo fmt/cargo clippyresolve torustup-initand fail.The failure is intermittent because the runner pool still mixes old and new images — runs landing on a new image fail, reruns on an old image pass without code changes. This matches recent CI history on
main(e.g. runs25898979192,25848992830,25847270202).Tracked upstream:
cache-bin: truebreaks cargo subcommands on new github macos runner Swatinem/rust-cache#341cargoresolves torustup-initshim instead of toolchain cargo (intermittent) actions/runner-images#14099The reporter of #341 confirmed
cache-bin: 'false'restores green builds. Impact on cache hit rate is negligible (only~/.cargo/binis excluded; workspace target/ caching is unchanged).Test plan
Test Rust (macos-latest))