happy-kitchen-89482
03/31/2021, 7:19 PMhappy-kitchen-89482
03/31/2021, 7:19 PMechoing-farmer-15630
03/31/2021, 7:25 PMrequirements.txt
which is calculated when requirements.txt
changes, but until requirements.txt changes, that cache doesn't appear to be rebuilt). We can get an approximation to that by manually looking at some files pants uses (can proxy that all requirements.txt files could be hashed together, say) but there are also some internal dependencies that pants sorts through while creating its caches.
So my question--is there any way to extract that from pants, to tell when the cache has to be rebuilt? Or is it better to just make a best guess based on all the requirements.txt
and maybe BUILD
files hashed together?
(sorry if that's unclear; fair amount of flailing here and GARGANTUAN pants caches; still working on the advice in https://www.pantsbuild.org/docs/using-pants-in-ci but ever since our developers started using torch
any cache just gets punishingly large)loud-lizard-41405
04/01/2021, 4:13 PMhappy-kitchen-89482
04/02/2021, 1:19 AMhappy-kitchen-89482
04/02/2021, 1:19 AMhappy-kitchen-89482
04/02/2021, 1:30 AMhappy-kitchen-89482
04/02/2021, 1:30 AMbusy-vase-39202
04/02/2021, 11:05 PMplain-sundown-25537
04/04/2021, 4:49 AMModuleNotFoundError: No module named 'ray'
Traceback (most recent call last):
File "~/.cache/pants/named_caches/pex_root/installed_wheels/a0d5c63d05cf2c837e5e8a0f410c1075f296d621/ray-1.0.1-cp38-cp38-macosx_10_13_x86_64.whl/ray/workers/default_worker.py", line 7, in <module>
import ray
ancient-breakfast-45303
04/04/2021, 9:08 PMloud-stone-83419
04/05/2021, 3:02 PMimportant-librarian-62877
04/06/2021, 12:38 AMconstraints.txt
file?steep-breakfast-98857
04/06/2021, 6:21 PMlimited-insurance-37393
04/06/2021, 6:48 PMuser
04/06/2021, 9:39 PMsalmon-barista-63163
04/06/2021, 10:34 PMTraceback (most recent call last):
File "/home/nssvc/talos/.pants.d/run/py/CPython-3.6.8/c0d75e5877b552953184e98f54fba0fb2872d067/.bootstrap/pex/pex.py", line 486, in execute
self.activate()
File "/home/nssvc/talos/.pants.d/run/py/CPython-3.6.8/c0d75e5877b552953184e98f54fba0fb2872d067/.bootstrap/pex/pex.py", line 133, in activate
self._working_set = self._activate()
File "/home/nssvc/talos/.pants.d/run/py/CPython-3.6.8/c0d75e5877b552953184e98f54fba0fb2872d067/.bootstrap/pex/pex.py", line 118, in _activate
for dist in env.activate():
File "/home/nssvc/talos/.pants.d/run/py/CPython-3.6.8/c0d75e5877b552953184e98f54fba0fb2872d067/.bootstrap/pex/environment.py", line 277, in activate
self._working_set = self._activate()
File "/home/nssvc/talos/.pants.d/run/py/CPython-3.6.8/c0d75e5877b552953184e98f54fba0fb2872d067/.bootstrap/pex/environment.py", line 453, in _activate
resolved = self._resolve(working_set, all_reqs)
File "/home/nssvc/talos/.pants.d/run/py/CPython-3.6.8/c0d75e5877b552953184e98f54fba0fb2872d067/.bootstrap/pex/environment.py", line 331, in _resolve
distributions_by_key[distribution.as_requirement().key].append(distribution)
AttributeError: 'NoneType' object has no attribute 'as_requirement
This happens inside of a docker container that runs on centos. Pants 1.30.4. Outside of the container the same process runs without issue. The only difference is that its run locally on a mac vs centos.clean-night-52582
04/07/2021, 12:35 AM2.3.0
this worked in 2.2.1
, which was the last version I was using.
[2021-04-06T23:57:47.143Z] ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
[2021-04-06T23:57:47.143Z] __main__.py: error: unrecognized arguments: --cov-report= --cov --cov config --cov dashboards --cov data_lake --cov entity_resolution --cov hooks --cov ml --cov mlop --cov schema --cov task_runner --cov test_fixtures --cov test_util --cov tools --cov util <test file>
[2021-04-06T23:57:47.143Z] inifile: None
[2021-04-06T23:57:47.143Z] rootdir: /tmp/process-execution7UcNHu
[2021-04-06T23:57:47.143Z]
[2021-04-06T23:57:47.143Z]
I can't repo locally only in CI/CD, so probably an issue there, but I can always repo with remote execution.fast-terabyte-66624
04/07/2021, 6:38 PMpolite-vase-75369
04/07/2021, 7:49 PMLawrences-MacBook-Pro-2:aiq lawrencefinn$ python dist/app_admin_tool.pex
Traceback (most recent call last):
File "/Users/lawrencefinn/Documents/aiq/dist/app_admin_tool.pex/.bootstrap/pex/pex.py", line 394, in execute
File "/Users/lawrencefinn/Documents/aiq/dist/app_admin_tool.pex/.bootstrap/pex/pex.py", line 92, in _activate
File "/Users/lawrencefinn/Documents/aiq/dist/app_admin_tool.pex/.bootstrap/pex/environment.py", line 239, in activate
File "/Users/lawrencefinn/Documents/aiq/dist/app_admin_tool.pex/.bootstrap/pex/environment.py", line 399, in _activate
File "/Users/lawrencefinn/Documents/aiq/dist/app_admin_tool.pex/.bootstrap/pex/environment.py", line 143, in _update_module_paths
File "/usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/lawrencefinn/.pex/code/7a8afd2b0ab97a76f9819ebfa3858979ce567b61/gen/__init__.py", line 1, in <module>
__import__('pkg_resources').declare_namespace(__name__)
ImportError: No module named pkg_resources
This used to work, and it works fine on non-mac machines (and maybe other laptops). Im on pants 1.27.0plain-sundown-25537
04/08/2021, 11:15 PMuser
04/09/2021, 6:29 AMcurved-television-6568
04/09/2021, 9:19 AMFilesystem changed during run: retrying
when running tests, I think mostly while building some pex with requirements that is needed in order to run the goal(s). Feels like there is some paths that get touched during building the pex when requirments are missing and needs to be downloaded, or something like that.
No biggie per se, but a bit annoying that it needs to ābuildā the pex what seems like two times..
$ ./pants test src/python/pants/backend/python/goals/setup_py_test.py
11:12:48.73 [INFO] Filesystem changed during run: retrying `@rule(pants.backend.python.goals.pytest_runner.run_python_test)` in 500ms...
11:12:48.79 [INFO] Canceled: Building pytest.pex with 6 requirements: ipdb, pygments, pytest-cov>=2.10.1,<2.12, pytest-html, pytest-icdiff, pytest>=6.0.1,<6.3
11:12:48.97 [INFO] Canceled: Resolving 3rdparty/python/constraints.txt
11:13:26.58 [INFO] Completed: Building pytest.pex with 6 requirements: ipdb, pygments, pytest-cov>=2.10.1,<2.12, pytest-html, pytest-icdiff, pytest>=6.0.1,<6.3
11:13:37.15 [INFO] Completed: Resolving 3rdparty/python/constraints.txt
11:13:48.73 [INFO] Completed: Building requirements.pex with 11 requirements: PyYAML<5.5,>=5.4, ansicolors==1.1.8, humbug==0.1.9, packaging==20.9, pex==2.1.38, psutil==5.7.0, pytest<6.3,>=6.0.1, setproctitle==1.2, setuptools<54.0,... (50 characters truncated)
11:13:57.04 [INFO] Completed: Building pytest_runner.pex
11:14:13.37 [WARN] Completed: test - src/python/pants/backend/python/goals/setup_py_test.py:tests failed (exit code 1).
Hmmmā¦. maybe it is my emacs
that is the bad guy in this caseā¦
.pants.d/pants.log
11:12:30.96 [INFO] handling request: `test src/python/pants/backend/python/goals/setup_py_test.py`
11:12:34.99 [INFO] Extending leases
11:12:35.06 [INFO] Done extending leases
11:12:48.72 [INFO] notify invalidation: cleared 1 and dirtied 6 nodes for: {".emacs.desktop", ""}
11:12:48.72 [INFO] notify invalidation: cleared 0 and dirtied 0 nodes for: {"", ".emacs.desktop"}
11:12:48.73 [INFO] notify invalidation: cleared 1 and dirtied 6343 nodes for: {"", ".emacs.desktop"}
11:12:48.73 [INFO] notify invalidation: cleared 0 and dirtied 0 nodes for: {".emacs.desktop", ""}
11:13:55.07 [INFO] Extending leases
11:13:55.23 [INFO] Done extending leases
11:14:14.14 [INFO] request completed: `test src/python/pants/backend/python/goals/setup_py_test.py`
Not sure how/if we can exclude the .emacs.desktop
from the filesystem touched check⦠?echoing-controller-7533
04/09/2021, 4:15 PMpolite-vase-75369
04/09/2021, 5:12 PM::
is passed to pants?proud-dentist-22844
04/09/2021, 5:53 PMUnicodeEncodeError
when running ./pants dependencies --type=3rdparty ::
Traceback (most recent call last):
File "./__parse_python_imports.py", line 113, in <module>
print("\n".join(sorted(string_imports)))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 38-40: ordinal not in range(128)
user
04/09/2021, 9:38 PMrapid-bird-79300
04/09/2021, 10:50 PMinterpreter_constraints
to CPython==2.7.*
(this because our project uses a mix of 2.7 and 3.6)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa0 in position 0: invalid start byte
Pants determines imports fine when I omit interpreter_constraints
from pants.toml
. Any ideas why this would occur?proud-dentist-22844
04/10/2021, 12:21 PMpython_requirements
so that it has higher priority than another? I would like a global way to resolve >1 target exports this module, so it is ambiguous which to use
, because the global file should always win.
There are a couple of packages in the monorepo that, due to how they get deployed, depend on having their own requirements files. So, I added BUILD with python_requirements
for each of them. But some of those requirements overlap with the global requirements.user
04/11/2021, 4:42 PM