Hello, team. I’m trying to execute pants test thro...
# general
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
Here's the typical structure of the
Copy code
$ tree -d -L 2 ~/.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
dirs are symlinks to
directories. It would seem you still have the symlink but you don't have the complete target directory (your target directory is missing a
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
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.
After upgrading Pants from 2.9 to 2.10, it seems to go properly. Thanks Sirois
👍 1