Skip to content

rust/tools: Per-checkout Docker volume for Tier 2 - #163

Merged
zackees merged 2 commits into
masterfrom
fix/tier2-volume-per-checkout
Oct 10, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/tier2-volume-per-checkout

Conversation

@zackees

@zackees zackees commented Oct 10, 2026

Copy link
Copy Markdown
Member

Fixes #135

rust/tools/linux-validate/run.sh mounted one fixed volume, obs-rust-linux-validate-build, as /build for every checkout and worktree. A run could therefore link another branch's stale objects or Rust staticlib, and fail with bogus undefined-reference or multiple-definition errors, even with ENABLE_RUST_LIBOBS=OFF. This happened several times this week.

RED: ci: RED test for a per-checkout Tier 2 build volume

New ci/test_tier2_run.py runs run.sh from two throwaway checkouts, with stub docker and git on PATH that record their arguments, so no container starts. On master, 3 of 4 tests fail:

  • both checkouts get the same /build volume;
  • there is no /ccache mount;
  • OBS_TIER2_VOLUME is ignored.

GREEN: rust/tools: Give each checkout its own Tier 2 build volume

  • The build volume is obs-rust-linux-validate-build-<sha256(checkout path)[:12]>. It uses sha256sum, or shasum on macOS. OBS_TIER2_VOLUME overrides the name.
  • ccache moves to a shared obs-rust-linux-validate-ccache volume, so a new checkout doesn't start cold. OBS_CCACHE_DIR (CI) still takes precedence.
  • Cleanup is documented in the script header: docker volume ls --filter name=obs-rust-linux-validate-.

Evidence

  • python3 -m unittest ci/test_tier2_run.py: 4 tests OK.
  • With real Docker, the local gate passed and created obs-rust-linux-validate-build-03ce5a7a87e5 plus obs-rust-linux-validate-ccache. Stamped.

Follow-up: once #161 lands, the gate's lint lane should run unittest discover -s ci -p 'test_*.py' so this test runs too.

zackees and others added 2 commits October 10, 2026 16:31
run.sh mounts the fixed volume obs-rust-linux-validate-build as /build
for every checkout, so a run can link another branch's stale objects or
Rust staticlib. The test runs run.sh from two throwaway checkouts with
stub docker/git and asserts distinct /build volumes, a shared /ccache
and an OBS_TIER2_VOLUME override.

Refs #135

Co-Authored-By: Claude Opus 5.5 <[email protected]>
run.sh mounted one fixed volume, obs-rust-linux-validate-build, as /build
for every checkout and worktree, so a run could link another branch's
stale objects or Rust staticlib and fail with bogus undefined-reference
or multiple-definition errors (even with ENABLE_RUST_LIBOBS=OFF). Name
the build volume after a hash of the checkout path (OBS_TIER2_VOLUME
overrides it) and move ccache to a shared obs-rust-linux-validate-ccache
volume, so a new checkout does not start cold.

Refs #135

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Local-Gate: v1 tree=810cbe7079f6e3521054ea43ce6fea0dfff5c5a1 secs=169 lanes=lint:run,rust-test:run,tier2-linux:run
Ci-Attestation: {"at":1791675262,"gate":"rust/all/fmt","host":"linux-x86_64","key":"b3dc588fb719bae151798fbb24d672c1aa0cbf7319502f2b84bab8079612e47e","lane":"lint","parents":["71f04f050f43620e3db5db3d7e7c03136ad0a251"],"secs":32,"stamp":"395d0ebc202451685880dd0cc96f30af","tree":"810cbe7079f6e3521054ea43ce6fea0dfff5c5a1","v":1,"via":"run"}
Ci-Attestation: {"at":1791675262,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"b3dc588fb719bae151798fbb24d672c1aa0cbf7319502f2b84bab8079612e47e","lane":"lint","parents":["71f04f050f43620e3db5db3d7e7c03136ad0a251"],"secs":32,"stamp":"80c3f4b5bc1ca35fb65274d82f476349","tree":"810cbe7079f6e3521054ea43ce6fea0dfff5c5a1","v":1,"via":"run"}
Ci-Attestation: {"at":1791675262,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"5cff5025882aea6a0d9255c1e259ce4ca90238bc5487ecca2da94ec7a27cb704","lane":"rust-test","parents":["71f04f050f43620e3db5db3d7e7c03136ad0a251"],"secs":49,"stamp":"553490d600c826a318da40c983473ffa","tree":"810cbe7079f6e3521054ea43ce6fea0dfff5c5a1","v":1,"via":"run"}
Ci-Attestation: {"at":1791675262,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"834abb411cc49356c1d267ecffcdc2c9cec088faa39fcd5c96475793370d015d","lane":"tier2-linux","parents":["71f04f050f43620e3db5db3d7e7c03136ad0a251"],"secs":88,"stamp":"8de1fbd626488c335cab676471643aa3","tree":"810cbe7079f6e3521054ea43ce6fea0dfff5c5a1","v":1,"via":"run"}
@zackees
zackees merged commit 4492d27 into master Oct 10, 2026
20 checks passed
@zackees
zackees deleted the fix/tier2-volume-per-checkout branch October 26, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

infra: Use a per-checkout Docker volume for the Tier 2 build

1 participant