acceptable-football-3276003/01/2023, 9:17 AM
caches the state of the environment to decide when to re-run. The following holds
is that expected? I'm on 2.16.0dev7 and quite an old
./pants package <targetX> # proper building happens ./pants package <targetX> # no building happens # close and open terminal, no code changes ./pants package <targetX> # again rebuilding
launcher script (no scie-pants yet). Thanks!
breezy-apple-2712203/01/2023, 1:46 PM
a docker image target with
, 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-9362503/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
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
silly-queen-719703/01/2023, 5:34 PM
boundless-zebra-7955603/01/2023, 5:47 PM
, when running
I'm seeing this cryptic message:
pants tailor --check ::
I don't have anything named
Would create BUILD: - Add shell_sources target root To fix `tailor` failures, run `pants tailor`. Error: Process completed with exit code 1.
in my repo. Also, when running tailor command locally, it succeeds. Is this something GHA creates? Any workaround on this issue?
lively-gpu-2643603/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-2643603/01/2023, 7:27 PM
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
and used it as the interpreter constraints for my newly added package too, created a new resolve called
and re-generated lock files. The problem comes when running the
py2-py3 = resolves/py2-py3.lock
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-2454903/01/2023, 8:17 PM
target to build its own wheels when only sdists are available for certain dependencies? I’m passing a specific
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-5971603/01/2023, 9:22 PM
alert-dawn-5142503/01/2023, 9:33 PM
brave-hair-40203/01/2023, 10:15 PM
high-yak-8589903/01/2023, 10:21 PM
late-manchester-4968303/01/2023, 10:25 PM
[docker] run_args = [ "-p 0.0.0.0:13000:13000" ]
that is used for my tests? As you can see I want the docker container to expose a port
cold-vr-1523203/02/2023, 8:18 AM
boundless-zebra-7955603/02/2023, 2:40 PM
breezy-apple-2712203/02/2023, 2:45 PM
Is there a way to streamline this? Or am I doing things wrong?
#!/bin/sh -e poetry add --lock $@ rm -f poetry.lock pants generate-lockfiles :: pants export --resolve=python-default --resolve=pytest
busy-vase-3920203/02/2023, 6:21 PM
busy-vase-3920203/02/2023, 6:23 PM
busy-vase-3920203/02/2023, 6:28 PM
magnificent-toothbrush-1725403/02/2023, 6:30 PM
fancy-daybreak-6234803/02/2023, 9:36 PM
blue-football-9256003/03/2023, 1:15 AM
working and I'm trying to get
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
without breaking our existing build?
broad-processor-9240003/03/2023, 1:34 AM
, and only one
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-9256003/03/2023, 1:42 AM
broad-processor-9240003/03/2023, 1:45 AM
, either: 1.
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.
[python] tailor_requirements_targets = false
https://www.pantsbuild.org/docs/reference-tailor#ignore_adding_targets to ignore specific ones I'd probably go with 1, I think
[tailor] ignore_adding_targets = [...]
happy-kitchen-8948203/03/2023, 2:14 AM
happy-kitchen-8948203/03/2023, 2:14 AM
lines because it expects the included requirements files to have their own
broad-processor-9240003/03/2023, 2:15 AM
happy-kitchen-8948203/03/2023, 2:16 AM
happy-kitchen-8948203/03/2023, 2:17 AM