few-arm-93065
07/22/2022, 10:42 PM[test]
use_coverage = true
[pytest]
args = ["--no-header", "-vv", "--log-cli-level", "INFO"]
[coverage-py]
report = ["html", "xml", "console"]
config="tooling_configs/.coveragerc"
When they run ./pants test
on a python tests target, pytest runs successfully, and then crashes trying to build the coverage pex:
11:08:42.69 [INFO] Completed: Run Pytest - src/stages/qc_metrics/tests/test_qc_math.py:../tests succeeded.
11:08:42.70 [INFO] Completed: Run Pytest - src/stages/qc_metrics/tests/test_qc_metrics.py:../tests succeeded.
✓ src/stages/qc_metrics/tests/test_qc_math.py:../tests succeeded in 4.91s (memoized).
✓ src/stages/qc_metrics/tests/test_qc_metrics.py:../tests succeeded in 18.90s (memoized).
Wrote test XML to `dist/test_results`
11:08:46.73 [INFO] Completed: Building coverage.pex from coverage-py_default_lockfile.txt
11:08:46.73 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Building coverage.pex from coverage-py_default_lockfile.txt' failed with exit code 1.
stdout:
(see thread for more)
It’s very odd that it’s looking for cp38, since we are on 3.9. 3.8 is the system default. And, I don’t have this problem personally, it’s only shown up for two people, but it’s consistently reproducible for them. They’ve already tried clearing the ~/.cache/pants directory to no effect.
Does anyone know anything about this, or have an idea how we could go about debugging it further? Any help appreciated.few-arm-93065
07/22/2022, 10:47 PMstderr:
Traceback (most recent call last):
File "/Users/redacted/.cache/pants/named_caches/pex_root/unzipped_pexes/3c037481d92e64c70b4c4d598b63e24e6c2bb819/.bootstrap/pex/pex.py", line 503, in execute
exit_value = self._wrap_coverage(self._wrap_profiling, self._execute)
File "/Users/redacted/.cache/pants/named_caches/pex_root/unzipped_pexes/3c037481d92e64c70b4c4d598b63e24e6c2bb819/.bootstrap/pex/pex.py", line 408, in _wrap_coverage
return runner(*args)
File "/Users/redacted/.cache/pants/named_caches/pex_root/unzipped_pexes/3c037481d92e64c70b4c4d598b63e24e6c2bb819/.bootstrap/pex/pex.py", line 439, in _wrap_profiling
return runner(*args)
File "/Users/redacted/.cache/pants/named_caches/pex_root/unzipped_pexes/3c037481d92e64c70b4c4d598b63e24e6c2bb819/.bootstrap/pex/pex.py", line 559, in _execute
return self.execute_entry(self._pex_info.entry_point)
File "/Users/redacted/.cache/pants/named_caches/pex_root/unzipped_pexes/3c037481d92e64c70b4c4d598b63e24e6c2bb819/.bootstrap/pex/pex.py", line 695, in execute_entry
return self.execute_pkg_resources(entry_point)
File "/Users/redacted/.cache/pants/named_caches/pex_root/unzipped_pexes/3c037481d92e64c70b4c4d598b63e24e6c2bb819/.bootstrap/pex/pex.py", line 727, in execute_pkg_resources
return runner()
File "/Users/redacted/.cache/pants/named_caches/pex_root/installed_wheels/9fb4bc59f7085c6133bed415fd8806a166d6f472798f2350158f7f0a710ec0f6/pex-2.1.71-py2.py3-none-any.whl/pex/bin/pex.py", line 724, in main
do_main(
File "/Users/redacted/.cache/pants/named_caches/pex_root/installed_wheels/9fb4bc59f7085c6133bed415fd8806a166d6f472798f2350158f7f0a710ec0f6/pex-2.1.71-py2.py3-none-any.whl/pex/bin/pex.py", line 770, in do_main
seed_info = seed_cache(options, pex, verbose=options.seed == Seed.VERBOSE)
File "/Users/redacted/.cache/pants/named_caches/pex_root/installed_wheels/9fb4bc59f7085c6133bed415fd8806a166d6f472798f2350158f7f0a710ec0f6/pex-2.1.71-py2.py3-none-any.whl/pex/bin/pex.py", line 808, in seed_cache
venv_pex = ensure_venv(pex)
File "/Users/redacted/.cache/pants/named_caches/pex_root/installed_wheels/9fb4bc59f7085c6133bed415fd8806a166d6f472798f2350158f7f0a710ec0f6/pex-2.1.71-py2.py3-none-any.whl/pex/pex_bootstrapper.py", line 461, in ensure_venv
shebang = populate_venv(
File "/Users/redacted/.cache/pants/named_caches/pex_root/installed_wheels/9fb4bc59f7085c6133bed415fd8806a166d6f472798f2350158f7f0a710ec0f6/pex-2.1.71-py2.py3-none-any.whl/pex/venv/pex.py", line 121, in populate_venv
record_provenance(_populate_deps(venv, pex, venv_python, symlink))
File "/Users/redacted/.cache/pants/named_caches/pex_root/installed_wheels/9fb4bc59f7085c6133bed415fd8806a166d6f472798f2350158f7f0a710ec0f6/pex-2.1.71-py2.py3-none-any.whl/pex/venv/pex.py", line 117, in record_provenance
for src, dst in src_to_dst:
File "/Users/redacted/.cache/pants/named_caches/pex_root/installed_wheels/9fb4bc59f7085c6133bed415fd8806a166d6f472798f2350158f7f0a710ec0f6/pex-2.1.71-py2.py3-none-any.whl/pex/venv/pex.py", line 205, in _populate_deps
for dist in pex.resolve():
File "/Users/redacted/.cache/pants/named_caches/pex_root/installed_wheels/9fb4bc59f7085c6133bed415fd8806a166d6f472798f2350158f7f0a710ec0f6/pex-2.1.71-py2.py3-none-any.whl/pex/pex.py", line 120, in resolve
for dist in env.resolve():
File "/Users/redacted/.cache/pants/named_caches/pex_root/installed_wheels/9fb4bc59f7085c6133bed415fd8806a166d6f472798f2350158f7f0a710ec0f6/pex-2.1.71-py2.py3-none-any.whl/pex/environment.py", line 495, in resolve
for fingerprinted_distribution in self.resolve_dists(all_reqs)
File "/Users/redacted/.cache/pants/named_caches/pex_root/installed_wheels/9fb4bc59f7085c6133bed415fd8806a166d6f472798f2350158f7f0a710ec0f6/pex-2.1.71-py2.py3-none-any.whl/pex/environment.py", line 519, in resolve_dists
for qualified_req_or_not_found in self._root_requirements_iter(reqs):
File "/Users/redacted/.cache/pants/named_caches/pex_root/installed_wheels/9fb4bc59f7085c6133bed415fd8806a166d6f472798f2350158f7f0a710ec0f6/pex-2.1.71-py2.py3-none-any.whl/pex/environment.py", line 460, in _root_requirements_iter
raise ResolveError(message)
pex.environment.ResolveError: A distribution for coverage could not be resolved in this environment.Found 1 distribution for coverage that do not apply:
1.) The wheel tags for coverage 5.5 are cp38-cp38-macosx_10_14_arm64 which do not match the supported tags of /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/bin/python3.8:
enough-analyst-54434
07/22/2022, 11:17 PM==3.9.*
or >=3.9
or some such to simply gloss over a host of issues with Mac system interpreters generally. But that only makes sense as a quick step if that sort of interpreter constraint actually makes sense for the code under developement.enough-analyst-54434
07/22/2022, 11:18 PMfew-arm-93065
07/22/2022, 11:18 PM[python]
interpreter_constraints = ["CPython==3.9.*"]
enough-analyst-54434
07/22/2022, 11:19 PMenough-analyst-54434
07/22/2022, 11:20 PMenough-analyst-54434
07/22/2022, 11:21 PMfew-arm-93065
07/22/2022, 11:22 PMfew-arm-93065
07/22/2022, 11:22 PMenough-analyst-54434
07/22/2022, 11:23 PMfew-arm-93065
07/23/2022, 12:42 AM