Repository navigation
[rush] Use deterministic cache restore staging - #6226
Open
Yashwanth Reddy Verupaka (yashwanth195) wants to merge 1 commit into
Open
Yashwanth Reddy Verupaka (yashwanth195) wants to merge 1 commit into
Yashwanth Reddy Verupaka (yashwanth195) wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Summary
Rush currently uses randomly named staging directories for build-cache restores. Use predictable, exclusively claimed slots without letting parallel restores or their cleanup overwrite a project output.
Details
Reserve all declared project and graph outputs, including unselected operations and shard outputs. Compare lexical paths and resolved ancestors before claiming a slot. Exclusive directory creation coordinates across processes; within a process, concurrent restores share the reservation catalog and advance a per-parent cursor. Occupied slots are never reused or removed by another restore.
Restore in place if a complete current snapshot is unavailable or the staging path cannot be safely resolved. No cache key or archive format changes.
How it was tested
runCLI(run in band): 148 tests passed across staged restore, bridge, cacheable operations, legacy skip, and retained results in the reviewed candidate. Eight regressions failed on the preceding deterministic draft, as expected. For 75 concurrent restores,mkdirprobes dropped from 2,850 to 75.node -with the focused JestrunCLIharness ranStagedRestore.test.js; the case-sensitive identity regression failed before the change, then all 42 staged-restore tests passed.git diff --check b87dafc59039a409755930fcff980b0c2d61a340 73f7f7d34bbe37327ad0124accd05e08bd82f7ed: passed.Impacted documentation
No website documentation is affected.