Skip to content
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

Merged
merged 3 commits into from Oct 17, 2022

Conversation

benjyw
Copy link
Sponsor Contributor

@benjyw benjyw commented Oct 12, 2022

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.

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]
# 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]
@benjyw benjyw merged commit 783c04a into pantsbuild:2.14.x Oct 17, 2022
@benjyw benjyw deleted the cherry-pick-17177-to-2.14.x branch October 17, 2022 21:03
@@ -143,15 +144,20 @@ async def export_virtualenv(
"--remove=all",
Copy link
Member

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:

Copy link
Member

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...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Sponsor Contributor Author

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... 🤦 🤦 🤦 🤦 🤦

jsirois added a commit to jsirois/pants that referenced this pull request Oct 21, 2022
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]
jsirois added a commit that referenced this pull request Oct 21, 2022
That cherry-pick was done in #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 #17221
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants