flaky-match-48400
04/23/2024, 5:25 PMpants generate-lockfiles that prevents us from moving to versions higher than 2.18 (currently deprecated). as far as I can tell, because of this requirement specification in the jupyter-cadquery package, pants generate-lockfiles fails with this message:
~/S/pants-219-lockfile-issue (main *) pants generate-lockfiles
Bootstrapping Pants 2.20.0
Installing pantsbuild.pants==2.20.0 into a virtual environment at /home/blue/.cache/nce/3d6643e46b53e4cc0b2a0d5c768866226ddce3de1f57f80c4a02d8d39800fa8e/bindings/venvs/2.20.0
Found existing installation: setuptools 58.1.0
Uninstalling setuptools-58.1.0:
Successfully uninstalled setuptools-58.1.0
New virtual environment successfully created at /home/blue/.cache/nce/3d6643e46b53e4cc0b2a0d5c768866226ddce3de1f57f80c4a02d8d39800fa8e/bindings/venvs/2.20.0.
11:18:29.00 [INFO] Initializing scheduler...
11:18:32.08 [INFO] Scheduler initialized.
11:19:12.01 [INFO] Completed: Generate lockfile for python-default
11:19:12.01 [ERROR] 1 Exception encountered:
Engine traceback:
in `generate-lockfiles` goal
ProcessExecutionFailure: Process 'Generate lockfile for python-default' failed with exit code 1.
stdout:
stderr:
Expected matching RIGHT_PARENTHESIS for LEFT_PARENTHESIS, after version specifier
cadquery (==master) ; extra == 'prod'
~^
You can find a standalone reproducer here: https://github.com/eguiraud-pf/pants-219-lockfile-issue-repro .
can anyone here suggest a solution or workaround (or generally tell what the underlying problem is)?curved-manchester-66006
04/23/2024, 8:04 PMcadquery==master syntax valid? If I do $ pip install --dry-run jupyter-cadquery[prod]==3.5.2 I get
ERROR: Could not find a version that satisfies the requirement cadquery==master; extra == "prod" (from jupyter-cadquery[prod]) (from versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.7, 0.1.8, 0.2.0, 0.3.0, 0.4.0, 0.4.185, 0.4.186, 0.5.1, 0.5.2, 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.2.2, 1.2.4, 1.2.5, 2.2.0b0, 2.2.0b1, 2.2.0b2, 2.2.0, 2.3.0, 2.3.1, 2.4.0)
ERROR: No matching distribution found for cadquery==master; extra == "prod"flaky-match-48400
04/23/2024, 8:39 PM[prod] feature.
but also: in the requirements.txt that pants generate-lockfiles reads we don't mention [prod] at all, and pip install --dry-run jupyter-cadquery==3.5.2 works finebroad-processor-92400
04/23/2024, 11:14 PMbroad-processor-92400
04/24/2024, 12:00 AMpants.toml, to match 2.19.0's configuration, I get the same error.
[pex-cli]
version = "v2.1.148"
known_versions = [
"v2.1.148|macos_arm64|5b1dee5a89fff25747753e917f96b8707ea62eed404d037d5f8cf8f2e80a13b7|4197604",
"v2.1.148|macos_x86_64|5b1dee5a89fff25747753e917f96b8707ea62eed404d037d5f8cf8f2e80a13b7|4197604",
"v2.1.148|linux_x86_64|5b1dee5a89fff25747753e917f96b8707ea62eed404d037d5f8cf8f2e80a13b7|4197604",
"v2.1.148|linux_arm64|5b1dee5a89fff25747753e917f96b8707ea62eed404d037d5f8cf8f2e80a13b7|4197604"
]
And indeed, using pex directly matches (this is a reduced form of the command in the __run.sh script visible in the sandbox, when using `--keep-sandboxs=on_failure`):
$ PEX_SCRIPT=pex3 pex-2.1.148 lock create jupyter-cadquery==3.5.2
Expected matching RIGHT_PARENTHESIS for LEFT_PARENTHESIS, after version specifier
cadquery (==master) ; extra == 'prod'
$ PEX_SCRIPT=pex3 pex-2.1.137 lock create jupyter-cadquery==3.5.2
<json blob of the lockfile>
So, maybe these are next steps, in some order:
1. work out exactly which version of pex has the problem (e.g. bisect by downloading releases between 2.1.137 and 2.1.148 from https://github.com/pex-tool/pex/releases and running that command). This hopefully reveals:
a. what caused the regression
b. whether there's a workaround
c. if it's a pex bug
2. for upgrading to pants 2.19, it looks like it allows pex 2.1.137, so you could pin to that version (or whatever the most recent working version is, from step 1) by copying the version and known_versions configuration from https://www.pantsbuild.org/2.18/reference/subsystems/pex-cli. (upgrading to pants 2.20 requires pex 2.1.148, so you'll need to solve the problem properly before doing that)
3. work with jupyer-cadquery upstream to fix what seems to be a wonky dependency specificationflaky-match-48400
04/24/2024, 2:59 AMbroad-processor-92400
04/24/2024, 3:28 AM