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

pex: --preserve-pip-download-log #21979

Open
jake-normal opened this issue Feb 19, 2025 · 8 comments · May be fixed by #21980
Open

pex: --preserve-pip-download-log #21979

jake-normal opened this issue Feb 19, 2025 · 8 comments · May be fixed by #21980

Comments

@jake-normal
Copy link
Contributor

During python lockfile generation, it would be nice to include the pex3 --preserve-pip-download-log flag. When included, the pex process will print out the path to a temporary file that contains the realtime download log of the pip process. This file can then be tailed. This is useful for debugging issues like catastrophic backtracking during dependency resolution.

@telekid
Copy link

telekid commented Feb 19, 2025

Note to self: would add around here.

@telekid telekid linked a pull request Feb 19, 2025 that will close this issue
@telekid
Copy link

telekid commented Feb 19, 2025

Eh, created #21980 just in case this feature is deemed useful. Untested locally, I don't have pants set up for local development 😢 .

@jsirois
Copy link
Contributor

jsirois commented Feb 19, 2025

Untested locally, I don't have pants set up for local development

So... I am not a Pants dev any longer, but I would like to call this out as generally bogus for any Python code ... since its Python code! You could make that edit directly in the Pants venv which is presumably somewhere under <user cache dir>/nce/... somewhere. You have the live Python source available for editing even if you are not "set up for local development".

@jake-normal
Copy link
Contributor Author

Ah, what I meant was I hadn't yet had the chance to look at https://www.pantsbuild.org/2.18/docs/contributions/development/setting-up-pants. Looks simple after a quick scan, just not quite at the top of my stack :)

@jsirois
Copy link
Contributor

jsirois commented Feb 20, 2025

Aha. I fell for your alias as some 3rdparty yolo cowboy who swooped in and tried a fix without testing. Apparently "jake-normal" == "telekid"

@jake-normal
Copy link
Contributor Author

Ahaha no, that's my bad. The alias is confusing. And you're totally right to call that out, I appreciate deeply the maintainer's burden.

@sureshjoshi
Copy link
Member

I just fell for that too - I came back to check who that was.

One question: Is there any perf hit of note for adding that in by default? Or is it something that would be better passed in with some of the extra-args?

@jsirois
Copy link
Contributor

jsirois commented Feb 20, 2025

No perf hit. Pex needs to capture the Pip log in full already to create a universal lock. The flag with no arg just skips a tempdir teardown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants