Hey all - since upgrading to pants 2.23.0, we are ...
# general
p
Hey all - since upgrading to pants 2.23.0, we are having a problem running it in our CI (specifically as part of a renovatebot workflow). Reverting to 2.22.0 in
pants.toml
works fine. I couldn't see anything about changes needed in the release notes. The environment we're running in is ubuntu 24.04. I install pants with
curl --proto '=https' --tlsv1.2 -fsSL <https://static.pantsbuild.org/setup/get-pants.sh> | bash
and then do
pants version
With 2.23.0, this fails with
Copy code
/home/ubuntu/.local/bin/pants version
Bootstrapping Pants 2.23.0
Installing pantsbuild.pants==2.23.0 into a virtual environment at /home/ubuntu/.cache/nce/830340ce637c599fc91aa9134dedaf6fcc4aa28cff14aaee2d17a9fb389f3788/bindings/venvs/2.23.0
Failed to create Pants virtual environment.
Error: Command '['/tmp/containerbase/cache/.cache/nce/830340ce637c599fc91aa9134dedaf6fcc4aa28cff14aaee2d17a9fb389f3788/bindings/pex_root/venvs/e9325278eb97b235cc28d540e6599e7f5e69fa25/c649bd735192cfa7874bb34f690847363e2319ee/bin/python', '/tmp/tmp9jlgr7y5.pex', 'venv', '--prompt', 'Pants 2.23.0', '--compile', '--pip', '--collisions-ok', '--no-emit-warnings', '--disable-cache', '/home/ubuntu/.cache/nce/830340ce637c599fc91aa9134dedaf6fcc4aa28cff14aaee2d17a9fb389f3788/bindings/venvs/2.23.0']' returned non-zero exit status 1., output:
-----
b'Traceback (most recent call last):\n  File "/tmp/containerbase/cache/.cache/nce/67912efc04f9156d8f5b48a0348983defb964de043b8c13ddc6cc8a002f8e691/cpython-3.9.18+20240107-x86_64-unknown-linux-gnu-install_only.tar.gz/python/lib/python3.9/runpy.py", line 197, in _run_module_as_main\n    return _run_code(code, main_globals, None,\n  File "/tmp/containerbase/cache/.cache/nce/67912efc04f9156d8f5b48a0348983defb964de043b8c13ddc6cc8a002f8e691/cpython-3.9.18+20240107-x86_64-unknown-linux-gnu-install_only.tar.gz/python/lib/python3.9/runpy.py", line 87, in _run_code\n    exec(code, run_globals)\n  File "/home/ubuntu/.cache/pex/unzipped_pexes/7be46b58df48a5f579dd66d7f7ed2f32307063b5/__main__.py", line 227, in <module>\n    result, should_exit, is_globals = boot(\n  File "/home/ubuntu/.cache/pex/unzipped_pexes/7be46b58df48a5f579dd66d7f7ed2f32307063b5/__main__.py", line 216, in boot\n    from pex.globals import Globals\nModuleNotFoundError: No module named \'pex\'\n'
-----

Error: Failed to establish atomic directory /home/ubuntu/.cache/nce/830340ce637c599fc91aa9134dedaf6fcc4aa28cff14aaee2d17a9fb389f3788/locks/install-98c3cc9a4448905f51d304e7cec70c05ec00d7216ea1a4448d69883ef810ee90. Population of work directory failed: Boot binding command failed: exit status: 1

Isolates your Pants from the elements.

Please select from the following boot commands:

<default> (when SCIE_BOOT is not set in the environment)  Detects the current Pants installation and launches it.
bootstrap-tools                                           Introspection tools for the Pants bootstrap process.
update                                                    Update scie-pants.

You can select a boot command by setting the SCIE_BOOT environment variable.
If I revert to 2.22.0 in
pants.toml
then it works as it previously did with
Copy code
/home/ubuntu/.local/bin/pants version
Downloading <https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.9.18%2B20240107-x86_64-unknown-linux-gnu-install_only.tar.g>
Downloading <https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.9.18%2B20240107-x86_64-unknown-linux-gnu-install_only.tar.g>
...
Bootstrapping Pants 2.22.0
Installing pantsbuild.pants==2.22.0 into a virtual environment at /home/ubuntu/.cache/nce/830340ce637c599fc91aa9134dedaf6fcc4aa28cff14aaee2d17a9fb389f3788/bindings/venvs/2.22.0
New virtual environment successfully created at /home/ubuntu/.cache/nce/830340ce637c599fc91aa9134dedaf6fcc4aa28cff14aaee2d17a9fb389f3788/bindings/venvs/2.22.0
2.22.0
d
I think it’s a similar issue to https://github.com/pantsbuild/pants/issues/21321
We hit the same. We now delete all of the symlinks in the home directory. .cache is a symlink, I believe?
p
Ah super interesting - because 2.22.0 works for me, and it looks like that dies for you in a similar / same way?
d
iirc, we also saw the issue for the first time when upgrading to 2.23
p
So for me, the home directory in /etc/passwd is not a symlink - it's a 'real' directory. But ~/.cache is a symlink
@dazzling-pizza-75442 How many levels deep was the directory your homedir was symlinked to? I can reproduce the issue at 4 levels (e.g. /tmp/test/cache/.cache) and it works at 3 levels (e.g. /tmp/test/.cache)
h
Thanks for the update on that issue, will take a look
p
Thanks !
h
Can reproduce it (thanks for the clear steps on how to do so), so that makes life a lot easier
😍 1