I upgraded pants to 2.16 (from 2.14) and I am noti...
# general
l
I upgraded pants to 2.16 (from 2.14) and I am noticing an increase in packaging time and even not able to complete at all (i interrupt the build after 5 min). The package targets are cloud functions. On pants 2.14, package finishes in under a minute. Anyone experiencing similar issue?
This turned out to be an issue with the default pip not resolving .. ever.
setting it to a newer pip version fixed the issue
Copy code
[python]
pip = "23.0.1"
there is though an increase package build from ˜46 secs to ˜77 sec
b
Do you use “resolves” and lock files for your Python code?
(To spell that out a bit more, now that I'm on a computer) Enabling "resolves" allows generating lockfiles, which mean the dependency resolution process only needs to run once and is saved in the repo. This has two major benefits: • faster builds, because the lockfile saves the appropriate dependency versions, without needing to go and rerun resolution/check PyPI • reproducible/stable builds, if new dependency versions are published, builds will still reference the original versions, so there's less risk of a build breaking randomly. https://www.pantsbuild.org/docs/python-lockfiles has more info
l
we don’t use locks (no particular reason). I will it give a try. I guess it won’t help with c/rust extensions, like cryptography/cffi in the sense that the ci image where the applications are packaged needs to have a compatible environment to where they are going to be running.