https://pantsbuild.org/ logo
#general
Title
# general
f

freezing-quill-50372

04/08/2022, 5:42 AM
Hello, team. I’m trying to execute pants test through GitHub Actions with the attached config (using Pants v2.9) referring to the python example repo. When I make a pull-request, the Action goes properly at first. However, after some commits, the Action fails with the following message on the bootstrap step (it seems that the python execution file is not found). When I also ran the tests or lints on my local environment, those finished properly. How do I fix it?
Copy code
Run ./pants --version
./pants: line 371: /home/runner/.cache/pants/setup/bootstrap-Linux-x86_64/2.9.0_py39/bin/python: No such file or directory
e

enough-analyst-54434

04/08/2022, 2:21 PM
Here's the typical structure of the
~/.cache/pants/setup
dir:
Copy code
$ tree -d -L 2 ~/.cache/pants/setup/bootstrap-Linux-x86_64/
/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/
├── 2.11.0rc1_py39 -> /home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.a8FakE/install
├── 2.9.0_py38 -> /home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.S6hj1G/install
├── pants.a8FakE
│   └── install
├── pants.HXDzxY
│   └── install
├── pants.S6hj1G
│   └── install
├── pex-2.1.62
└── virtualenv-20.4.7
Note that the
bootstrap-Linux-x86_64/X.Y.Z_pyXY
dirs are symlinks to
pants.ABCDEFG/install
directories. It would seem you still have the symlink but you don't have the complete target directory (your target directory is missing a
bin/
subdirectory for example). I can't explain why that would be so, but the error message you post seems to indicate that. I do notice from the error message that you're using a fairly old
pants
bootstrap script. You may want to re-fresh that using these instructions: https://www.pantsbuild.org/docs/installation#creating-the-launch-script That will at least help debugging with modern line numbers if you continue to get the same style error after the upgrade.
f

freezing-quill-50372

04/11/2022, 9:32 PM
After upgrading Pants from 2.9 to 2.10, it seems to go properly. Thanks Sirois
👍 1
2 Views