We upgraded to 2.33 and I'm having problems packag...
# general
a
We upgraded to 2.33 and I'm having problems packaging things locally (works, or at least fails later, for other people in the company and on the CI). This is the error I'm getting at the
Extract Pants' execution Python
step:
Copy code
native_engine.IntrinsicError: Failed to digest inputs: "Failed to open \"/private/var/folders/3t/4yhk08n934708bzc4b1q4b3m0000gn/T/pants-sandbox-Trjjoy/python/share/terminfo/1/1178\": Permission denied (os error 13)"
Which is true, that file has 000 perms:
Copy code
----------  1 cbirzan  staff  0 Aug 18 18:16 /private/var/folders/3t/4yhk08n934708bzc4b1q4b3m0000gn/T/pants-sandbox-Trjjoy/python/share/terminfo/1/1178
However, what I'm trying to understand is where is this coming from, it's not in the python tar.gz (
cpython-3.14.4+20260414-aarch64-apple-darwin-install_only.tar.gz
)
Oh, I see, that's the Linux python.
But, in that tar gz, that file is a symlink
The file it points to is readable, and I checked two other symlinks from the tar gz, they're also 000
cpython-3.14.0+20251014-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
is the tar
github.com/astral-sh/python-build-standalone/issues/231#… Okay, so that's the issue. I got on a call with a coworker, and his pants is not running that step...
d
I've seen this issue when host = mac (case insensitive) and pants is using the docker backend but mounting a case insensitive file system and writing the pants sandbox there. The fix the bazel folks made was to exclude terminfo as part of the
tar xf
command. I have a branch somewhere where I was going to propose a fix, but I haven't follwed up on opening a PR.
a
What I don't understand is why it's trying to extract in my filesystem, and not in the docker container
It knows to run in the docker environment, it knows it needs to start a docker container to do this... but then dumps it in a local sandbox 🤷
At the end of the day, that won't work, it's extracting a linux python and... then what, can't run that
What bothers me is that other people in the company don't have this problem, haha
The only thing that I can think of is that I'm using rancher and they're using docker desktop, but I didn't get around to convincing someone to install rancher to try 🙂
d
it happened to me with colima but not with docker. I ended up switching back to docker desktop. Apparently docker desktop does some magic to make the mac-mounted file system appear as case sensitive
a
Oh, so it extracts it there, then mounts it as a volume in the docker image? Because this isn't a volume
d
no, I may be mixing up terminology, typically /tmp is a shared volume that the host mounts inside of the docker/rancher/colima vm
a
Hmmm, let me check, you might be right
d
so the other workaround is to tell pants to use a directory other than /tmp for its sandboxes - i forget which env var it is
a
Oh, you are right
Copy code
{
                "Type": "bind",
                "Source": "/private/var/folders/3t/4yhk08n934708bzc4b1q4b3m0000gn/T",
                "Destination": "/pants-sandbox",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            },
Oh, and there's a way to create a case sensitive volume on mac
hm, that didn't work.
Copy code
native_engine.IntrinsicError: Failed to digest inputs: "Failed to open \"/Volumes/pants-docker/pants-sandbox-rq5R6j/python/share/terminfo/1/1178\": Permission denied (os error 13)"
even thugh, I was able to create
a
and
A
there
Copy code
cbirzan@GP3CMXYV9V:/Volumes/pants-docker/pants-sandbox-rq5R6j$ touch a
cbirzan@GP3CMXYV9V:/Volumes/pants-docker/pants-sandbox-rq5R6j$ touch A
cbirzan@GP3CMXYV9V:/Volumes/pants-docker/pants-sandbox-rq5R6j$ ls
__run.sh                                                                        cpython-3.14.0+20251014-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
a                                                                               python
A
cbirzan@GP3CMXYV9V:/Volumes/pants-docker/pants-sandbox-rq5R6j$
d
it may only happen with symlinks? here's teh bazel ticket github.com/bazel-contrib/rules_python/issues/1800
a
I don't know, since the first one explodes 🙂
But I've seen all symlinks seem to be broken
and I couldn't find any that are not symlinks that are not broken
Terminfo, if nothing else, shouldn't really be needed there
d
agreed
a
So, moved away from rancher, but we're now hitting weird errors, still related to filesystem operations. But I can't figure out why. I had pex failing to find a file that obviously existed, but when I used the pex from 2.24 (version we upgraded from), which used to work, it also failed.
But that was with Docker VMM, with the regular virtualisation:
Copy code
File "/pants-named-caches/python_build_standalone/39fa30435b5f9f2e3ed08a1247c0a6527fce9d8511437a3ed71b1dff568b92e6/lib/python3.14/multiprocessing/forkserver.py", line 159, in ensure_running
    os.chmod(address, 0o600)
    ~~~~~~~~^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument: '/pants-sandbox/pants-sandbox-fiLBzn/.tmp/pymp-h80mefyx/sock-in0pwe3a'
[Errno 22] Invalid argument: '/pants-sandbox/pants-sandbox-fiLBzn/.tmp/pymp-h80mefyx/sock-in0pwe3a'
Anyway, I'll start another thread, because at least this problem I worked around. Though, it still happens with docker VMM, not only rancher 🤷