-
-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interactive PEX execution leaks PEX_ROOT
at $BUILD_ROOT/.cache/pex_root
.
#12055
Labels
Comments
jsirois
added a commit
to jsirois/pants
that referenced
this issue
May 12, 2021
Previously we'd leak `.cache/pex_root` to the workspace. Beyond making it easier to (mistakenly) corrupt the Pex cache for interactive Pex processes it also could degrade performance of those processes since this was not a symlink to the `pex_root` named cache used by sandboxed processes. Force user's of PexEnvironment methods that support setting up a process to declare what type of process they are setting up by moving those methods to CompletePexEnvironment with one concrete implementation for sandboxed processes and one for workspace processes. Fixes pantsbuild#12055 [ci skip-rust] [ci skip-build-wheels]
jsirois
added a commit
that referenced
this issue
May 12, 2021
Previously we'd leak `.cache/pex_root` to the workspace. Beyond making it easier to (mistakenly) corrupt the Pex cache for interactive Pex processes it also could degrade performance of those processes since this was not a symlink to the `pex_root` named cache used by sandboxed processes. Force user's of PexEnvironment methods that support setting up a process to declare what type of process they are setting up by moving those methods to CompletePexEnvironment with one concrete implementation for sandboxed processes and one for workspace processes. Fixes #12055
jsirois
added a commit
to jsirois/pants
that referenced
this issue
May 12, 2021
Previously we'd leak `.cache/pex_root` to the workspace. Beyond making it easier to (mistakenly) corrupt the Pex cache for interactive Pex processes it also could degrade performance of those processes since this was not a symlink to the `pex_root` named cache used by sandboxed processes. Force user's of PexEnvironment methods that support setting up a process to declare what type of process they are setting up by moving those methods to CompletePexEnvironment with one concrete implementation for sandboxed processes and one for workspace processes. Fixes pantsbuild#12055 (cherry picked from commit 0a01eaf) # Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
jsirois
added a commit
to jsirois/pants
that referenced
this issue
May 12, 2021
Previously we'd leak `.cache/pex_root` to the workspace. Beyond making it easier to (mistakenly) corrupt the Pex cache for interactive Pex processes it also could degrade performance of those processes since this was not a symlink to the `pex_root` named cache used by sandboxed processes. Force user's of PexEnvironment methods that support setting up a process to declare what type of process they are setting up by moving those methods to CompletePexEnvironment with one concrete implementation for sandboxed processes and one for workspace processes. Fixes pantsbuild#12055 (cherry picked from commit 0a01eaf) # Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
jsirois
added a commit
that referenced
this issue
May 12, 2021
Previously we'd leak `.cache/pex_root` to the workspace. Beyond making it easier to (mistakenly) corrupt the Pex cache for interactive Pex processes it also could degrade performance of those processes since this was not a symlink to the `pex_root` named cache used by sandboxed processes. Force user's of PexEnvironment methods that support setting up a process to declare what type of process they are setting up by moving those methods to CompletePexEnvironment with one concrete implementation for sandboxed processes and one for workspace processes. Fixes #12055 (cherry picked from commit 0a01eaf)
thejcannon
added a commit
that referenced
this issue
Dec 5, 2022
This change makes it so we use a `VenvPex` to run Python sources, which is a speed boost (I measure a gain of about ~500ms, which is also quoted in `pex.py`). In order to make this work (specifically ensuring we don't revert the fix for #12055) we now have to weave the complete pex environment through to `VenvPexRequest`.
thejcannon
added a commit
to thejcannon/pants
that referenced
this issue
Dec 9, 2022
This change makes it so we use a `VenvPex` to run Python sources, which is a speed boost (I measure a gain of about ~500ms, which is also quoted in `pex.py`). In order to make this work (specifically ensuring we don't revert the fix for pantsbuild#12055) we now have to weave the complete pex environment through to `VenvPexRequest`.
thejcannon
added a commit
that referenced
this issue
Dec 9, 2022
This change makes it so we use a `VenvPex` to run Python sources, which is a speed boost (I measure a gain of about ~500ms, which is also quoted in `pex.py`). In order to make this work (specifically ensuring we don't revert the fix for #12055) we now have to weave the complete pex environment through to `VenvPexRequest`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example:
The issue here is that
PexEnvironment
assumes it's only used by a Process:pants/src/python/pants/backend/python/util_rules/pex_environment.py
Lines 121 to 143 in 4210c6c
In the
InteractiveProcess
case whenrun_in_workspace = True
(the case for therun
andrepl
goals) the assumptions ofPexEnvironment
are wrong.The text was updated successfully, but these errors were encountered: