happy-kitchen-89482
08/09/2021, 9:08 PM./pants test
on all the pants repo's tests on my laptop (so it takes several minutes to complete), I see this log
[INFO] Completed: Building pytest_runner.pex
Repeated several times in the output. Is this a bad artifact in the dynamic UI, or are we really building that pex multiple times for some reason?acoustic-sandwich-56640
08/10/2021, 6:48 PMproud-dentist-22844
08/10/2021, 7:25 PMproud-dentist-22844
08/10/2021, 7:29 PMuser
08/10/2021, 10:53 PMworried-salesclerk-37834
08/11/2021, 5:48 PM./pants run projects/executable:pex_binary -- --arg1 "many words separated"
I'm using argparse, and it blows up because it's not expecting an argument "words separated". Looking at sys.argv, they're all split up.
This doesn't happen when I invoke the pex file directly. argparse's destination "arg1" has a value of "many words separated". Workaround when using pants is to escape all the spaces.user
08/11/2021, 8:32 PMuser
08/12/2021, 6:38 PMechoing-farmer-15630
08/12/2021, 9:16 PM$ ./pants test algorithms::
Bootstrapping Pants using /Users/user/.pyenv/shims/python3.9
Installing pantsbuild.pants==2.5.0 into a virtual environment at /Users/user/.cache/pants/setup/bootstrap-Darwin-x86_64/2.5.0_py39
created virtual environment CPython3.9.2.final.0-64 in 353ms
creator CPython3Posix(dest=/Users/user/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.xGjbPP/install, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/sohum/Library/Application Support/virtualenv)
added seed packages: pip==21.1.2, setuptools==57.0.0, wheel==0.36.2
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Requirement already satisfied: pip in /Users/user/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.xGjbPP/install/lib/python3.9/site-packages (21.1.2)
Collecting pip
Using cached pip-21.2.4-py3-none-any.whl (1.6 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.1.2
Uninstalling pip-21.1.2:
Successfully uninstalled pip-21.1.2
Successfully installed pip-21.2.4
ERROR: Could not find a version that satisfies the requirement pantsbuild.pants==2.5.0 (from versions: 0.0.17, 0.0.18, 0.0.20, 0.0.21, 0.0.22, 0.0.23, 0.0.24, 0.0.25, 0.0.26, 0.0.27, 0.0.28, 0.0.29, 0.0.30, 0.0.31, 0.0.32, 0.0.33, 0.0.34, 0.0.35, 0.0.36, 0.0.37, 0.0.38, 0.0.39, 0.0.40, 0.0.41, 0.0.42, 0.0.43, 0.0.44, 0.0.45, 0.0.46, 0.0.47, 0.0.48, 0.0.49, 0.0.50, 0.0.51, 0.0.52, 0.0.53, 0.0.54, 0.0.55, 0.0.56, 0.0.57, 0.0.58, 0.0.59, 0.0.60, 0.0.61, 0.0.62, 0.0.63, 0.0.64, 0.0.65, 0.0.66, 0.0.67, 0.0.68, 0.0.69, 0.0.70, 0.0.71, 0.0.72, 0.0.73, 0.0.74, 0.0.75, 0.0.76, 0.0.77, 0.0.79, 0.0.80, 0.0.81, 0.0.82, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.15.0, 1.16.0, 1.17.0, 1.18.0, 1.19.0, 1.20.0, 1.21.0, 1.22.0, 1.23.0, 1.24.0, 1.25.0, 1.26.0, 1.27.0, 1.28.0)
ERROR: No matching distribution found for pantsbuild.pants==2.5.0
...myself and our DevOps lead could not duplicate with python 3.9.5 and 3.9.2 installed. Any idea what's happening here?salmon-barista-63163
08/13/2021, 3:23 PMindexes.add = [<index>]
The part that I do not understand is how to get pants to see the authentication token for this repo. I am using pants 1.30 (I cannot update this repo at this time to a later version)
Any guidance is appreciated hereuser
08/15/2021, 3:58 AMuser
08/15/2021, 3:58 AMnice-france-74763
08/15/2021, 8:00 AMPANTS_SHA
envvar but I'd like to target a semver range (eg, ^1.2.3
), is it possible?user
08/16/2021, 12:55 PMhappy-kitchen-89482
08/16/2021, 12:56 PMplain-carpet-73994
08/16/2021, 5:42 PM[python-setup]
interpreter_constraints = ['CPython==3.7.*']
but when she runs the pants
wrapper script she's getting an error that says `ProcessExecutionFailure: Process 'searching for python2
...` . She does have various python3
aliases set up via pyenv
so I'm not sure why it's looking for Python2. In the error you can see that it ran which -a python2
which fails because there is not python2
on the $PATH
. There is a python2.7
which I could symlink but I'm wondering why it's looking for Python2 at all.hundreds-father-404
08/16/2021, 5:43 PMhundreds-father-404
08/16/2021, 5:45 PMpython2
is there. But we shouldn't be failing.
You can try changing that option, although definitely interested in the errorplain-carpet-73994
08/16/2021, 5:48 PMhundreds-father-404
08/16/2021, 5:50 PMplain-carpet-73994
08/16/2021, 5:51 PMhappy-kitchen-89482
08/16/2021, 6:17 PMhundreds-father-404
08/16/2021, 6:19 PMplain-carpet-73994
08/16/2021, 6:35 PMplain-carpet-73994
08/16/2021, 6:37 PMplain-carpet-73994
08/16/2021, 7:30 PM15:23:51.60 [INFO] initializing scheduler...
15:23:52.68 [INFO] scheduler initialized.
15:23:53.07 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
File "/Users/ckolson/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 229, in _run_inner
return self._perform_run(goals)
File "/Users/ckolson/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 168, in _perform_run
return self._perform_run_body(goals, poll=False)
File "/Users/ckolson/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 185, in _perform_run_body
return self.graph_session.run_goal_rules(
File "/Users/ckolson/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/init/engine_initializer.py", line 135, in run_goal_rules
exit_code = self.scheduler_session.run_goal_rule(
File "/Users/ckolson/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/engine/internals/scheduler.py", line 530, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "/Users/ckolson/.cache/pants/setup/bootstrap-Darwin-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/engine/internals/scheduler.py", line 498, in _raise_on_error
raise ExecutionError(
Exception message: 1 Exception encountered:
ProcessExecutionFailure: Process 'Searching for `python2` on PATH=/Users/ckolson/.pyenv/versions/3.7.10/bin:/Users/ckolson/.pyenv/versions/3.8.9/bin:/Users/ckolson/code/env/bin:/Users/ckolson/google-cloud-sdk/bin:/Users/ckolson/.pyenv/shims:/Users/ckolson/.pyenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin' failed with exit code 1.
stdout:
stderr:
+ command -v which
+ command which -a python2
+ which -a python2
(Use --print-stacktrace to see more error details.)
hundreds-father-404
08/16/2021, 7:31 PMwhich -a python2
directly?hundreds-father-404
08/16/2021, 7:35 PMset -euox pipefail
if command -v which > /dev/null; then
command which -a $1 || true
else
command -v $1 || true
fi
I'm confused why the || true
isn't working... To debug, it may help to use `--no-process-execution-local-cleanup`: https://www.pantsbuild.org/v2.4/docs/troubleshooting#debug-tip-inspect-the-chroot-with---no-process-execution-local-cleanupplain-carpet-73994
08/16/2021, 8:09 PMplain-carpet-73994
08/16/2021, 8:10 PMset -e
but could that be the issue: a command did fail so maybe that takes precedence over the || true
?