better-van-82973
03/21/2024, 8:04 PM__run.sh
script that executes in the Pants sandbox? I was trying to debug a failure and saved the sandbox, but when I try to run __run.sh
I get this error (it fails trying to install the latest version of pip
):
received exit code 1 during execution of `['/private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-42OgcN/.tmp/tmp5vgvkisc/pip/bin/python3.12', '-s', '-E', '-m', 'pip', 'install', '--target', '/private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-42OgcN/.tmp/tmp5vgvkisc/reqs/pip', 'pip==24.0']` while trying to execute `['/private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-42OgcN/.tmp/tmp5vgvkisc/pip/bin/python3.12', '-s', '-E', '-m', 'pip', 'install', '--target', '/private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-42OgcN/.tmp/tmp5vgvkisc/reqs/pip', 'pip==24.0']`
better-van-82973
03/21/2024, 8:14 PMPEX_VERBOSE
setting for PEX but that didn’t get me any closer to finding a root cause.
Here’s the stack trace:
pex: Executing: /private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-42OgcN/.tmp/tmp0i26txax/pip/bin/python3.12 -s -E -m pip install --target /private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-42OgcN/.tmp/tmp0i26txax/reqs/pip pip==24.0
Traceback (most recent call last):
File "/Users/krishnanchandra/.cache/pants/named_caches/pex_root/installed_wheels/7309da7faa3a99f960f878ee917815b3ceb40d69205b7d496d88faa5a8c4db76/pex-2.2.1-py2.py3-none-any.whl/pex/result.py", line 105, in catch
return func(*args, **kwargs)
File "/Users/krishnanchandra/.cache/pants/named_caches/pex_root/installed_wheels/7309da7faa3a99f960f878ee917815b3ceb40d69205b7d496d88faa5a8c4db76/pex-2.2.1-py2.py3-none-any.whl/pex/bin/pex.py", line 1045, in do_main
pex_builder = build_pex(
File "/Users/krishnanchandra/.cache/pants/named_caches/pex_root/installed_wheels/7309da7faa3a99f960f878ee917815b3ceb40d69205b7d496d88faa5a8c4db76/pex-2.2.1-py2.py3-none-any.whl/pex/bin/pex.py", line 912, in build_pex
resolve(
File "/Users/krishnanchandra/.cache/pants/named_caches/pex_root/installed_wheels/7309da7faa3a99f960f878ee917815b3ceb40d69205b7d496d88faa5a8c4db76/pex-2.2.1-py2.py3-none-any.whl/pex/resolve/configured_resolve.py", line 42, in resolve
resolve_from_lock(
File "/Users/krishnanchandra/.cache/pants/named_caches/pex_root/installed_wheels/7309da7faa3a99f960f878ee917815b3ceb40d69205b7d496d88faa5a8c4db76/pex-2.2.1-py2.py3-none-any.whl/pex/resolve/lock_resolver.py", line 279, in resolve_from_lock
file_download_managers_by_target = {
File "/Users/krishnanchandra/.cache/pants/named_caches/pex_root/installed_wheels/7309da7faa3a99f960f878ee917815b3ceb40d69205b7d496d88faa5a8c4db76/pex-2.2.1-py2.py3-none-any.whl/pex/resolve/lock_resolver.py", line 282, in <dictcomp>
downloader=ArtifactDownloader(
File "<attrs generated init pex.resolve.downloads.ArtifactDownloader>", line 13, in __init__
_inst_dict['pip'] = __attr_factory_pip(self)
File "/Users/krishnanchandra/.cache/pants/named_caches/pex_root/installed_wheels/7309da7faa3a99f960f878ee917815b3ceb40d69205b7d496d88faa5a8c4db76/pex-2.2.1-py2.py3-none-any.whl/pex/resolve/downloads.py", line 62, in _pip
return get_pip(
File "/Users/krishnanchandra/.cache/pants/named_caches/pex_root/installed_wheels/7309da7faa3a99f960f878ee917815b3ceb40d69205b7d496d88faa5a8c4db76/pex-2.2.1-py2.py3-none-any.whl/pex/pip/installation.py", line 287, in get_pip
pip = _resolved_installation(
File "/Users/krishnanchandra/.cache/pants/named_caches/pex_root/installed_wheels/7309da7faa3a99f960f878ee917815b3ceb40d69205b7d496d88faa5a8c4db76/pex-2.2.1-py2.py3-none-any.whl/pex/pip/installation.py", line 131, in _resolved_installation
return _pip_installation(
File "/Users/krishnanchandra/.cache/pants/named_caches/pex_root/installed_wheels/7309da7faa3a99f960f878ee917815b3ceb40d69205b7d496d88faa5a8c4db76/pex-2.2.1-py2.py3-none-any.whl/pex/pip/installation.py", line 52, in _pip_installation
for dist_location in iter_distribution_locations():
File "/Users/krishnanchandra/.cache/pants/named_caches/pex_root/installed_wheels/7309da7faa3a99f960f878ee917815b3ceb40d69205b7d496d88faa5a8c4db76/pex-2.2.1-py2.py3-none-any.whl/pex/pip/installation.py", line 108, in bootstrap_pip
venv.interpreter.execute(["-m", "pip", "install", "--target", target_dir, req])
File "/Users/krishnanchandra/.cache/pants/named_caches/pex_root/installed_wheels/7309da7faa3a99f960f878ee917815b3ceb40d69205b7d496d88faa5a8c4db76/pex-2.2.1-py2.py3-none-any.whl/pex/interpreter.py", line 1459, in execute
stdout, stderr = Executor.execute(cmd, stdin_payload=stdin_payload, env=env, **kwargs)
File "/Users/krishnanchandra/.cache/pants/named_caches/pex_root/installed_wheels/7309da7faa3a99f960f878ee917815b3ceb40d69205b7d496d88faa5a8c4db76/pex-2.2.1-py2.py3-none-any.whl/pex/executor.py", line 99, in execute
raise cls.NonZeroExit(cmd, process.returncode, stdout, stderr)
curved-manchester-66006
03/21/2024, 8:41 PM__run.sh
not matching what Pants originally did?better-van-82973
03/21/2024, 8:42 PMbetter-van-82973
03/21/2024, 8:43 PM.tmp
directory in the sandbox between runsbetter-van-82973
03/21/2024, 8:46 PMcurved-manchester-66006
03/21/2024, 8:47 PM__run.sh
scripts is "hack them up and add debugging", but you already found PEX_VERBOSE=9
or whatever`
Can you execute /private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-42OgcN/.tmp/tmp0i26txax/pip/bin/python3.12 -s -E -m pip install --target /private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-42OgcN/.tmp/tmp0i26txax/reqs/pip pip==24.0
, or is that what you meant by the .tmp
dir not being preserved?curved-manchester-66006
03/21/2024, 8:48 PMbetter-van-82973
03/21/2024, 8:48 PM.tmp
directory appears to get wiped out between runsbetter-van-82973
03/21/2024, 8:51 PMThese work!
---
pex: Executing: /private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-Ik8tnJ/.tmp/tmp_l1f_p5j/pip/bin/python3.12 -s -E -m pip install -U pip
pex: Correcting mis-configured MACOSX_DEPLOYMENT_TARGET of 13 to 13.0 corresponding to a valid PEP-425 platform of macosx-13.0-arm64 for PythonInterpreter('/private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-Ik8tnJ/.tmp/tmp_l1f_p5j/pip/bin/python3.12', PythonIdentity('/private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-Ik8tnJ/.tmp/tmp_l1f_p5j/pip/bin/python3.12', 'cp312', 'cp312', 'macosx_14_0_arm64', (3, 12, 1))).
This doesn't
---
pex: Executing: /private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-Ik8tnJ/.tmp/tmp_l1f_p5j/pip/bin/python3.12 -s -E -m pip install --target /private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-Ik8tnJ/.tmp/tmp_l1f_p5j/reqs/pip pip==24.0
curved-manchester-66006
03/21/2024, 8:58 PMpip pip==24.0
even a valid pip command?better-van-82973
03/21/2024, 8:59 PMpip install --target /private/var/folders/0w/zhpm9fs12zzcmt3m5799xb9c0000gn/T/pants-sandbox-Ik8tnJ/.tmp/tmp_l1f_p5j/reqs/pip pip==24.0
which seems okay to me?curved-manchester-66006
03/21/2024, 8:59 PMbetter-van-82973
03/21/2024, 9:22 PMbetter-van-82973
03/22/2024, 12:02 AMcurved-manchester-66006
03/22/2024, 1:12 AMhundreds-carpet-28072
04/03/2024, 11:50 PMWe have this ever growing “is your workstation setup correctly?” verification script and it feels like half the checks are around pip & netrcWe have a very similar situation going on also, which is also compounded by private indexes being behind a VPN. I’d be interested in seeing said script if possible to compare with our own. 😄
curved-manchester-66006
04/04/2024, 9:25 PM✔ pass PantsLauncher found
✔ pass PantsLauncherVersion (0, 10, 4) ok
✔ pass PythonVersion ('3', '10', '13') ok
✔ pass PythonImplimentation CPython ok
✔ pass AvoidCondaPythonVersion ok
✔ pass AvoidCondaPythonPath ok
✔ pass PipConf ok
✔ pass Netrc ok
✔ pass AwsCli found
✔ pass DockerCli found
✔ pass EcrCredentialsHelperBinary found
✔ pass EcrCredentialsHelperConfig ok
✔ pass EcrCredentialsMacOs n/a on Linux
✔ pass AwsProfile ok
✔ pass PipDownload ok
hundreds-carpet-28072
04/05/2024, 11:09 AM[python-bootstrap].search_path
. It would be nice if that could be output from Pants itself.