wide-zoo-86070
04/21/2022, 5:15 PM./pants --tag='unit_test' ::
and ./pants --tag='int_test' ::
, but i found the following in both steps.
[2022-04-21T17:10:57.265Z] 13:10:50.51 [INFO] Long running tasks:
[2022-04-21T17:10:57.265Z] 82.29s Installing build-support/lockfile.txt for the resolve `python-default`
[2022-04-21T17:11:22.031Z] 13:11:20.54 [INFO] Long running tasks:
[2022-04-21T17:11:22.031Z] 112.32s Installing build-support/lockfile.txt for the resolve `python-default`
I am wondering why this step needs to repeat? @hundreds-father-404wide-zoo-86070
04/21/2022, 8:46 PM--no-process-cleanup
, then run the __run.sh
in the cached folder. The same test passed. I am wondering if __run.sh
always give the consistent result compared to running ./pants test
?\rapid-exabyte-76685
04/22/2022, 7:52 AMBUILD
file...
docker_image(
name="demo",
repository="example/demo",
)
```$ ./pants package src/example:demo
# Will build the image: myimages.example.demo:latest```where does 'myimages' come from?
refined-addition-53644
04/22/2022, 2:33 PMModuleNotFoundError: No module named 'pkg_resources'
with using flake8-bandit plugin using pants.
Please see 🧵wide-zoo-86070
04/22/2022, 2:46 PMbitter-ability-32190
04/22/2022, 2:52 PMrefined-addition-53644
04/22/2022, 3:00 PM[bandit]
config = ".bandit.yml"
args = ["--quiet"]
lockfile = "build-support/bandit.txt"
[flake8]
config = ".flake8"
extra_requirements.add = [
"flake8-black==0.3.2",
"flake8-bandit==3.0.0",
"setuptools==62.1.0",
]
lockfile = "build-support/flake8.txt"
wide-zoo-86070
04/22/2022, 3:07 PMbitter-ability-32190
04/22/2022, 3:28 PM~/.cache/pants
by default. Is that dir persisting between the call to unit tests and integration tests?wide-zoo-86070
04/22/2022, 3:34 PMbitter-ability-32190
04/22/2022, 3:34 PMwide-zoo-86070
04/22/2022, 3:35 PMcalm-ambulance-65371
04/22/2022, 4:16 PM2.10
, does generate-lockfiles
support PEP 440 direct references?wide-zoo-86070
04/22/2022, 4:33 PMwitty-crayon-22786
04/22/2022, 4:47 PMtest
and package
you might not be able to in some cases, for example. but between tests you always should be able to.witty-crayon-22786
04/22/2022, 4:52 PMwide-zoo-86070
04/22/2022, 4:52 PMthere are some contexts in which you might not be able to reuse a lockfile resolve: acrossdo you mind sharing some more info or example?andtest
package
wide-zoo-86070
04/22/2022, 4:52 PMalso: do you have multiple sets of interpreter constraints in this repository?No
wide-zoo-86070
04/22/2022, 4:54 PMwitty-crayon-22786
04/22/2022, 5:02 PMdo you mind sharing some more info or example?there isn’t a very concise explanation, except to say that
test
runs on exactly one interpreter chosen by pants per-run (“internal”), and that interpreter is part of the cache key. whereas package
is building a portable PEX
file, and so it will attempt to maximize compatibility with your interpreter constraints, rather than matching exactly one.wide-zoo-86070
04/22/2022, 5:34 PMinterpreter_constraints = ["==3.9.*"]
This is what I have. i can pin it to a particular version and see.wide-zoo-86070
04/22/2022, 7:16 PM[2022-04-22T19:11:50.654Z] 15:11:50.52 [DEBUG] Starting: Scheduling: Building pytest.pex from pytest_default_lockfile.txt
[2022-04-22T19:11:50.654Z] 15:11:50.52 [DEBUG] Starting: Scheduling: Installing build-support/lockfile.txt for the resolve `python-default`
[2022-04-22T19:11:50.654Z] 15:11:50.52 [DEBUG] Completed: Hit: Local cache lookup: Building pytest.pex from pytest_default_lockfile.txt
adorable-thailand-45835
04/22/2022, 7:24 PMpython_awslambda
in my Mac but I'm getting this error when I run ./pants package appcode/api/transaction_details/src/main.py
:
pip._vendor.packaging.markers.UndefinedEnvironmentName: '*python_full_version' does not exist in evaluation environment.*
pid 81510 -> /Users/rifonseca/.cache/pants/named_caches/pex_root/venvs/44f0d229c64d262df3c9196eaa181a922a2a17cd/81d027995b16273d21e19dc7b1441abee1a3e3d1/pex --disable-pip-version-check --no-python-version-warning --exists-action a --isolated -q --cache-dir /Users/rifonseca/.cache/pants/named_caches/pex_root --log /private/var/folders/63/28d_yhnj2tn6f3xg1g_mp0lr0000gq/T/process-executionnyaMyQ/.tmp/tmp47qnomzj/pip.log download --dest /private/var/folders/63/28d_yhnj2tn6f3xg1g_mp0lr0000gq/T/process-executionnyaMyQ/.tmp/tmphaqx3pp0/cp39-cp39-linux_x86_64 --only-binary all --no-deps --requirement 3rdparty/python/default.lock --platform manylinux2014_x86_64 --platform linux_x86_64 --implementation cp --python-version 39 --abi cp39 --index-url https://pypi.org/simple/ --retries 5 --timeout 15 exited with 2 and STDERR:
Failed to resolve for platform linux_x86_64-cp-39-cp39. Resolve requires evaluation of unknown environment marker: 'python_full_version' does not exist in evaluation environment.Reading through the docs, I found this:
Running from macOS and failing to build?
AWS Lambdas must run on Linux, so Pants tells PEX and Pip to build for Linux when resolving your third party dependencies. This means that you can only use pre-built wheels (bdists). If your project requires any source distributions (sdists) that must be built locally, PEX and pip will fail to run.
If this happens, you must either change your dependencies to only use dependencies with pre-built wheels or find a Linux environment to runWondering how to do I tell../pants package
./pant package....
to only use pre-built wheels? I know if I was using pip
directly, I could pass the --only-binary=:all
flag.loud-laptop-17949
04/22/2022, 7:43 PMDetermine if necessary to partition MyPy input.
when running lint
over python files? I though that mypy ran for the check
goal only.quiet-evening-25363
04/22/2022, 8:27 PMmodern-laptop-24399
04/23/2022, 3:42 AMpytest-bdd
and generating a cucumber.json report as a result of multiple test files being executed? I'm finding since a pants session is per-file, using the --cucumberjson
option results in pants over-writing the cucumber JSON with the latest test-file execution.rapid-exabyte-76685
04/23/2022, 8:38 AMgcloud auth configure-docker <http://europe-docker.pkg.dev|europe-docker.pkg.dev>
(or substitute other region) to be visible within the scope used by Pants.magnificent-hairdresser-5608
04/23/2022, 7:21 PMpex_binary
)?
Currently, in our company, we do not have any pex
registry and we publish our Python libraries/applications on an in-house PyPI registry. So, it is convenient to be able to publish our applications similar to our libraries by wheel files.strong-answer-14518
04/25/2022, 1:49 PMBootstrapping Pants using /usr/bin/python3.9
Creating the virtualenv PEX.
Downloading the Pex PEX.
SHA256 fingerprint of <https://github.com/pantsbuild/pex/releases/download/v2.1.62/pex> verified.
Installing pantsbuild.pants==2.10.0 into a virtual environment at /root/.cache/pants/setup/bootstrap-Linux-aarch64/2.10.0_py39
I supposed that makes sense since Linux with ARM is not supported yet. However, as indicated here and here, I’ve tried to build from sources with both ./pants package src/python/pants:pants-packaged
and build-support/bin/release.sh -q
but rust won’t compile some modules (tokio v1.16.1 or reqwest v0.11 with rust v1.60). Do you guys know if that might be related to versions compatibility or is it something inherent to Linux on ARM?wide-zoo-86070
04/25/2022, 5:33 PM