Skip to content

Set cache-bin: false on Swatinem/rust-cache to fix broken cargo on macos-latest#2978

Merged
albertlockett merged 1 commit into
open-telemetry:mainfrom
cijothomas:fix-rust-cache-macos-cargo-broken
May 14, 2026
Merged

Set cache-bin: false on Swatinem/rust-cache to fix broken cargo on macos-latest#2978
albertlockett merged 1 commit into
open-telemetry:mainfrom
cijothomas:fix-rust-cache-macos-cargo-broken

Conversation

@cijothomas
Copy link
Copy Markdown
Member

Problem

CI clippy (*, macos-latest) (and other macOS rust steps) started failing today across many PRs with:

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

Root cause

GitHub rolled out a new macos-latest runner image today (actions/runner-images#14037) that changed how the rustc/cargo rustup proxy binaries are set up. Combined with Swatinem/rust-cache#325 (which made cache-bin: true the default in v2.8+), the cached $CARGO_HOME/bin/ from previous runs gets restored over the freshly-installed proxies, leaving cargo dispatching to rustup-init behavior instead of the real cargo.

Tracked upstream: Swatinem/rust-cache#341.

Fix

Set cache-bin: false on all 7 Swatinem/rust-cache invocations in .github/workflows/rust-ci.yml. This is the workaround confirmed by the upstream issue reporter. We don't cargo install any binaries that need caching, so this loses no useful caching.

@cijothomas cijothomas requested a review from a team as a code owner May 14, 2026 18:35
@github-actions github-actions Bot added the ci-repo Repository maintenance, build, GH workflows, repo cleanup, or other chores label May 14, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.90%. Comparing base (300c873) to head (4873907).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2978      +/-   ##
==========================================
- Coverage   85.91%   85.90%   -0.01%     
==========================================
  Files         725      725              
  Lines      275426   275426              
==========================================
- Hits       236624   236614      -10     
- Misses      38278    38288      +10     
  Partials      524      524              
Components Coverage Δ
otap-dataflow 87.03% <ø> (-0.01%) ⬇️
query_abstraction 80.61% <ø> (ø)
query_engine 89.57% <ø> (ø)
otel-arrow-go 52.45% <ø> (ø)
quiver 92.25% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@albertlockett albertlockett added this pull request to the merge queue May 14, 2026
Merged via the queue into open-telemetry:main with commit 40b4f4d May 14, 2026
85 checks passed
guancioul pushed a commit to guancioul/otel-arrow that referenced this pull request May 16, 2026
…cos-latest (open-telemetry#2978)

## Problem

CI `clippy (*, macos-latest)` (and other macOS rust steps) started
failing today across many PRs with:

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

## Root cause

GitHub rolled out a new macos-latest runner image today
([actions/runner-images#14037](actions/runner-images#14037))
that changed how the `rustc`/`cargo` rustup proxy binaries are set up.
Combined with
[Swatinem/rust-cache#325](Swatinem/rust-cache#325)
(which made `cache-bin: true` the default in v2.8+), the cached
`$CARGO_HOME/bin/` from previous runs gets restored over the
freshly-installed proxies, leaving `cargo` dispatching to `rustup-init`
behavior instead of the real cargo.

Tracked upstream:
[Swatinem/rust-cache#341](Swatinem/rust-cache#341).

## Fix

Set `cache-bin: false` on all 7 `Swatinem/rust-cache` invocations in
`.github/workflows/rust-ci.yml`. This is the workaround confirmed by the
upstream issue reporter. We don't `cargo install` any binaries that need
caching, so this loses no useful caching.
guancioul pushed a commit to guancioul/otel-arrow that referenced this pull request May 16, 2026
…cos-latest (open-telemetry#2978)

## Problem

CI `clippy (*, macos-latest)` (and other macOS rust steps) started
failing today across many PRs with:

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

## Root cause

GitHub rolled out a new macos-latest runner image today
([actions/runner-images#14037](actions/runner-images#14037))
that changed how the `rustc`/`cargo` rustup proxy binaries are set up.
Combined with
[Swatinem/rust-cache#325](Swatinem/rust-cache#325)
(which made `cache-bin: true` the default in v2.8+), the cached
`$CARGO_HOME/bin/` from previous runs gets restored over the
freshly-installed proxies, leaving `cargo` dispatching to `rustup-init`
behavior instead of the real cargo.

Tracked upstream:
[Swatinem/rust-cache#341](Swatinem/rust-cache#341).

## Fix

Set `cache-bin: false` on all 7 `Swatinem/rust-cache` invocations in
`.github/workflows/rust-ci.yml`. This is the workaround confirmed by the
upstream issue reporter. We don't `cargo install` any binaries that need
caching, so this loses no useful caching.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-repo Repository maintenance, build, GH workflows, repo cleanup, or other chores

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants