fix(ci): disable cargo-bin cache on kpm-build to stop stale rustup-init shim (#134)#220
Merged
Merged
Conversation
…it shim (#134) Swatinem/rust-cache@v2 intermittently restored a stale `cargo` shim into ~/.cargo/bin on the macOS kpm-build runner. The cached shim resolved to `rustup-init`, so `cargo build` was parsed as `rustup-init build` and the job failed non-deterministically. Linux and Windows were unaffected. Set `cache-bin: false` on this job's cache step. kpm-build installs no cargo-managed binaries, so disabling bin caching removes the flake at no cost to cache effectiveness. Refs #134 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Disable
~/.cargo/bincaching on thekpm-buildjob so a stalecargoshim can no longer be restored on the macOS runner.
The
kpm-build (macos-latest)job flaked intermittently withrustup-init: unexpected argument 'build' found:Swatinem/rust-cache@v2(with the default
cache-bin: true) restored a cached~/.cargo/bincontaining a
cargoshim that resolved torustup-init, overwriting thefresh binary just installed by
dtolnay/rust-toolchain@stable. Subsequentcargo buildinvocations were then parsed asrustup-init buildand thejob failed. Linux and Windows were unaffected; the failure was
non-deterministic (depended on which cache the runner restored).
Setting
cache-bin: falseon this job's cache step stops the binaries(including the rustup proxy shim) from being cached at all.
kpm-buildinstalls no cargo-managed tools, so this removes the flake at no cost to
cache effectiveness — only the registry/build caches matter here.
Verification happens in CI itself: the macOS leg of this PR's
kpm-buildmatrix exercises the changed step.
Refs #134
🤖 Generated with Claude Code