Skip to content

[Bugfix] lock Cargo caches during multi-arch builds#676

Merged
slin1237 merged 1 commit into
mainfrom
fix-cargo-build
Jul 21, 2026
Merged

[Bugfix] lock Cargo caches during multi-arch builds#676
slin1237 merged 1 commit into
mainfrom
fix-cargo-build

Conversation

@pallasathena92

@pallasathena92 pallasathena92 commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

  • Configures the Cargo registry and Git cache mounts with sharing=locked.
  • Prevents concurrent amd64 and arm64 builds from modifying the same Cargo cache.
  • Preserves dependency caching while avoiding corrupted crate and xet-core checkouts.

Why we need it

The model-agent image builds both platforms concurrently. BuildKit cache mounts default to shared access, allowing both Cargo processes to modify the same registry and Git checkout.

This intermittently caused missing files such as:

failed to stat '/root/.cargo/git/checkouts/xet-core-.../git_xet/src/git_repo.rs'

Related failure: https://github.com/ome-projects/ome/actions/runs/29587912083/job/87909374980

How to test

Checklist

  • Tests added/updated (if applicable)
  • Docs updated (if applicable)
  • make test passes locally

@github-actions github-actions Bot added the docker Dockerfile changes label Jul 18, 2026
@slin1237
slin1237 merged commit ffa0ef6 into main Jul 21, 2026
14 checks passed
@slin1237
slin1237 deleted the fix-cargo-build branch July 21, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Dockerfile changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants