Repository navigation
bootstrap: a checkout for each pinned commit, so builds with other pins never race - #596
Merged
Merged
Conversation
…ns never race Every build on a machine shared one checkout of each application (OXYOS_CACHE/src/Bloom), and a bootstrap for a tree pinning another commit switched it under a running build: on 11 November a gate's packages failed to bundle on seldon (Bloom's ./social unresolved) because another tree's bootstrap had moved the checkout from e79ca5be to 69df4a88 mid-build. Now each pinned commit has a checkout of its own, never changed once made: checkouts/NAME.git, one clone fetched a commit at a time, and checkouts/NAME/COMMIT, a worktree of it with its packages installed once (COMMIT.ready when complete, COMMIT.used when a bootstrap last named it). env.sh reads tools/dev/pins for the defaults. What the host's CMake is told (toolchain.sh's output, paths into Bloom's React Native) is a file for each Bloom checkout too (OXYOS_CMAKE_VARS, toolchain/cmake-vars/). A checkout no bootstrap named for OXYOS_CHECKOUT_KEEP_DAYS (3) is removed with its cmake-vars file and the clone's objects only it used. The runners' caches get the same layout through the gate's bootstrap. docs/developing.mdx says how. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Every build on a machine shared one checkout of each application (
OXYOS_CACHE/src/Bloom, and likewise Dropsea and Atlas). A bootstrap for a tree pinning another commit switched it under a running build. On 11 November a gate on seldon failed to bundle its packages ("Unable to resolve module ./social" in Bloom'ssrc/icons/index.ts), because another tree's bootstrap had moved the shared checkout from e79ca5be to 69df4a88 mid-build. The #563 agent hit the same race earlier.Change
checkouts/NAME.gitis one bare clone, fetched a commit at a time (--depth 1).checkouts/NAME/COMMITis a worktree of it, with its packages installed once and never changed after.COMMIT.readymarks it complete (a half-made one is made again);COMMIT.usedrecords when a bootstrap last named it.env.shreadstools/dev/pinsto defaultBLOOM_DIR,DROPSEA_DIRandATLAS_DIRto their pinned commits' checkouts.local.confoverrides still win.toolchain.sh's output holds paths into that Bloom's React Native, so it moves from the sharedtoolchain/cmake-vars.txttotoolchain/cmake-vars/<hash of BLOOM_DIR>.txt(OXYOS_CMAKE_VARS).run-scenarios.shand the sanitizer doc use it.OXYOS_CHECKOUT_KEEP_DAYS(3) is removed, along with itscmake-varsfile and any clone objects only it used (git gc --prune=now).OXYOS_CACHE.src/Bloomand the others stay in place for trees on branches from before this change, and can be removed once none builds.docs/developing.mdxsays all this.Tested on seldon, on the shared
~/.cache/oxyosSCENARIOS="transform text-input") on trees pinning different Bloom commits: a at e79ca5be (main), and b at fc1aeaca (Bloom 18.4.2: a desktop platform's chrome (pin bump, scenarios re-measured) #540's pin), started 60 s later. b's bootstrap made its own checkout while a built.cmake-varspointing into its own React Native.checkouts/is 4.5 GB..usedaged 6 days, the next bootstrap removed its worktree andcmake-varsfile and kept the two in use.🤖 Generated with Claude Code