Hi Team, Is there a way to see at which step `Pan...
# general
b
Hi Team, Is there a way to see at which step
Pants
is having a problem with? Context: I am trying to run `pants export`/`test`/`generate-lockfile` but it is stuck on
Building requirements.pex with XX requirements:
for over 7000 seconds. There is no info on why it is taking so long or which dependency it is unable to resolve.
-ldebug
&
—-print-stacktrace
don’t help either. It would be really nice if
Pants
timed out or failed and threw a message on what went wrong.
b
Sorry for the trouble. One approach would be to find the process and
kill
it manually, that is, induce a failure.
b
I am more concerned about the information as to what’s causing the process to run indefinitely. I think I can kill thru other keyboard shortcuts too. The problem here is
Pants
seems to perpetually try to resolve the environment. A more user friendly experience would be for
Pants
to give up after sometime and tell the user the problem it faced while resolving (
pip
does this).
b
Sorry for the trouble. I agree a timeout would make sense. By killing it, I’m thinking you start to have access to the tools for understanding failing processes, such as logging on completion and the “keep sandboxes” flags, not just cancelling a single invocation.
b
Thank you, I was having hard time recalling this flag. I shall try this. On a related note, I was able to successfully do
pip install -r requirements.txt
. I am on an Apple Silicon Mac and it failed the first time. I quickly realized my mistake and entered into
x86_64
mode (command:
arch -x86_64 zsh -l
) and retried and it worked. Here’s where it gets interesting: I am aware that Apple Silicon has “compatibility” issues and so I had installed
Pants
from an
x86_64
terminal window and had verified the installation that indeed an
x86_64
version of
Pants
was installed. I always use
Pants
in
x86_64
terminal and it used to work fine until now. I suspect
Pants
is encountering the same issue that
pip install
encountered in arm64 mode the first time (going to confirm this with
--keep-sandboxes
flag now). I am wondering why
Pants
is not respecting the architecture of the terminal it’s running in and the fact that it itself is installed for
x86_64
architecture. In any case, this thread was started that
Pants
should time out or fail and tell the user the problem it encountered. It’s not a good user experience having to analyze sandboxes.
Update: tried the
--keep-sandboxes=always
flag but found nothing actionable. Any suggestions where I should be looking at specifically in the
tmp
directory? So far I have looked at
pip.log
file.
Update: Upgrading
Pants
from
2.16.0
to
2.21.0
worked. Any idea what could be the reason?
b
Newer pants incorporate newer versions of the pex tool, which it is invoking here. It mayve had many fixes and optimisations that affect this.
👍 1
b
Ok, that makes sense. However, that was just a fluke to try the latest version and things worked 😃. It would have been so much easier if
Pants
itself highlighted this, especially in case of older/deprecated versions.