hundreds-father-404
04/08/2022, 6:30 PM❯ ./pants test src/python/pants/backend/python/util_rules/lockfile_metadata_test.py
Engine traceback:
in select
in pants.core.goals.test.run_tests
in pants.backend.python.goals.pytest_runner.run_python_test (src/python/pants/backend/python/util_rules/lockfile_metadata_test.py:tests)
in pants.backend.python.goals.pytest_runner.setup_pytest_for_target
in pants.backend.python.util_rules.pex.create_pex
in pants.backend.python.util_rules.pex.build_pex (requirements.pex)
in pants.engine.process.fallible_to_exec_result_or_raise
Traceback (most recent call last):
File "/Users/ericarellano/code/pants/src/python/pants/engine/process.py", line 272, in fallible_to_exec_result_or_raise
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Building 11 requirements for requirements.pex from the 3rdparty/python/user_reqs.lock resolve: PyYAML<7.0,>=6.0, ansicolors==1.1.8, packaging==21.3, pex==2.1.77, pytest<7.1.0,>=6.2.4, setuptools<58.0,>=56.0.0, toml==0.10.2, types-PyYAML==6.0.3, types-setuptools==57.4.7, types-toml==0.10.3, typing-extensions==4.0.1' failed with exit code 1.
stdout:
stderr:
Traceback (most recent call last):
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/installed_wheels/607cd8973e976e388537a962f1c47db79acb93c0c37055a6b47e4fa99c13442a/pex-2.1.77-py2.py3-none-any.whl/pex/fetcher.py", line 79, in get_body_stream
yield body_stream
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/installed_wheels/607cd8973e976e388537a962f1c47db79acb93c0c37055a6b47e4fa99c13442a/pex-2.1.77-py2.py3-none-any.whl/pex/resolve/lock_resolver.py", line 67, in save
for chunk in iter(lambda: stream.read(self._BUFFER_SIZE), b""):
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/installed_wheels/607cd8973e976e388537a962f1c47db79acb93c0c37055a6b47e4fa99c13442a/pex-2.1.77-py2.py3-none-any.whl/pex/resolve/lock_resolver.py", line 67, in <lambda>
for chunk in iter(lambda: stream.read(self._BUFFER_SIZE), b""):
File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 463, in read
n = self.readinto(b)
File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 507, in readinto
n = self.fp.readinto(b)
File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 704, in readinto
return self._sock.recv_into(b)
File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/unzipped_pexes/ee5e123a2c302f34cbb0831c696b2134df893f39/.bootstrap/pex/pex.py", line 504, in execute
exit_value = self._wrap_coverage(self._wrap_profiling, self._execute)
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/unzipped_pexes/ee5e123a2c302f34cbb0831c696b2134df893f39/.bootstrap/pex/pex.py", line 409, in _wrap_coverage
return runner(*args)
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/unzipped_pexes/ee5e123a2c302f34cbb0831c696b2134df893f39/.bootstrap/pex/pex.py", line 440, in _wrap_profiling
return runner(*args)
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/unzipped_pexes/ee5e123a2c302f34cbb0831c696b2134df893f39/.bootstrap/pex/pex.py", line 560, in _execute
return self.execute_entry(self._pex_info.entry_point)
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/unzipped_pexes/ee5e123a2c302f34cbb0831c696b2134df893f39/.bootstrap/pex/pex.py", line 696, in execute_entry
return self.execute_pkg_resources(entry_point)
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/unzipped_pexes/ee5e123a2c302f34cbb0831c696b2134df893f39/.bootstrap/pex/pex.py", line 728, in execute_pkg_resources
return runner()
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/installed_wheels/607cd8973e976e388537a962f1c47db79acb93c0c37055a6b47e4fa99c13442a/pex-2.1.77-py2.py3-none-any.whl/pex/bin/pex.py", line 739, in main
do_main(
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/installed_wheels/607cd8973e976e388537a962f1c47db79acb93c0c37055a6b47e4fa99c13442a/pex-2.1.77-py2.py3-none-any.whl/pex/bin/pex.py", line 760, in do_main
pex_builder = build_pex(
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/installed_wheels/607cd8973e976e388537a962f1c47db79acb93c0c37055a6b47e4fa99c13442a/pex-2.1.77-py2.py3-none-any.whl/pex/bin/pex.py", line 609, in build_pex
resolve_from_lock(
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/installed_wheels/607cd8973e976e388537a962f1c47db79acb93c0c37055a6b47e4fa99c13442a/pex-2.1.77-py2.py3-none-any.whl/pex/resolve/lock_resolver.py", line 305, in resolve_from_lock
pool.map(
File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 364, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 771, in get
raise self._value
File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/installed_wheels/607cd8973e976e388537a962f1c47db79acb93c0c37055a6b47e4fa99c13442a/pex-2.1.77-py2.py3-none-any.whl/pex/resolve/lock_resolver.py", line 163, in download_artifact
return catch(
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/installed_wheels/607cd8973e976e388537a962f1c47db79acb93c0c37055a6b47e4fa99c13442a/pex-2.1.77-py2.py3-none-any.whl/pex/result.py", line 101, in catch
return func(*args, **kwargs)
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/installed_wheels/607cd8973e976e388537a962f1c47db79acb93c0c37055a6b47e4fa99c13442a/pex-2.1.77-py2.py3-none-any.whl/pex/resolve/lockfile/download_manager.py", line 152, in store
self.save(
File "/Users/ericarellano/.cache/pants/named_caches/pex_root/installed_wheels/607cd8973e976e388537a962f1c47db79acb93c0c37055a6b47e4fa99c13442a/pex-2.1.77-py2.py3-none-any.whl/pex/resolve/lock_resolver.py", line 69, in save
digest.update(chunk)
File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 169, in __exit__
raise RuntimeError("generator didn't stop after throw()")
RuntimeError: generator didn't stop after throw()
enough-analyst-54434
04/08/2022, 6:57 PMsocket.timeout: The read operation timed out
So retry in CI is fine. I'll file a Pex issue to unmask the real error in these cases.hundreds-father-404
04/08/2022, 7:00 PM15:05:49.82 [ERROR] Completed: Run Pytest - src/python/pants/backend/python/util_rules/lockfile_metadata_test.py:tests failed (exit code 2).
130
/home/runner/.cache/pants/named_caches/pex_root/venvs/s/200996e5/venv/bin/python3.7: can't open file '/home/runner/.cache/pants/named_caches/pex_root/venvs/d42841a31cba806a3a8511be281c9bb745f3a197/c0d45e5f0038cae13f87b120ee9e80b473618a0b/pex': [Errno 2] No such file or directory
131
enough-analyst-54434
04/08/2022, 7:01 PMError
instance: https://github.com/pantsbuild/pex/issues/1715/home/runner/.cache/pants/named_caches/pex_root/venvs/d42841a31cba806a3a8511be281c9bb745f3a197/c0d45e5f0038cae13f87b120ee9e80b473618a0b/
exists but is empty. If you then delete the empty /home/runner/.cache/pants/named_caches/pex_root/venvs/d42841a31cba806a3a8511be281c9bb745f3a197/c0d45e5f0038cae13f87b120ee9e80b473618a0b/
dir leaving just the parent dir behind ( /home/runner/.cache/pants/named_caches/pex_root/venvs/d42841a31cba806a3a8511be281c9bb745f3a197/
) - everything works and the venv re-builds. Baked in to this whole scheme to save 40ms of overhead from running from the --venv
PEX file directly is the assumption that the PEX_ROOT won't be tampered with. It can be missing, and a rebuild happens, but if there is a targeted delete of interior contents all bets are off.but if there is a targeted delete of interior contents all bets are off.Because, to check for this would require an operation slower than or roughly taking the same time as the 40ms; thus, negating the whole point.
hundreds-father-404
04/08/2022, 10:37 PM