Skip to content

ci: disable Swatinem/rust-cache cache-bin to fix flaky macos rust jobs#945

Merged
fansenze merged 1 commit into
mainfrom
fix/ci-disable-rust-cache-bin-20260515
May 15, 2026
Merged

ci: disable Swatinem/rust-cache cache-bin to fix flaky macos rust jobs#945
fansenze merged 1 commit into
mainfrom
fix/ci-disable-rust-cache-bin-20260515

Conversation

@fansenze
Copy link
Copy Markdown
Contributor

Summary

  • Set cache-bin: 'false' on the Swatinem/rust-cache step in Test Rust so the macOS Rust job stops failing intermittently with error: unexpected argument 'fmt' found / Usage: rustup-init[EXE] [OPTIONS].
  • Add an inline comment so the workaround can be removed once the upstream issues are fixed.

Why

The new GitHub macOS runner image (20260511.0048+) ships a Homebrew rustup whose ~/.cargo/bin/cargo is a broken rustup-init shim. Since Swatinem/rust-cache v2.8 enabled cache-bin: true by default (Swatinem/rust-cache#325), the shim is cached and restored across runs, so cargo fmt / cargo clippy resolve to rustup-init and 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. runs 25898979192, 25848992830, 25847270202).

Tracked upstream:

The reporter of #341 confirmed cache-bin: 'false' restores green builds. Impact on cache hit rate is negligible (only ~/.cargo/bin is excluded; workspace target/ caching is unchanged).

Test plan

  • CI green on this PR (especially Test Rust (macos-latest))
  • Re-run a few times to confirm the flake is gone across runner pool members

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.
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@fansenze fansenze merged commit c51ae8c into main May 15, 2026
13 checks passed
@fansenze fansenze deleted the fix/ci-disable-rust-cache-bin-20260515 branch May 15, 2026 07:16
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)
  ...
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