Troubleshooting a (very) slow pex build #20832
-
I'm troubleshooting a PEX performance issue. The following build step is taking about 15 minutes in our Github Actions-based CI runner:
My guess is that there is a dependency without a wheel matching our CI environment, but I'm having trouble figuring out 1) if that is the issue and 2) if so, which dependency it is. To start, I've been looking to produce more verbose output. (Nothing is emitted during the entire 15 minute build.) I tried I can't tell if the issue is within pants or pex. I tried grepping for Any suggestions? It would be nice if there was more output during that build process. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
I can't speak for Pants here, but I can for Pex. You should be able to determine which dependencies might be building from sdist by just inspecting your lock file. If you know the root requirements of that long build step, that could help narrow down things more quickly, but is not absolutely necessary. Can you provide a copy of your lock file and the interpreter version you think a Pex is being built for as well as the GitHub runner OS (Ubuntu 22.04 or is it something else)? |
Beta Was this translation helpful? Give feedback.
-
Regarding:
I think this is what you where grepping for, but the work you're digging for is likely in pants/src/python/pants/backend/python/util_rules/pex.py Lines 781 to 821 in 0d35991 That said, John asks the more relevant questions to get you closer to an actual answer.. |
Beta Was this translation helpful? Give feedback.
Ok, bleeding edge indeed: #20670
@jake-normal my piece here is done unless you have further questions. It appears to be the short answer is you either need to setup caching of
~/.cache/pants/named_caches/pex_root
(<- Do your own homework here, I have not used Pants in ~1 year and location may have changed) or else you need to hop on the Pants dev release train to Pick up @huonw's patch asap.