https://pantsbuild.org/ logo
h

hundreds-father-404

07/31/2020, 8:55 PM
How do you get Pants to not output when a
Process
has been completed or not? The new messages for “Searching for ‘python3’ on PATH` are really chatty
w

witty-crayon-22786

07/31/2020, 9:03 PM
we don’t have a way to set the “level” of a process… might be a quick fix.
they should be cached though: you shouldn’t see them again until you change the PATH
but, related: i realized yesterday that they’re buggy for that reason. will need to do more of #9760 and make the path lookup operation native as described there.
will open a new issue for that.
h

hundreds-father-404

07/31/2020, 9:07 PM
https://github.com/pantsbuild/pants/pull/10525 for the first step of improving this.
they should be cached though
Yes, but I also think this is a dangerous mindset that we need to remind ourselves to watch out for. The first time experience of a user matters. For a first time user, are these particular messages pulling their weight? I think no.
we don’t have a way to set the “level” of a process… might be a quick fix.
Would this be adding a property to
Process
called
log level
? Then piping it through to the engine?
w

witty-crayon-22786

07/31/2020, 9:13 PM
will open a new issue for that.
https://github.com/pantsbuild/pants/issues/10526
@hundreds-father-404: just “level”, yea.
(because it’s also the workunit’s level)
👍 1
h

hundreds-father-404

07/31/2020, 11:58 PM
Do we think the better default for processes is debug or info? That is, should we default a process to logging “Completed: foo”? cc @happy-kitchen-89482
h

happy-kitchen-89482

08/01/2020, 12:01 AM
Hmmm
h

hundreds-father-404

08/01/2020, 12:01 AM
So far, I’m changing these to debug: - run
protoc
- extract an archive (
archive.py
) - run
cloc
- search for binaries, like
python
h

happy-kitchen-89482

08/01/2020, 12:01 AM
Probably yes?
h

hundreds-father-404

08/01/2020, 12:01 AM
I’m atm keeping these as info: - building a Pex - running a Pex process, like
pytest
I think defaulting to info makes sense? Personally, though, I don’t like how chatty Pants is, so my fear with a default of info is that when we add new code, it will risk being chattier than it should be
w

witty-crayon-22786

08/01/2020, 12:04 AM
Info is a better default.
👍 1
until https://github.com/pantsbuild/pants/issues/7907 is implemented, a @rule cannot have a non-static
description
which means that right now only processes have “useful” descriptions.
h

hundreds-father-404

08/01/2020, 12:05 AM
Agreed, but even if the level is set to Debug, it will still show up in the dynamic UI, right?
The ideal imo would be to show up in the dynamic UI, but not be persisted as a log message.
w

witty-crayon-22786

08/01/2020, 12:06 AM
Agreed, but even if the level is set to Debug, it will still show up in the dynamic UI, right?
yea, true.
my feeling is that running a process is almost always a significant thing. some of the ones you’ve mentioned above should stay Info, IMO
the PATH discovery stuff is pretty clearly not.
h

hundreds-father-404

08/01/2020, 12:07 AM
cloc
is redundant because we immediately after output the result of
cloc
w

witty-crayon-22786

08/01/2020, 12:08 AM
that goal does, not all will. but yea, maybe a special case.
h

hundreds-father-404

08/01/2020, 12:09 AM
Overall, I think I agree with you that Info is a better default. I’ll stick with it. Thanks!
w

witty-crayon-22786

08/01/2020, 12:11 AM
oh, so: another consideration.
nevermind!
(was gonna say “we’re considering conditionally dumping output on processes and that might be level driven” but that’s not true… that ended up in the EngineAware interface)
… i had almost forgotten about that.
that exists now, so if you want streaming test output for failures…
…can do it in a few lines 😃
1
… i had almost forgotten about that.
not even almost: “fully forgotten”.
tweak
TestResult
to dump the stderr in
def message
if it’s a failure
(thanks @hundreds-breakfast-49010, wherever you are)
👍 1
h

hundreds-father-404

08/01/2020, 12:16 AM
Neat. It sounds like that’s a separate change, though, right?
w

witty-crayon-22786

08/01/2020, 12:16 AM
definitely
if i had remembered i would have suggested doing it in https://github.com/pantsbuild/pants/issues/10484
👍 1
…need to not forget again. filing a ticket.