Skip to content

Avoid Cargo cache cleanup races on macOS - #1777

Merged
ludfjig merged 1 commit into
hyperlight-dev:mainfrom
ludfjig:fix_cache_issue_macos
Aug 27, 2026
Merged

Avoid Cargo cache cleanup races on macOS#1777
ludfjig merged 1 commit into
hyperlight-dev:mainfrom
ludfjig:fix_cache_issue_macos

Conversation

@ludfjig

@ludfjig ludfjig commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

We have mutliple macos runners running concurrently on the same machine. https://github.com/swatinem/rust-cache has a known issue where ~/.cargo/bin gets cleared, which can interfere with concurrent jobs. This fix applies the recommended workaround which is to not cache (and therefore not clean) ~/.cargo/bin

This fix covers DailyArm64.yml and ValidatePullRequest.yml, which are the only jobs running macos concurrently with caching enabled.

closes #1744

Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR mitigates race conditions on self-hosted macOS runners where concurrent jobs can interfere with each other via ~/.cargo/bin cleanup performed by Swatinem/rust-cache, potentially removing Cargo for another job. It applies the upstream-recommended workaround by disabling caching (and thus cleanup) of ~/.cargo/bin on macOS while retaining caching elsewhere.

Changes:

  • Disable Swatinem/rust-cache cache-bin on macOS to prevent cross-job removal of ~/.cargo/bin.
  • Add an inline comment documenting why macOS is treated differently.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ludfjig ludfjig added kind/bugfix For PRs that fix bugs area/infrastructure Concerns infrastructure rather than core functionality labels Aug 27, 2026
@ludfjig
ludfjig merged commit 77bbe9a into hyperlight-dev:main Aug 27, 2026
91 of 99 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/infrastructure Concerns infrastructure rather than core functionality kind/bugfix For PRs that fix bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Daily aarch64 Failure - 49

5 participants