https://pantsbuild.org/ logo
#development
Title
# development
w

wonderful-iron-54019

09/30/2020, 1:53 PM
Experiencing an issue with pylint while running
./pants --no-v1 lint
in Pants 1.30.2rc0. Stack in thread
Untitled
haven't seen this before. in previous 1.X versions i'd successfully got pylint to run on the v2 engine but never got a clean run
a

aloof-angle-91616

09/30/2020, 2:55 PM
could you try with
--no-process-execution-cleanup-local-dirs
and attempt to execute the command line yourself to repro?
w

wonderful-iron-54019

09/30/2020, 4:02 PM
hey sorry just saw this, @aloof-angle-91616 does this mean i should cd in to the process exceution dir left behind and try to run
pylint
form my local environment or through the
pylint_runner.pex
there's three pex files in there so im not sure what the right incantation would be
a

aloof-angle-91616

09/30/2020, 4:03 PM
ah yes in pants v2 we were able to add a
run.sh
script so you don't have to remember the right command line
if you run pants with
-ldebug
it should print out the command line and environment variables used
w

wonderful-iron-54019

09/30/2020, 4:03 PM
ok ill do that thanks
a

aloof-angle-91616

09/30/2020, 4:03 PM
lmk if that's clear
w

wonderful-iron-54019

09/30/2020, 4:04 PM
so far it is! I might have questions depending on the debug log output
a

aloof-angle-91616

09/30/2020, 4:04 PM
it is definitely weird that this is happening, especially since you mentioned that it was successfully being invoked before
w

wonderful-iron-54019

09/30/2020, 4:04 PM
to be fair, last time i tried lintin on the v2 engine was months ago
a

aloof-angle-91616

09/30/2020, 4:04 PM
ah! that is helpful
w

wonderful-iron-54019

09/30/2020, 4:05 PM
or at least more than a month ago
and several pants versions back as well
a

aloof-angle-91616

09/30/2020, 4:05 PM
and could you post the command line and env vars here? i'm suspecting the PEX_PATH we're using is wrong, or we're not writing the entry_point to the pylint runner pex
i would also like to know the output of
unzip -p pylint_runner.pex PEX-INFO | jq
w

wonderful-iron-54019

09/30/2020, 4:07 PM
ok might have to use a different selector than
src::
because the output is MASSIVE
a

aloof-angle-91616

09/30/2020, 4:08 PM
ah oops that could be our fault too. i have been tryiing to tell people we should make it easier for users to pipe certain tagged output into certain places instead of monolithic log levels but nobody else is seeing it for some reason
w

wonderful-iron-54019

09/30/2020, 4:10 PM
ok here's the command about to try to repro manually
oh oyu know what there is a run.sh in here 🙈
a

aloof-angle-91616

09/30/2020, 4:13 PM
oh awesome yes!
w

wonderful-iron-54019

09/30/2020, 4:13 PM
yes able to reproduce, uploading the run.sh here
__run.sh
a

aloof-angle-91616

09/30/2020, 4:14 PM
i would also be interested in knowing the output of
unzip -l pylint_runner.pex | grep -F .deps/pylint
(and whether there's a
.deps/pylint/__main__.py
)
w

wonderful-iron-54019

09/30/2020, 4:14 PM
ok one seq, getting the PEX_INFO now
PEX INFO
the
unzip | grep .deps
line returns nothing
a

aloof-angle-91616

09/30/2020, 4:16 PM
oh sorry then i guess you will want to try it on
pylint.pex
w

wonderful-iron-54019

09/30/2020, 4:16 PM
there is no .deps folder in that pex
right ok
a

aloof-angle-91616

09/30/2020, 4:16 PM
since that's in the
pex_path
in PEX-INFO
w

wonderful-iron-54019

09/30/2020, 4:17 PM
here's the pylint tree
a

aloof-angle-91616

09/30/2020, 4:17 PM
so
.deps/pylint-2.6.0-py3-none-any.whl/pylint/__main__.py
is in there
ridiculous
what happens if you try
PEX_MODULE=pylint.__main__ PEX_VERBOSE=9 ./pylint.pex
?
the next thing i'm thinking is that the interpreter selection might be screwy so i would want to know what the
interpreter_constraints
field in the PEX-INFO of
pylint.pex
has
w

wonderful-iron-54019

09/30/2020, 4:19 PM
well that gives an import error due to not having the plugins in the pythong path
a

aloof-angle-91616

09/30/2020, 4:19 PM
ah yes
perhaps add
PEX_PATH=requirements.pex
?
or
oh
i mean
PEX_INHERIT_PATH=fallback PYTHONPATH="$(pwd)/.__plugins"
feel free to post an issue about this, no rush, i know you have other things to do
w

wonderful-iron-54019

09/30/2020, 4:38 PM
yeah took a lunch break... I'll play around with these commands and try to gather the information
a

aloof-angle-91616

09/30/2020, 5:03 PM
thank you, this is great
the zip was super helpful
w

wonderful-iron-54019

09/30/2020, 5:16 PM
you got it
w

witty-crayon-22786

09/30/2020, 6:18 PM
@wonderful-iron-54019: is this an upgrade blocker for you all? i was going to cut
1.30.2rc1
with the cache fix we discussed yesterday, but if this blocks we should maybe look into it first.
w

wonderful-iron-54019

09/30/2020, 6:18 PM
we're currently running pylint outside of pants so no
we have a path to v2 runing vanilla
pylint
and then trying to move that to pants
w

witty-crayon-22786

09/30/2020, 6:19 PM
ok. so the big question is whether it still happens on
2.0.x
then i think. and you’re not in a position to confirm that probably
w

wonderful-iron-54019

09/30/2020, 6:19 PM
i mean i could attempt that locally
w

witty-crayon-22786

09/30/2020, 6:20 PM
we have users using pylint on
2.0.x
, so the question would be whether it is something environment specific, or whether it is a bug fixed between
1.30.x
and head
ok, i’m going to cut
1.30.2rc1
, and move triaging #10886 into 2.0 so that we make sure to take a look at whether it repros on
2.0.x
before release.
w

wonderful-iron-54019

09/30/2020, 6:21 PM
cool thanks
w

witty-crayon-22786

09/30/2020, 6:22 PM
thanks a lot!
and thanks @aloof-angle-91616 for suggesting taring the execution directory.
a

aloof-angle-91616

09/30/2020, 6:29 PM
thank you for providing the
2.0.x
context. still getting familiar with what our priorities are
w

witty-crayon-22786

10/01/2020, 3:48 AM
w

wonderful-iron-54019

10/01/2020, 12:28 PM
nice! thanks