https://pantsbuild.org/ logo
s

salmon-barista-63163

11/19/2020, 4:37 PM
In V1 versions of pants I am running pytest unit tests. They seem to run much quicker than in the V2 engine. what used to take 5-6 min now takes 30+. Most of the time is spent building pex files. Is there some option that I am missing here? I do not see any options in the pytest or test options that would help here
h

hundreds-father-404

11/19/2020, 4:38 PM
Hey Brian, have you set up a constraints file? It allows you to use a single resolve for all tests. https://www.pantsbuild.org/docs/python-third-party-dependencies#using-a-lockfile-strongly-recommended
You can use the script at the bottom of the page to generate the file
s

salmon-barista-63163

11/19/2020, 4:40 PM
Ah thank you! I didnt realize I had to have the constraints in order for this to only resolve once. That should definately help. thank you.
h

hundreds-father-404

11/19/2020, 4:41 PM
You’re welcome! We’re also working on some other approaches to reduce the amount of times you need to resolve things, particularly when running
./pants package
, which intentionally doesn’t use this single resolve so that you have smaller binaries created
s

salmon-barista-63163

11/19/2020, 4:59 PM
Awesome! Looking forward to those improvements
w

witty-crayon-22786

11/19/2020, 6:25 PM
both very high priorities for us.
👍 2
3 Views