Repository navigation
rust/tools: Per-checkout Docker volume for Tier 2 - #163
Merged
Merged
Conversation
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"}
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.
Fixes #135
rust/tools/linux-validate/run.shmounted one fixed volume,obs-rust-linux-validate-build, as/buildfor 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 withENABLE_RUST_LIBOBS=OFF. This happened several times this week.RED:
ci: RED test for a per-checkout Tier 2 build volumeNew
ci/test_tier2_run.pyrunsrun.shfrom two throwaway checkouts, with stubdockerandgiton PATH that record their arguments, so no container starts. On master, 3 of 4 tests fail:/buildvolume;/ccachemount;OBS_TIER2_VOLUMEis ignored.GREEN:
rust/tools: Give each checkout its own Tier 2 build volumeobs-rust-linux-validate-build-<sha256(checkout path)[:12]>. It usessha256sum, orshasumon macOS.OBS_TIER2_VOLUMEoverrides the name.obs-rust-linux-validate-ccachevolume, so a new checkout doesn't start cold.OBS_CCACHE_DIR(CI) still takes precedence.docker volume ls --filter name=obs-rust-linux-validate-.Evidence
python3 -m unittest ci/test_tier2_run.py: 4 tests OK.obs-rust-linux-validate-build-03ce5a7a87e5plusobs-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.