I had an interesting `pants test` failure today th...
# general
h
I had an interesting
pants test
failure today that we are having trouble reproducing. Seems almost entirely due to pants/pex based on the error log, but would appreciate guidance on making a bug ticket in the right capacity.
Copy code
Traceback (most recent call last):
  File "/tmp/process-executionGmrsdT/.cache/pex_root/venvs/3ad0f8096ed09d4b74b6393f05ab9a5d3030620e/90453c2bcf79458830de926d4c295e2d83ab24b5/pex", line 160, in <module>
    module = importlib.import_module(module_name)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/buildbot/.cache/pants/named_caches/pex_root/venvs/s/257e4c74/venv/lib/python3.8/site-packages/pytest/__init__.py", line 3, in <module>
    from . import collect
  File "/home/buildbot/.cache/pants/named_caches/pex_root/venvs/s/257e4c74/venv/lib/python3.8/site-packages/pytest/collect.py", line 8, in <module>
    from _pytest.deprecated import PYTEST_COLLECT_MODULE
ModuleNotFoundError: No module named '_pytest'
e
@high-yak-85899 the interesting info will be the actual contents of that venv. Namely, is the ModuleNotFoundError "correct"? Can you provide a listing of
/home/buildbot/.cache/pants/named_caches/pex_root/venvs/s/257e4c74/venv/lib/python3.8/site-packages
?
h
This was on our build system and we tried to snapshot it as fast as possible, but not sure if the cache got invalidated between this error and us snapshotting. I do see
_pytest
in what we were able to snapshot.
e
Ok. Are there any interesting facts about
/home/buildbot
? Does that reside on a standard local disk partition?
h
It's part of builder docker container
I'm not sure if it's mounted to the host in any way. I don't believe it is.
e
That would be good to confirm, but besides that this is extremely hard to debug without the snapshot of the filesystem. I'd just file the bug with all these details as well as the version of pytest. Until more data is forthcoming I don't think the issue will bear fruit, but at least there is a central place to collect information.
h
That was kind of my thinking too. It's hard to share details properly in a way that doesn't reveal our third party dependencies and source code too heavily.