clever-ghost-87030
08/17/2022, 7:45 PM./pants generate-lockfiles fmt ::
ProcessExecutionFailure: Process 'Find interpreter for constraints: CPython<4.0,>=3.9' failed with exit code 102.
It seems to think the interpreter is broken:
Skipped the following broken interpreters:
1.) /mnt/github_actions_runner/_work/_tool/Python/3.10.6/x64/bin/python3.10:
/mnt/github_actions_runner/_work/_tool/Python/3.10.6/x64/bin/python3.10: error while loading shared libraries: libpython3.10.so.1.0: cannot open shared object file: No such file or directory
2.) /mnt/github_actions_runner/_work/_tool/Python/3.9.13/x64/bin/python3.9:
/mnt/github_actions_runner/_work/_tool/Python/3.9.13/x64/bin/python3.9: error while loading shared libraries: libpython3.9.so.1.0: cannot open shared object file: No such file or directory
Not sure how to fix this, any help would be appreciatedenough-analyst-54434
08/17/2022, 7:49 PMclever-ghost-87030
08/17/2022, 7:50 PMenough-analyst-54434
08/17/2022, 7:52 PMenough-analyst-54434
08/17/2022, 7:53 PMtoolcache
is a different path for your self-hosted runner, so if you want to contribute back a parameter for that in the actio, that would be great. Perhaps it lives in an env var I'm not aware of. At the very least, you have a technique you can copy and that should work.clever-ghost-87030
08/17/2022, 7:56 PMenough-analyst-54434
08/17/2022, 7:57 PMenough-analyst-54434
08/17/2022, 7:57 PMenough-analyst-54434
08/17/2022, 7:57 PMenough-analyst-54434
08/17/2022, 7:58 PMenough-analyst-54434
08/17/2022, 7:58 PMenough-analyst-54434
08/17/2022, 7:58 PMclever-ghost-87030
08/17/2022, 7:59 PMenough-analyst-54434
08/17/2022, 8:00 PMclever-ghost-87030
08/17/2022, 8:01 PMenough-analyst-54434
08/17/2022, 8:03 PMpants.toml
, a CI-specific toml for this: https://www.pantsbuild.org/docs/using-pants-in-ci#configuring-pants-for-ci-pantscitoml-optionalhttps://www.pantsbuild.org/docs/using-pants-in-ci#configuring-pants-for-ci-pantscitoml-optionalclever-ghost-87030
08/17/2022, 8:06 PMenough-analyst-54434
08/17/2022, 8:06 PMhappy-kitchen-89482
08/17/2022, 8:06 PMclever-ghost-87030
08/17/2022, 8:07 PMenough-analyst-54434
08/17/2022, 8:08 PMenough-analyst-54434
08/17/2022, 8:09 PMclever-ghost-87030
08/17/2022, 8:11 PMclever-ghost-87030
08/17/2022, 8:11 PMenough-analyst-54434
08/17/2022, 8:11 PMclever-ghost-87030
08/17/2022, 9:09 PM/mnt/github_actions_runner/_work/_tool/Python/3.9.13/x64/bin/python3.9: error while loading shared libraries: libpython3.9.so.1.0: cannot open shared object file: No such file or directory
I even tried adding the exposing code (which seemed to work correctly for exposing it). I will say it's coming now at a different place:
Process 'Determine Python dependencies for tests/python/<stuff>/test_<something>.py' failed with exit code 127.
enough-analyst-54434
08/17/2022, 9:23 PMenough-analyst-54434
08/17/2022, 9:24 PMclever-ghost-87030
08/17/2022, 9:25 PMenough-analyst-54434
08/17/2022, 9:25 PMclever-ghost-87030
08/17/2022, 9:26 PMenough-analyst-54434
08/17/2022, 9:26 PMclever-ghost-87030
08/17/2022, 9:28 PM/mnt/github_actions_runner/_work/_tool/Python/3.10.6/x64/bin/autotransform
That's in the stack trace for the AutoTransform script, so it definitely appears to be the same 3.10clever-ghost-87030
08/17/2022, 9:28 PMExposing /mnt/github_actions_runner/_work/_tool/Python/3.10.6/x64/bin: Python 3.10.6
enough-analyst-54434
08/17/2022, 9:31 PMclever-ghost-87030
08/17/2022, 9:33 PMenough-analyst-54434
08/17/2022, 9:35 PM-ldebug
or (export PANTS_LEVEL=debug
or [GLOBAL] level = "debug"
) and --pex-verbosity=9
(or PANTS_PEX_VERBOSITY=9
or [pex] verbosity = 9
) and see if that turns up more useful info in the CI output log.enough-analyst-54434
08/17/2022, 9:37 PM$ bash foo
bash: foo: No such file or directory
$ echo $?
127
But I don't know what to make of that.enough-analyst-54434
08/17/2022, 9:37 PMenough-analyst-54434
08/17/2022, 9:46 PMclever-ghost-87030
08/17/2022, 9:49 PM/mnt/github_actions_runner/_work/_tool/Python/3.9.13/x64/bin/python3.9: error while loading shared libraries: libpython3.9.so.1.0: cannot open shared object file: No such file or directory
So it seems like it just can't find this thing?clever-ghost-87030
08/17/2022, 9:53 PMclever-ghost-87030
08/17/2022, 10:10 PMenough-analyst-54434
08/17/2022, 11:01 PM./pants --no-process-cleanup X
(or ./pants --keep-sandboxes=on_failure X
for bleeding edge Pants versions). That will cause lines like this to print out:
$ ./pants --no-process-cleanup test --force src/python/pants/util/strutil_test.py
16:00:33.83 [INFO] Preserving local process execution dir /tmp/pants-sandbox-g0DNAk for Run Pytest for src/python/pants/util/strutil_test.py:tests
16:00:34.17 [INFO] Completed: Run Pytest - src/python/pants/util/strutil_test.py:tests succeeded.
✓ src/python/pants/util/strutil_test.py:tests succeeded in 0.29s.
You can then run like so to emulate what is happening ~exactly:
$ /tmp/pants-sandbox-g0DNAk/__run.sh
============================================================================================================================== test session starts ==============================================================================================================================
collected 17 items
src/python/pants/util/strutil_test.py ................. [100%]
----------------------------------------------------------------------------------------- generated xml file: /tmp/pants-sandbox-g0DNAk/src.python.pants.util.strutil_test.py.tests.xml -----------------------------------------------------------------------------------------
============================================================================================================================== 17 passed in 0.08s ===============================================================================================================================
And then you can start hacking on that __run.sh
script to debug further.clever-ghost-87030
08/17/2022, 11:22 PMenough-analyst-54434
08/17/2022, 11:47 PMPexProcess
or `VenvPexProcess`and those automatically support subprocess_environment
env var propagation.enough-analyst-54434
08/17/2022, 11:52 PMenough-analyst-54434
08/17/2022, 11:56 PMenough-analyst-54434
08/18/2022, 12:03 AMhappy-kitchen-89482
08/18/2022, 4:05 PMnice-park-16693
03/16/2023, 2:28 PMvictorious-animal-71161
05/03/2023, 3:13 PM/opt/hostedtoolcache
, append line AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
to the .env
file where actions runner package is installed and then restart the actions service. I’ve managed to run CI jobs with Pants successfully on our self hosted runners by applying this workaround.happy-kitchen-89482
05/03/2023, 8:34 PMvictorious-animal-71161
05/04/2023, 4:16 AMvictorious-animal-71161
05/04/2023, 1:36 PM