Hi! I'm having some problem when running pants tes...
# general
l
Hi! I'm having some problem when running pants test in docker_environment from the GH actions CI. I have a docker_environment configured:
Copy code
docker_environment(
    name="test_docker_env",
    platform="linux_x86_64",
    image="test_docker_env:v1",
    fallback_environment="linux_compatible",
)
And I have a script:
Copy code
pants package //repo-root/docker:test_docker_env
pants test //repo-root/tests/some_tests::
When executing it locally on both mac os and linux it works fine. When run from gh actions:
Copy code
Built docker image: test_docker_env:v1
Docker image ID: sha256:a63e768ce3f98ec36e941a699bb30fedffb00a021e8f69fb4ec14bb506956e51
Error: 5.85 [ERROR] 1 Exception encountered:
Engine traceback:
  in `test` goal
ProcessExecutionFailure: Process 'Extract Pants' execution Python' failed with exit code 2.
stdout:
python/bin/2to3
python/bin/2to3-3.9
python/bin/idle3
python/bin/idle3.9
python/bin/pip
python/bin/pip3
python/bin/pip3.9
python/bin/pydoc3
python/bin/pydoc3.9
python/bin/python3

....

python/lib/python3.9/site-packages/pip/_internal/cli/status_codes.py
python/lib/python3.9/site-packages/pip/_internal/commands/__init__.py
python/lib/python3.9/site-packages/pip/_internal/commands/cache.py
python/lib/python3.9/site-packages/pip/_internal/commands/check.py
Does anyone has any suggestions about where/what to check? Thanks!
b
Sorry for the trouble. Is that the full output (other what I imagine is just more file paths trimmed in the
...
)?
l
the full content
And in the gh action job config I use:
Copy code
runs-on: ubuntu-22.04
I guess this might be because some docker in docker issues. Couldn't find any working solution yet
when triggered with
-ldebug --print-stacktrace
Copy code
Traceback (most recent call last):
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/core/goals/test.py", line 908, in run_tests
    results = await MultiGet(
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 376, in MultiGet
    return await _MultiGet(tuple(__arg0))
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 174, in __await__
    result = yield self.gets
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/backend/python/goals/pytest_runner.py", line 518, in run_python_tests
    setup = await Get(
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 124, in __await__
    result = yield self
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/backend/python/goals/pytest_runner.py", line 301, in setup_pytest_for_target
    ) = await MultiGet(
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 466, in MultiGet
    return await _MultiGet((__arg0, __arg1, __arg2, __arg3, __arg4, __arg5))
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 174, in __await__
    result = yield self.gets
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/backend/python/util_rules/pex.py", line 820, in create_pex
    result = await Get(BuildPexResult, PexRequest, request)
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 124, in __await__
    result = yield self
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/backend/python/util_rules/pex.py", line 820, in create_pex
    result = await Get(BuildPexResult, PexRequest, request)
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 124, in __await__
    result = yield self
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/backend/python/util_rules/pex.py", line 681, in build_pex
    pex_python_setup = await _determine_pex_python_and_platforms(request)
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/backend/python/util_rules/pex.py", line 450, in _determine_pex_python_and_platforms
    python = await Get(
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 124, in __await__
    result = yield self
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/backend/python/util_rules/pex.py", line 681, in build_pex
    pex_python_setup = await _determine_pex_python_and_platforms(request)
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/backend/python/util_rules/pex.py", line 450, in _determine_pex_python_and_platforms
    python = await Get(
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 124, in __await__
    result = yield self
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/backend/python/util_rules/pex.py", line 365, in find_interpreter
    result = await Get(
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 124, in __await__
    result = yield self
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/core/util_rules/adhoc_binaries.py", line 55, in get_python_for_scripts
    result = await Get(_PythonBuildStandaloneBinary, _DownloadPythonBuildStandaloneBinaryRequest())
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 124, in __await__
    result = yield self
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/core/util_rules/adhoc_binaries.py", line 85, in download_python_binary
    download_result = await Get(
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 124, in __await__
    result = yield self
  File "/home/runner/.cache/nce/60b513559c7b53eb2acecbd7b8aaaeb942686f3997d07fa77377b51324f58fda/bindings/venvs/2.20.1/lib/python3.9/site-packages/pants/engine/process.py", line 309, in fallible_to_exec_result_or_raise
    raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Extract Pants' execution Python' failed with exit code 2.
Opened an issue for that problem: https://github.com/pantsbuild/pants/issues/20930
b
thanks for filing an issue!