I have one developer reporting this problem since ...
# general
g
I have one developer reporting this problem since upgrading from pants 2.24.1 to 2.26.0. Any ideas?
Copy code
File "/Users/username/Library/Caches/nce/8fb836cadd1e1f50180fea66b6acab1f23108e9a74f158744e706c6da41a534b/bindings/venvs/2.26.0/lib/python3.11/site-packages/pants/engine/intrinsics.py", line 107, in execute_process
    return await native_engine.execute_process(process, process_execution_environment)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
native_engine.IntrinsicError: Error opening file /private/var/folders/j5/lgkzhxy16fn_gtx5l8wwzgxr0000gp/T/pants-sandbox-GbhDBn/python/share/terminfo/n/ncr260vt300wpp for writing: Os { code: 62, kind: FilesystemLoop, message: "Too many levels of symbolic links" }
f
More information please. What does the
pants.toml
and other relevant config look like? What goal is being invoked and on what targets?
I assume macOS given
/Users
path but please confirm.
g
Yes, macOS. It's only happening on one user out of about 50. When I look at the created sandbox, the ncr260vt300wpp is a recursive symlink pointing to itself. I look across the users entire system and can't find terminfo in any python/share directory across the users entire laptop.
f
And how is Python configured on this developer's system versus other developers' systems?
g
I can't discern easily. I tried having them install python using mise and verified that took. It works on mine with mise, but not theirs.
Have any pointers RE: python differences hunt?
f
I guess I'd want to know why there is a terminfo in the sandbox.
versus consuming Python from a system path
g
Yeah, it's very confusing. I can't even tell where terminfo is coming from.
f
What Pants workunit is the sandbox being run under?
(This is why log and pants.toml would be useful ...)
Then we can at least know which Pants rules was trying to execute.
g
@fast-nail-55400 I have one better for ya! I can give you the full logs AND the full copy of the sandbox it created.
p.s.
Copy code
12:26:28.14 [INFO] Preserving local process execution dir /private/var/folders/j5/lgkzhxy16fn_gtx5l8wwzgxr0000gp/T/pants-sandbox-kVfxAz for Install Python for Pants usage
context: some internal Pants rule wants to run a Python script in the sandbox. The Python is obtained from Python Build Standalone.
That PBS Python can be adjusted via the
python-bootstrap
options: https://www.pantsbuild.org/stable/reference/subsystems/python-bootstrap
Also, that is why changing the user's Python did not work, Pants was using the PBS Python.
that PBS Python is somewhat old as it is the
20241008
release
let me construct a config to try to update that
g
Thanks @fast-nail-55400!
Let me know if there is a config I can test on a developers laptop so I can give feedback.
f
Copy code
[python-bootstrap.internal_python_build_standalone_info]
"linux_arm64" = ["<https://github.com/astral-sh/python-build-standalone/releases/download/20250517/cpython-3.11.12%2B20250517-aarch64-unknown-linux-gnu-install_only_stripped.tar.gz>", "dab026afde9ae182c42812178dd710782a9d0b53865aaef8c673fc4f430be19a", 29084431]
"linux_x86_64" = ["<https://github.com/astral-sh/python-build-standalone/releases/download/20250517/cpython-3.11.12%2B20250517-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz>", "625786f96cbb94f011aca6694ac6694fb9675ff2f184d96129584d6d3e912c37", 31553894]
"macos_arm64" = ["<https://github.com/astral-sh/python-build-standalone/releases/download/20250517/cpython-3.11.12%2B20250517-aarch64-apple-darwin-install_only_stripped.tar.gz>", "82ffd1ecf04d447580b40d5c5abb5bf12c6838b009e1e75e92dae05debfc9986", 18025991]
"macos_x86_64" = ["<https://github.com/astral-sh/python-build-standalone/releases/download/20250517/cpython-3.11.12%2B20250517-x86_64-apple-darwin-install_only_stripped.tar.gz>", "987d5d7b1cf57d2d7a3000b201b6890ab200558de929a80fad153207fe557a3b", 18342978]
That's the config to have Pants use release 20250517,
👀 1
g
Thanks. I'll try it out on the devs laptop.
👍 1
f
And to make it easier going forward, here is the script I used to construct the config. It reads the PBS release metadata in the Pants repo at https://github.com/pantsbuild/pants/blob/a779f8679cb6bb92eb50a0e3d88a2ae619912ed5/[…]end/python/providers/python_build_standalone/versions_info.json
g
f
So we should probably upgrade the PBS used by Pants rules then.
g
@fast-nail-55400 should I formally open up a bug in pants?
f
👍
g