nice-florist-55958
05/11/2022, 10:29 AMenough-analyst-54434
05/11/2022, 2:44 PMhappy-kitchen-89482
05/11/2022, 4:27 PMnice-florist-55958
05/11/2022, 7:31 PM[python-repos]
indexes = [https://$apitoken@$internal-index]
So that's why I was surprised Pants started attempting to download from pythonhosted when we only changed the version to 2.11 in pants.toml
nice-florist-55958
05/12/2022, 1:09 AMnice-florist-55958
05/12/2022, 1:13 AM[python].lockfile_generator = "pex"
hundreds-father-404
05/12/2022, 4:23 PM~/.netrc
files?nice-florist-55958
05/12/2022, 4:25 PMnice-florist-55958
05/12/2022, 4:26 PM.npmrc
and .pypirc
, but not .netrc
.nice-florist-55958
05/12/2022, 5:21 PMpants.toml
induces different behavior -- this time it just builds setuptools.pex forever and ever (at 35,000 seconds now). Probably still the same urlopen issue, but perhaps down a different codepath that doesn't have finite retry/wait logic? I'll run w/ debug/pex verbosity.nice-florist-55958
05/13/2022, 3:34 PMenough-analyst-54434
05/13/2022, 3:51 PMenough-analyst-54434
05/13/2022, 3:51 PMenough-analyst-54434
05/13/2022, 3:56 PMhundreds-father-404
05/13/2022, 4:00 PM[black]
lockfile = "3rdparty/python/black.lock"
[isort]
lockfile = "3rdparty/python/isort.lock"
And so on. That is, you'd use the default version
from Pants, but your own lock. Then run generate-lockfiles
At that point, probably worth pinning versions though. That way, when you upgrade Pants versions, Pants won't complain that the lock is invalid because Pants bumped the default of a versionhundreds-father-404
05/13/2022, 4:00 PMenough-analyst-54434
05/13/2022, 4:01 PMenough-analyst-54434
05/13/2022, 4:02 PMhundreds-father-404
05/13/2022, 4:05 PMnice-florist-55958
05/16/2022, 2:55 AM22:51:20.28 [INFO] Completed: Building pytest.pex from 3rdparty/python/pytest.lock
22:51:20.28 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Building pytest.pex from 3rdparty/python/pytest.lock' failed with exit code 1.
stdout:
stderr:
Traceback (most recent call last):
File "/d/d1/user/taymarti/.cache/pants/named_caches/pex_root/unzipped_pexes/479026d892c9306a8907938e1e49f73e1514eabe/.bootstrap/pex/pex.py", line 504, in execute
exit_value = self._wrap_coverage(self._wrap_profiling, self._execute)
File "/d/d1/user/taymarti/.cache/pants/named_caches/pex_root/unzipped_pexes/479026d892c9306a8907938e1e49f73e1514eabe/.bootstrap/pex/pex.py", line 409, in _wrap_coverage
return runner(*args)
File "/d/d1/user/taymarti/.cache/pants/named_caches/pex_root/unzipped_pexes/479026d892c9306a8907938e1e49f73e1514eabe/.bootstrap/pex/pex.py", line 440, in _wrap_profiling
return runner(*args)
File "/d/d1/user/taymarti/.cache/pants/named_caches/pex_root/unzipped_pexes/479026d892c9306a8907938e1e49f73e1514eabe/.bootstrap/pex/pex.py", line 560, in _execute
return self.execute_entry(self._pex_info.entry_point)
File "/d/d1/user/taymarti/.cache/pants/named_caches/pex_root/unzipped_pexes/479026d892c9306a8907938e1e49f73e1514eabe/.bootstrap/pex/pex.py", line 696, in execute_entry
return self.execute_pkg_resources(entry_point)
File "/d/d1/user/taymarti/.cache/pants/named_caches/pex_root/unzipped_pexes/479026d892c9306a8907938e1e49f73e1514eabe/.bootstrap/pex/pex.py", line 728, in execute_pkg_resources
return runner()
File "/d/d1/user/taymarti/.cache/pants/named_caches/pex_root/installed_wheels/6a5463833452712ecf58a573b1b489c81d14aaed599e955c2af85cf793217a42/pex-2.1.84-py2.py3-none-any.whl/pex/bin/pex.py", line 766, in main
env=env,
File "/d/d1/user/taymarti/.cache/pants/named_caches/pex_root/installed_wheels/6a5463833452712ecf58a573b1b489c81d14aaed599e955c2af85cf793217a42/pex-2.1.84-py2.py3-none-any.whl/pex/bin/pex.py", line 786, in do_main
cache=ENV.PEX_ROOT,
File "/d/d1/user/taymarti/.cache/pants/named_caches/pex_root/installed_wheels/6a5463833452712ecf58a573b1b489c81d14aaed599e955c2af85cf793217a42/pex-2.1.84-py2.py3-none-any.whl/pex/bin/pex.py", line 648, in build_pex
max_parallel_jobs=pip_configuration.max_jobs,
File "/d/d1/user/taymarti/.cache/pants/named_caches/pex_root/installed_wheels/6a5463833452712ecf58a573b1b489c81d14aaed599e955c2af85cf793217a42/pex-2.1.84-py2.py3-none-any.whl/pex/result.py", line 82, in try_
raise ResultError(error=result)
pex.result.ResultError: There was 1 error downloading required artifacts:
1. coverage 6.3.3 from <https://msde-docker-prod.ms.com:4443/api/pypi/mspypi/bb/17/ed93a4c984bd45f282ac28e60f7488a6605a47f391a1111c92ee6028a235/coverage-6.3.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl>
HTTP Error 401:
I tried curl'ing the file and it worked just fine (I had to substitute my API credentials after the https:// but I assume Pants is just not printing this part).
Furthermore, still getting the setuptools.lock error when pacakging a python_distribution, even after generating locks for all the backends being used. Here is the relevant sections of my pants.toml:
backend_packages = [
"pants.backend.python",
# "pants.backend.experimental.python.lint.autoflake",
"pants.backend.python.lint.isort",
"pants.backend.python.lint.black",
"pants.backend.python.typecheck.mypy",
"pants.backend.shell",
"pants.backend.shell.lint.shfmt",
"pants.backend.experimental.go",
]
[pytest]
lockfile = "3rdparty/python/pytest.lock"
[coverage-py]
lockfile = "3rdparty/python/coveragepy.lock"
[mypy]
lockfile = "3rdparty/python/mypy.lock"
[isort]
lockfile = "3rdparty/python/isort.lock"
[black]
lockfile = "3rdparty/python/black.lock"
All of the lockfiles exist now as generated by pants. Am I missing an implied backend or?enough-analyst-54434
05/16/2022, 3:04 AMenough-analyst-54434
05/16/2022, 3:06 AMenough-analyst-54434
05/16/2022, 3:07 AMnice-florist-55958
05/16/2022, 3:15 AMnice-florist-55958
05/16/2022, 3:18 AMenough-analyst-54434
05/16/2022, 3:23 AMnice-florist-55958
05/16/2022, 3:32 AM