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
Set PEX_ROOT for export post-processing command. (cherry-pick of #17177) #17200
Conversation
This is both a leak that foils our recommendations to users for maintenance of Pants caches and results in unneeded extra work when an export finds an empty ~/.pex but would have had hits in ~/.cache/pants/named_caches/pex_root if it had been pointed there. Similar to pantsbuild#17177 but not a straight cherry-pick, as it would not apply even remotely cleanly. [ci skip-rust] [ci skip-build-wheels] [ci skip-rust]
@@ -143,15 +144,20 @@ async def export_virtualenv( | |||
"--remove=all", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a busted cherry-pick. 2.14.x goes from rm -rf ~/.pex
to rm -rf ~/.cache/pants/named_caches/pex_root
since the --remove=all
-> --remove=pex
bit of the CP was missed.
This explains all of:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm working up a patch to right this...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooof, so I left off the most important bit. Ouch... 🤦 🤦 🤦 🤦 🤦
That cherry-pick was done in pantsbuild#17200 and missed a crucial line which led to `~/.cache/pants/named_caches/pex_root` being nuked on any run of `./pants export` instead of the prior behavior of nuking `~/.pex`. Fixes pantsbuild#17221 [ci skip-rust] [ci skip-build-wheels]
This is both a leak that foils our recommendations to users for maintenance of
Pants caches and results in unneeded extra work when an export finds an
empty ~/.pex but would have had hits in ~/.cache/pants/named_caches/pex_root
if it had been pointed there.
A reapplication of part of #17177, but not really a straight cherry-pick, as it would not
apply even remotely cleanly.