Hey, I've been randomly getting errors like this r...
# general
s
Hey, I've been randomly getting errors like this recently - any ideas on any further debugging I could do to either fix our setup or for a bug report? updating from 2.23 -> 2.24 fixed this actually, pasted original error in the thread in case anyone else comes across this in the future šŸ™‚
Copy code
$ tree /Users/darren/.cache/pants/named_caches/pex_root/packed_wheels/d774d40b5241f925beeb8b4104d57db050a288af9bbce414ff749a9fd607b614
/Users/darren/.cache/pants/named_caches/pex_root/packed_wheels/d774d40b5241f925beeb8b4104d57db050a288af9bbce414ff749a9fd607b614
└── un-compressed
    └── cryptography-44.0.2-cp39-abi3-manylinux_2_34_aarch64.whl
it's weird, the file it's trying to copy exists in the
un-compressed/
subfolder
updating from 2.23 -> 2.24 seemed to fix the issue actually
Copy code
$ pants package //REDACTED:docker
15:57:41.94 [INFO] Starting: Building 6 requirements for REDACTED/migrations.pex from the 3rdparty/python/default.lock resolve: alembic==1.14.0, asyncpg==0.30.0, cloud-sql-python-connector[asyncpg]==1.15.0, pydantic==2.10.4, sqla... (41 characters truncated)
15:57:42.63 [INFO] Completed: Building 6 requirements for REDACTED/migrations.pex from the 3rdparty/python/default.lock resolve: alembic==1.14.0, asyncpg==0.30.0, cloud-sql-python-connector[asyncpg]==1.15.0, pydantic==2.10.4, sqla... (41 characters truncated)
15:57:42.64 [ERROR] 1 Exception encountered:

Engine traceback:
  in `package` goal

ProcessExecutionFailure: Process 'Building 6 requirements for REDACTED/migrations.pex from the 3rdparty/python/default.lock resolve: alembic==1.14.0, asyncpg==0.30.0, cloud-sql-python-connector[asyncpg]==1.15.0, pydantic==2.10.4, sqlalchemy[asyncio]==2.0.36, sqlmodel==0.0.22' failed with exit code 1.
stdout:

stderr:
[Errno 2] No such file or directory: '/Users/darren/.cache/pants/named_caches/pex_root/packed_wheels/d774d40b5241f925beeb8b4104d57db050a288af9bbce414ff749a9fd607b614/cryptography-44.0.2-cp39-abi3-manylinux_2_34_aarch64.whl' -> 'REDACTED/migrations.pex~/.deps/cryptography-44.0.2-cp39-abi3-manylinux_2_34_aarch64.whl'
```
f
Probably because of the
pex
version being upgraded implicitly?
s
oh maybe!
After lots of debugging, I think I finally found what was causing my issue Some
pex_binary(...)
targets had
extra_build_args=["--no-compress"]
(with the hope of speeding up CI time) and some didn't. Depending on what order things were built in, sometimes it worked, sometimes it didn't.
seems when the
--no-compress
targets built first it'd break, but it was fine if they built last
I wonder if the
<hash>
in
/Users/darren/.cache/pants/named_caches/pex_root/packed_wheels/<hash>
needs to incorporate the extra_build_args somehow (if that's even possible)