acceptable-football-32760
03/01/2023, 9:17 AMpants package
caches the state of the environment to decide when to re-run. The following holds
./pants package <targetX> # proper building happens
./pants package <targetX> # no building happens
# close and open terminal, no code changes
./pants package <targetX> # again rebuilding
is that expected? I'm on 2.16.0dev7 and quite an old ./pants
launcher script (no scie-pants yet).
Thanks!breezy-apple-27122
03/01/2023, 1:46 PMpants run
a docker image target with restartable=True
, the created container doesn't get stopped if some source files changed. a build is triggered and a new container is created and run but the old one keeps running. Is that intended behaviour?wonderful-boots-93625
03/01/2023, 2:57 PM$ ./pants --no-pantsd dependencies integrate_ai_sdk/src/integrate_ai_sdk/base_class.py
09:49:13.34 [WARN] Pants cannot infer owners for the following imports in the target integrate_ai_sdk/src/integrate_ai_sdk/base_class.py:
* opacus.validators.ModuleValidator (line: 17)
* torch (line: 13)
* torch.nn.Module (line: 14)
* torch.utils.data.Dataset (line: 15)
If you do not expect an import to be inferrable, add `# pants: no-infer-dep` to the import line. Otherwise, see <https://www.pantsbuild.org/v2.14/docs/troubleshooting#import-errors-and-missing-dependencies> for common problems.
integrate_ai_sdk/setup_requirements.txt:reqs
integrate_ai_sdk/src/integrate_ai_sdk/exception.py
integrate_ai_sdk/src/integrate_ai_sdk/utils/class_util.py
integrate_ai_sdk/src/integrate_ai_sdk/utils/util.py
integrate_ai_sdk:reqs#boto3
integrate_ai_sdk:reqs#clkhash
integrate_ai_sdk:reqs#matplotlib
integrate_ai_sdk:reqs#numpy
integrate_ai_sdk:reqs#opacus
integrate_ai_sdk:reqs#pandas
integrate_ai_sdk:reqs#pillow
integrate_ai_sdk:reqs#pyarrow
integrate_ai_sdk:reqs#pyjwt
integrate_ai_sdk:reqs#pytorch-ignite
integrate_ai_sdk:reqs#s3fs
integrate_ai_sdk:reqs#scikit-learn
integrate_ai_sdk:reqs#setuptools
integrate_ai_sdk:reqs#smart-open
integrate_ai_sdk:reqs#torch
integrate_ai_sdk:reqs#torchvision
integrate_ai_sdk:reqs#wheel
note that torch
and opacus
are in the dependencies list. Its probably a module mapping thing, but iβm not sure how to determine the key, since in requirements itβs listed as torch
and opacus
as well.silly-queen-7197
03/01/2023, 5:34 PMboundless-zebra-79556
03/01/2023, 5:47 PMpantsbuild/actions/init-pants@v4-scie-pants
, when running pants tailor --check ::
I'm seeing this cryptic message:
Would create BUILD:
- Add shell_sources target root
To fix `tailor` failures, run `pants tailor`.
Error: Process completed with exit code 1.
I don't have anything named root
in my repo. Also, when running tailor command locally, it succeeds. Is this something GHA creates? Any workaround on this issue?lively-gpu-26436
03/01/2023, 6:15 PM./pants generate-lockfiles
19:13:42.49 [INFO] Completed: Generate lockfile for py2-py3
19:13:45.85 [INFO] Completed: Generate lockfile for pytest
19:13:45.85 [ERROR] 1 Exception encountered:
Engine traceback:
in `generate-lockfiles` goal
in Generate Python lockfile
ProcessExecutionFailure: Process 'Generate lockfile for pytest' failed with exit code 1.
stdout:
stderr:
pid 73099 -> /Users/anler/.cache/pants/named_caches/pex_root/venvs/41379f21c5956cff0d35ab1ef014bb72e1fe14dc/336e97e279ba29b2edc4ace827e24d29cc9b0af8/bin/python -sE /Users/anler/.cache/pants/named_caches/pex_root/venvs/41379f21c5956cff0d35ab1ef014bb72e1fe14dc/336e97e279ba29b2edc4ace827e24d29cc9b0af8/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --isolated -q --cache-dir /Users/anler/.cache/pants/named_caches/pex_root/pip_cache --log /private/var/folders/z6/y9s0fw1s0k1fmn_9cxyfllrm0000gn/T/pants-sandbox-GCDvla/.tmp/pex-pip-log.lij6zsvc/pip.log download --dest /private/var/folders/z6/y9s0fw1s0k1fmn_9cxyfllrm0000gn/T/pants-sandbox-GCDvla/.tmp/tmp8_cj67j2/Users.anler..pyenv.versions.3.10.9.bin.python3.10 pytest==7.0.1 pytest-cov>=2.12,!=2.12.1,<3.1 pytest-xdist>=2.5,<3 --index-url <https://pypi.org/simple/> --retries 5 --timeout 15 exited with 1 and STDERR:
ERROR: Could not find a version that satisfies the requirement pytest==7.0.1
ERROR: No matching distribution found for pytest==7.0.1
lively-gpu-26436
03/01/2023, 7:27 PM["==3.11.*"]
in pants.toml
and a default resolve with some dependencies, all worked perfectly here, the issue comes when adding a py2/py3 library, I changed the interpreter constraints in pants.toml
to ["==2.7.*", ">=3.9"]
and used it as the interpreter constraints for my newly added package too, created a new resolve called py2-py3 = resolves/py2-py3.lock
and re-generated lock files. The problem comes when running the check
goal on my previously working python3 only code, it takes quite a lot of time and finally errors. My question is if someone knows how adding a package with mixed interpreter constraints can cause this check goal to fail in other packages with different constraints that were previously working?
./pants check src/python::
20:19:50.13 [INFO] Completed: Building 4 requirements for requirements.pex from the resolves/python-default.lock resolve: aiohttp[speedups], prometheus-client, pyarrow, pydantic
20:19:50.13 [ERROR] 1 Exception encountered:
Engine traceback:
in `check` goal
in Typecheck using MyPy - mypy
ProcessExecutionFailure: Process 'Building 4 requirements for requirements.pex from the resolves/python-default.lock resolve: aiohttp[speedups], prometheus-client, pyarrow, pydantic' failed with exit code 1.
stdout:
stderr:
There was 1 error downloading required artifacts:
1. pyarrow 0.16 from <https://files.pythonhosted.org/packages/3e/00/4e099e2f1992c555771090b5971c59751fc152c68270a31bfeabd114c068/pyarrow-0.16.0.tar.gz>
ERROR: Command errored out with exit status 1: /Users/anler/.cache/pants/named_caches/pex_root/venvs/41379f21c5956cff0d35ab1ef014bb72e1fe14dc/791e686d7c6a49493bab896fbb2645175e97bb31/bin/python /Users/anler/.cache/pants/named_caches/pex_root/venvs/41379f21c5956cff0d35ab1ef014bb72e1fe14dc/791e686d7c6a49493bab896fbb2645175e97bb31/lib/python3.11/site-packages/pip install --ignore-installed --no-user --prefix /Users/anler/.cache/pants/named_caches/pex_root/pip_cache/.tmp/pip-build-env-fa06xvk8/overlay --no-warn-script-location -v --no-binary :none: --only-binary :none: -i <https://pypi.org/simple/> -- 'cython >= 0.29' 'numpy==1.14.5; python_version<'"'"'3.7'"'"'' 'numpy==1.16.0; python_version>='"'"'3.7'"'"'' setuptools setuptools_scm wheel Check the logs for full command output.
Use `--keep-sandboxes=on_failure` to preserve the process chroot for inspection.
gentle-painting-24549
03/01/2023, 8:17 PMpex_binary
target to build its own wheels when only sdists are available for certain dependencies? Iβm passing a specific platforms
argument to the target and itβs incompatible with a few dependencies that are only available as an sdist and not as a wheel - if possible Iβd like to avoid building my own wheels and placing them on our internal PyPI server.clever-hamburger-59716
03/01/2023, 9:22 PMalert-dawn-51425
03/01/2023, 9:33 PMbrave-hair-402
03/01/2023, 10:15 PMhigh-yak-85899
03/01/2023, 10:21 PMlate-manchester-49683
03/01/2023, 10:25 PM[docker]
run_args = [
"-p 0.0.0.0:13000:13000"
]
with a docker_environment
that is used for my tests?
As you can see I want the docker container to expose a portcold-vr-15232
03/02/2023, 8:18 AM['latest', None]
with type list
.`boundless-zebra-79556
03/02/2023, 2:40 PMbreezy-apple-27122
03/02/2023, 2:45 PM#!/bin/sh -e
poetry add --lock $@
rm -f poetry.lock
pants generate-lockfiles ::
pants export --resolve=python-default --resolve=pytest
Is there a way to streamline this? Or am I doing things wrong?busy-vase-39202
03/02/2023, 6:21 PMbusy-vase-39202
03/02/2023, 6:23 PMbusy-vase-39202
03/02/2023, 6:28 PMmagnificent-toothbrush-17254
03/02/2023, 6:30 PMfancy-daybreak-62348
03/02/2023, 9:36 PMblue-football-92560
03/03/2023, 1:15 AMlint
working and I'm trying to get check
working. It's failing due to ambiguous dependencies. We have the source code for a few python packages in this repo, so we do have multiple requirements.txt files with overlapping dependencies. We currently build one virtualenv which includes all requirements so I don't think there are any conflicts. We use this virtualenv to do typechecking and run tests. Is it possible to tell pants to use the correct requirements.txt file based on the directory structure so that I can enable check
without breaking our existing build?broad-processor-92400
03/03/2023, 1:34 AM-r path/to/requirements.txt
, -r another/path/requirements.txt
, and only one python_requirements(...)
target in the whole tree
The second one is likely to be simpler/smoother (having a single set of dependencies for the majority of the repo).blue-football-92560
03/03/2023, 1:42 AMbroad-processor-92400
03/03/2023, 1:45 AMpants.toml
, either:
1. [python] tailor_requirements_targets = false
https://www.pantsbuild.org/docs/reference-python#tailor_requirements_targets to ignore all requirements files by default (and then add the targets manually, as required)
2. [tailor] ignore_adding_targets = [...]
https://www.pantsbuild.org/docs/reference-tailor#ignore_adding_targets to ignore specific ones
I'd probably go with 1, I thinkhappy-kitchen-89482
03/03/2023, 2:14 AMhappy-kitchen-89482
03/03/2023, 2:14 AM-r
lines because it expects the included requirements files to have their own python_requirements()
targetsbroad-processor-92400
03/03/2023, 2:15 AMhappy-kitchen-89482
03/03/2023, 2:16 AMhappy-kitchen-89482
03/03/2023, 2:17 AM