forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Immutably hardlink "large" files in a sandbox (pantsbuild#17520)
Fixes pantsbuild#17282 and fixes pantsbuild#14070 This change represents the smallest footprint change to get support in for treating "large" files as immutable inputs. - `immutable_inputs.rs` has been moved to `store` (to avoid circular reference) - An additional method was added to support a hardlink _file_ - Directory materialization takes an `ImmutableInputs` ref and a list of paths to ensure mutable - When materializing a file, if its above our threshold and not being forced mutable, we hardlink it to the immutable inputs - Process running seeds the mutable paths with the capture outputs The future is primed for changes like: - Eventually removing the `immutable_input_digests` to a process, and letting the heuristic take over - And then cleaning the code up after that's ripped out - Adding more facilities to includelist/excludelist files from a `Process` object (e.g. we could includelist most/all PEXs since those shouldn't be mutated and we'd just have one top-level hardlink) - Have a directory huerstic - IDK more shenanigans 😄 Tested 3 ways: - `./pants --keep-sandboxes=always <something>` and inspected the sandbox between 2 different runs using the same daemon and ensured the hardlink - Crafted an `experimental_shell_command` with a file in `outputs` that matches a large file and ensured the file in the sandbox wasn't hardlinked - Crafted an `experimental_shell_command` with a dir in `outputs` that matches the containing dir of a large file and ensured the file in the sandbox wasn't hardlinked
- Loading branch information
1 parent
5c65d4d
commit f8df117
Showing
19 changed files
with
380 additions
and
86 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.