Hi <@UB2J9BQA0> Daniel said that you may help I g...
# general
d
Hi @hundreds-father-404 Daniel said that you may help I get error when run python integration test. The command is:
./pants --v2 --no-v1 test tests/python/pants_test/bin:integration
a
FWICT
testprojects/src/python/nested_runs/run_pants_with_pantsd.py
explicitly shells out to
./pants
rather than using the
pants.pex
thing on CI… @hundreds-father-404 is this a test that needs v2 blacklisting until something fixes that up?
h
Is this a new test? That is the issue indeed
With a chroot,
src/python/pants/
becomes just `pants/. So now that test project is trying to execute a directory
a
Yeah, new test
Which re-uses an existing testproject that explicitly calls
./pants
h
Was that test project being called with “run” before? Our test projects shard will only call “test” on it for example
The solution is to rename ./pants to ./pants.pex
a
But only conditionally, right?
And this is an inner run of pants, so we’re presumably maybe stripping environment variables somewhere?
I believe that from our test (running in pants), we run a pants, which itself runs a pants
h
That’s one way of doing it. But I would always use pants.pex. This is why we always automatically bootstrap the pex when running tests now, to ensure that tests are using an up-to-date pants.pex
a
Ok, so we can just unconditionally assume
pants.pex
exists?
h
Yes. The only condition where it will not exist or could be out-of-date is when the user has manually turned on NO_REGEN_PEX=true
a
Sweet
Thanks!
❤️ 1
h
(Can that change be embedded into Katya’s PR for less CI runs?)
a
It could… But independent change! 😛
d
Eric, thank you! 🙌
❤️ 1