When running pants test how do I determine which f...
# general
g
When running pants test how do I determine which file/source is related to the error? 🧵
Copy code
pants --process-execution-local-parallelism=5 --changed-since=origin/main --changed-dependents=transitive --test-shard=9/10 test
Copy code
11:19:03.99 [ERROR] 1 Exception encountered:

Engine traceback:
  in root
    ..
  in pants.core.goals.test.run_tests
    `test` goal

Traceback (most recent call last):
  File "/Users/jasonbarnett/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/core/goals/test.py", line 928, in run_tests
    results = await MultiGet(
  File "/Users/jasonbarnett/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 376, in MultiGet
    return await _MultiGet(tuple(__arg0))
  File "/Users/jasonbarnett/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 174, in __await__
    result = yield self.gets
  File "/Users/jasonbarnett/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/backend/python/goals/pytest_runner.py", line 517, in run_python_tests
    setup = await Get(
  File "/Users/jasonbarnett/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 124, in __await__
    result = yield self
  File "/Users/jasonbarnett/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/backend/python/goals/pytest_runner.py", line 301, in setup_pytest_for_target
    ) = await MultiGet(
  File "/Users/jasonbarnett/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 466, in MultiGet
    return await _MultiGet((__arg0, __arg1, __arg2, __arg3, __arg4, __arg5))
  File "/Users/jasonbarnett/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 174, in __await__
    result = yield self.gets
  File "/Users/jasonbarnett/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/backend/python/util_rules/pex.py", line 826, in create_pex
    result = await Get(BuildPexResult, PexRequest, request)
  File "/Users/jasonbarnett/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 124, in __await__
    result = yield self
  File "/Users/jasonbarnett/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/backend/python/util_rules/pex.py", line 720, in build_pex
    requirements_setup = await _setup_pex_requirements(request, python_setup)
  File "/Users/jasonbarnett/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/backend/python/util_rules/pex.py", line 601, in _setup_pex_requirements
    validate_metadata(
  File "/Users/jasonbarnett/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/backend/python/util_rules/pex_requirements.py", line 525, in validate_metadata
    raise InvalidLockfileError(msg)
pants.core.util_rules.lockfile_metadata.InvalidLockfileError: You are consuming `boto3==1.34.135`, `hvac<0.11.0,>=0.10`, and 5 other requirements from the `altana-alt` lockfile at apps/alt/pants.lock with incompatible inputs.



- The inputs use interpreter constraints (`CPython<3.12,>=3.9`) that are not a subset of those used to generate the lockfile (`CPython<3.11,>=3.9`).

- The input interpreter constraints are specified by your code, using the `[python].interpreter_constraints` option and the `interpreter_constraints` target field.

- To create a lockfile with new interpreter constraints, update the option `[python].resolves_to_interpreter_constraints`, and then generate the lockfile (see below).

See <https://www.pantsbuild.org/2.21/docs/python/overview/interpreter-compatibility> for details.

To regenerate your lockfile, run `pants generate-lockfiles --resolve=altana-alt`.

See <https://www.pantsbuild.org/2.21/docs/python/overview/third-party-dependencies> for details.
I even ran with
-ldebug
and I couldn't see the filename printed anywhere
p
To me this looks like a crash in pants test goal, before running any test
You need to sort out lockfile/interpreter constraint issue first...
g
Ok.