hundreds-father-404
06/19/2021, 12:18 AM./pants
script has any updates. https://www.pantsbuild.org/docs/upgrade-tips#check-for-updates-to-the-pants-script
thanks @rapid-bird-79300 for the suggestion!many-pilot-16208
06/20/2021, 2:01 AM./pants --version
and it warns Failed to create the file virtualenv.pyz: Permission denied
and later fails FileNotFoundError: [Errno 2] No such file or directory: 'virtualenv.pyz'
SHA256 of <https://raw.githubusercontent.com/pypa/get-virtualenv/20.4.7/public/virtualenv.pyz> is not as expected. Aborting.
I ran ./pants as plain ol' me, I didn't sudo or anything. But I'm happy to try again with sudo if that will help; or to tweak the permissions on some dir or other; or whatever.many-pilot-16208
06/20/2021, 2:28 AMpantsbuild/setup
, I thought to try mktemp'ing a directory, cd'ing into it, and curling that file, thinking maybe I could recreate the problem. But curl created the file just fine. Hmm.many-pilot-16208
06/20/2021, 2:41 AM./pants
, I see I should be trying to curl that file while in ~/.cache/pants/setup/bootstrap-Linux-x86_64/pants.ZiYnGN
. and there the curl indeed fails with Permission denied. I did some naive looking at permissions, but didn't notice anything.many-pilot-16208
06/20/2021, 2:52 AMwget
instead of curl -LO
. pants --version
finishes, huzzah!enough-analyst-54434
06/20/2021, 4:07 AMmany-pilot-16208
06/20/2021, 12:32 PMmany-pilot-16208
06/20/2021, 1:10 PM7.76.1
. If I snap remove curl, apt install curl, I get an older version 7.68.0
. That older version works. ...and when I get the latest curl version 7.77
from the curl site, it works. So I guess I just had unlucky timing when I got curl. Sorry for the noise, folks.ambitious-actor-36781
06/21/2021, 5:35 AMInvalidFieldException: Unrecognized field `skip_black=True` in target test/python/sportr_utils:tests. Valid fields for the target type `python_tests`: ['dependencies', 'description', 'interpreter_constraints', 'runtime_package_dependencies', 'sources', 'tags', 'timeout'].
Edit: New in 2.5.0 !rapid-bird-79300
06/21/2021, 5:53 PM./pants version
Bootstrapping Pants using /usr/bin/python3.8
Downloading the virtualenv zipapp
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
20 9258k 20 1879k 0 0 5910k 0 0:00:01 --:--:-- 0:00:01 5891k
100 9258k 100 9258k 0 0 17.5M 0 --:--:-- --:--:-- --:--:-- 17.5M
SHA256 fingerprint of <https://raw.githubusercontent.com/pypa/get-virtualenv/20.4.7/public/virtualenv.pyz> verified.
Installing pantsbuild.pants==2.5.0 into a virtual environment at /home/ubuntu/workspace/PR-58095/./.cache/pants/setup/bootstrap-Linux-x86_64/2.5.0_py38
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/ubuntu/workspace/PR-58095/./.cache/pants/setup/bootstrap-Linux-x86_64/virtualenv-20.4.7/virtualenv.pyz/__main__.py", line 168, in <module>
File "/home/ubuntu/workspace/PR-58095/./.cache/pants/setup/bootstrap-Linux-x86_64/virtualenv-20.4.7/virtualenv.pyz/__main__.py", line 164, in run
File "/home/ubuntu/workspace/PR-58095/./.cache/pants/setup/bootstrap-Linux-x86_64/virtualenv-20.4.7/virtualenv.pyz/virtualenv/__main__.py", line 18, in run
File "/home/ubuntu/workspace/PR-58095/./.cache/pants/setup/bootstrap-Linux-x86_64/virtualenv-20.4.7/virtualenv.pyz/virtualenv/run/__init__.py", line 30, in cli_run
File "/home/ubuntu/workspace/PR-58095/./.cache/pants/setup/bootstrap-Linux-x86_64/virtualenv-20.4.7/virtualenv.pyz/virtualenv/run/__init__.py", line 48, in session_via_cli
File "/home/ubuntu/workspace/PR-58095/./.cache/pants/setup/bootstrap-Linux-x86_64/virtualenv-20.4.7/virtualenv.pyz/virtualenv/run/__init__.py", line 75, in build_parser
File "/home/ubuntu/workspace/PR-58095/./.cache/pants/setup/bootstrap-Linux-x86_64/virtualenv-20.4.7/virtualenv.pyz/virtualenv/run/plugin/seeders.py", line 8, in __init__
File "/home/ubuntu/workspace/PR-58095/./.cache/pants/setup/bootstrap-Linux-x86_64/virtualenv-20.4.7/virtualenv.pyz/virtualenv/run/plugin/base.py", line 39, in options
File "/home/ubuntu/workspace/PR-58095/./.cache/pants/setup/bootstrap-Linux-x86_64/virtualenv-20.4.7/virtualenv.pyz/virtualenv/run/plugin/base.py", line 18, in entry_points_for
File "/home/ubuntu/workspace/PR-58095/./.cache/pants/setup/bootstrap-Linux-x86_64/virtualenv-20.4.7/virtualenv.pyz/virtualenv/run/plugin/base.py", line 18, in <genexpr>
File "/usr/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
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 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'virtualenv.seed.via_app_data'
We run Ubuntu 20.04 in CI with Python 3.8. This does not happen with our local runs. Any idea how to resolve this error?user
06/21/2021, 7:42 PMuser
06/21/2021, 10:26 PMuser
06/22/2021, 1:29 AMambitious-actor-36781
06/22/2021, 8:06 AMpants package
What's the recommended way of shipping these to the repository? More pants extensions?salmon-barista-63163
06/22/2021, 4:19 PMgit
. I am getting the following error:
fatal: not a git repository (or any of the parent directories): .git
I have found that this is because with pants 2 the root where the tests run is
/private/var/folders/89/r169_6497n15qnqm0bfhnjlr0000gp/T/process-executionzY6hQB
which does not include my “.git” config files.
With pants v1 all of these tests ran without issue and im assuming the root was the “build root”. I have tried adding a global resource
that includes the git
files necessary but that is not working. Is this as simple as changing the rootdir
of the global pants options? I would like to not have things running “inside” of my build root as it could cause other issues. Any other suggestions?ambitious-actor-36781
06/24/2021, 12:39 AMpython_distribution
instead of a python_library
in tests.
... I have a library that I'm trying to bring into the fold that makes heavy use of setuptools entrypoints and ... stuff.
Which doesn't seem to play nice at all with pants.user
06/24/2021, 3:23 PMbusy-vase-39202
06/24/2021, 3:28 PMbig-xylophone-43403
06/24/2021, 4:21 PMextras_requires
Pants correctly adds them to extras_requires
in the generated setup.py . How do I tell Pants to not add them in install_requires
?happy-kitchen-89482
06/24/2021, 4:31 PMuser
06/24/2021, 5:19 PMuser
06/24/2021, 6:04 PMuser
06/24/2021, 7:18 PMuser
06/24/2021, 7:18 PMbusy-vase-39202
06/24/2021, 7:41 PMRemote caching enables your coworkers and your CI to reuse the results of commands you already ran. Pants dependency inference gives you a remote execution plan for free. The engine can delegate work to a remote build cluster so that you are no longer limited by the number of cores on your machine. If you have enough remote workers, you can run your entire test suite in total parallelism.
plain-sundown-25537
06/24/2021, 8:24 PMsalmon-barista-63163
06/24/2021, 10:18 PM./pants run
command.
This all worked great with pants v1 and we mounted in the cache so everything was quick and worked well.
With pants 2 if i start up one container everything works just fine, when we start up more than 1 container i get the following error.
config-v1 | 22:06:54.17 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
config-v1 | File "/home/centos/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.2_py36/lib/python3.6/site-packages/pants/bin/local_pants_runner.py", line 289, in run
config-v1 | engine_result = self._run_v2()
config-v1 | File "/home/centos/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.2_py36/lib/python3.6/site-packages/pants/bin/local_pants_runner.py", line 195, in _run_v2
config-v1 | return self._maybe_run_v2_body(goals, poll=False)
config-v1 | File "/home/centos/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.2_py36/lib/python3.6/site-packages/pants/bin/local_pants_runner.py", line 217, in _maybe_run_v2_body
config-v1 | poll_delay=(0.1 if poll else None),
config-v1 | File "/home/centos/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.2_py36/lib/python3.6/site-packages/pants/init/engine_initializer.py", line 127, in run_goal_rules
config-v1 | goal_product, params, poll=poll, poll_delay=poll_delay
config-v1 | File "/home/centos/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.2_py36/lib/python3.6/site-packages/pants/engine/internals/scheduler.py", line 569, in run_goal_rule
config-v1 | self._raise_on_error([t for _, t in throws])
config-v1 | File "/home/centos/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.2_py36/lib/python3.6/site-packages/pants/engine/internals/scheduler.py", line 539, in _raise_on_error
config-v1 | wrapped_exceptions=tuple(t.exc for t in throws),
config-v1 |
config-v1 | Exception message: 1 Exception encountered:
config-v1 |
config-v1 | Exception: Failed to begin read transaction: Resource temporarily unavailable
I suspect this has something to do with how we are mounting in the cache dirs:
IE we mount ~/.cache/pants -> ~/.cache/pants
If we do not mount in the cache all the services come up no problem but each has to build and resolve all the constraints first which takes a long time.
Any thoughts here? Am I missing something? Any suggestions on what to try to resolve this?plain-carpet-73994
06/24/2021, 10:52 PMsalmon-barista-63163
06/24/2021, 10:54 PM