acceptable-tent-43498
09/14/2021, 5:57 PMERROR: No matching distribution found for SQLAlchemy==1.3.22
Any ideas?user
09/14/2021, 9:31 PMdazzling-diamond-4749
09/14/2021, 10:18 PMkwargs.get("tags", []) + ["my_tag"]
This doesn't work
kwargs["tags"] = kwargs.get("tags", []).append("my_tag")
Any reason why the later doesn't work? maybe all lists are read only and +
creates a new list that is the combination of the two?hundreds-father-404
09/15/2021, 3:02 AMpython_requirements
, poetry_requirements
), and unlocks new boilerplate reduction.
We need a syntax for how to address generated targets, e.g. in the dependencies
field. It needs to include the generating target's address so we know how to generate it.
The current proposal is dir:generator!generated
, e.g. //:reqs!Django
or src/py/project:lib!foo.py
. But, !
requires quotes to work in the terminal 🤷 The other alternatives to !
are =
and `@`:astonishing-london-2419
09/15/2021, 8:52 AMastonishing-london-2419
09/15/2021, 8:52 AMnox
to build our docs (a single docset for the whole monorepo), which basically implies starting a new virtualenv, installing sphinx and a couple of things and running sphinx-build
. This command needs to be able to load the libraries, as we have all sorts of autodocs features. I have been thinking on how to achieve that with pants and I guess I should create a new target that would be sphinx_docs
and it would have all the libraries as dependencies. However, it seems strange that this has never come up (I have searched slack to no avail) so I thought I’d ask first.astonishing-london-2419
09/15/2021, 8:52 AMbuild-dags
command in our custom tool
2. For each of the libraries inside the app
folder, the tool loads library.dag
and executes a generate_tasks
function, which returns a list of airflow tasks and their dependencies.
3. Once all tasks have been collected, the tool figures out the DAGs (you can have cross-app DAGs) and writes an output YAML file that is deployed from the CI in airflow.
How to achieve that with pants
? My idea is to break this into two steps:
1. On ./pants package
, not only the pex
are generated but also YAML files with the tasks for each app/library. This would mean creating a new target airflow_tasks
that would load the library.dag
, run the generate_tasks
function and dump the result in a per-app YAML.
2. Create a new goal ./pants build-dags
(or maybe it could be done with package
if pants
supports “ordered” builds) that has the airflow_tasks
as inputs and then puts together all the YAMLs and builds the DAGs.
I guess this is how I would do it, but looking at the plugins docs it all seems a bit daunting. Any example plugins I can look at to understand how to do this myself?ambitious-student-81104
09/15/2021, 3:15 PM./pants test ::
at the top level? ./pants goal path/to::
does not seem to work.ambitious-student-81104
09/15/2021, 3:15 PMuser
09/15/2021, 4:53 PMclean-night-52582
09/15/2021, 5:47 PM2.6.1
will be marked stable? hoping to pick up some of those changes.modern-wolf-36228
09/15/2021, 6:28 PMBUILD.pants
that you guys recall?ambitious-student-81104
09/15/2021, 11:44 PMfull-toothbrush-75676
09/16/2021, 12:25 AMpytest
naming conventions? I’ve tried adding a pytest.ini
overriding the global test file naming convention to *_test.py
but pants is still picking up a file named test_case.py
. I may be missing something obvious 🤔echoing-farmer-15630
09/16/2021, 10:20 AMacoustic-agent-61722
09/16/2021, 6:23 PMmake
command to nuke my repo for a clean restart.worried-salesclerk-37834
09/16/2021, 6:32 PMpants run
happen inside of a pex? I'm getting an error when running the pex, but not via run.
Hitting NotADirectoryError: MultiplexedPath only supports directories
from importlib_resources.files("my.dumb.package")
fast-nail-55400
09/16/2021, 7:16 PMjvm_dependency
, jvm_requirement
, jar_requirement
, java_jar_requirement
, jvm_jar_requirement
, or some other name?astonishing-london-2419
09/16/2021, 8:19 PMuser
09/16/2021, 9:13 PMuser
09/17/2021, 4:49 PMambitious-student-81104
09/17/2021, 5:58 PME ImportError: cannot import name 'xxx' from 'xxxmodule' (path/to/xxx.py)
It will be much more helpful if the error actually says "circular dependency detected: file name 1, file name 2"astonishing-london-2419
09/18/2021, 7:39 PMresources
) and I’d like to avoid rerunning unnecessary tests when this happens (but also I want to run a few relevant ones). I was thinking of setting up a special set of “config tests” but I am not sure what happens if the only changed files are for example yaml included in resources. Can somebody shed light on this?ambitious-student-81104
09/19/2021, 1:34 AMPants sets up its development virtualenv atI currently have this in my environment but no. Point your editor to the~/.cache/pants/pants_dev_deps/<arch>.<version>.venv/
file in this folder, e.g.bin/python
.~/.cache/pants/pants_dev_deps/Darwin.py37.venv/bin/python
pants_dev_deps
:
❯ ls ~/.cache/pants
lmdb_store named_caches setup
Any help?rich-church-77699
09/20/2021, 1:03 PMPyPi
mirror hosted on AWS CodeArtifact that requires a username and token to access.
Is there any configuration in Pants
that will allows us to inject the PyPi token for Pants
to use, or make it use pip.conf
which is setup with the username and token for the PyPi mirror.user
09/20/2021, 5:25 PMacoustic-agent-61722
09/20/2021, 5:59 PM./pants\ --print-stacktrace\ -ldebug\ --pex-verbosity=9\ run\ ci/src/python/pynest_ci:runner\ --\ regular_unit_test
, but it doesn’t seem to give enough information to figure out the issue. It looks like requirements.pex
builds fine, but when the test tries to build pytest_runner.pex
it can fail.
17:25:57.58 [INFO] Starting: Building requirements.pex with 31 requirements: GPUtil==1.4.0, boto3-stubs[s3]==1.18.35, boto3==1.17.112, botocore==1.20.112, catboost==0.26.1, daemonize==2.5.0, dask-gateway==0.9.0, dask[dataframe]==... (434 characters truncated)
17:26:25.49 [INFO] Completed: Building requirements.pex with 31 requirements: GPUtil==1.4.0, boto3-stubs[s3]==1.18.35, boto3==1.17.112, botocore==1.20.112, catboost==0.26.1, daemonize==2.5.0, dask-gateway==0.9.0, dask[dataframe]==... (434 characters truncated)
17:26:25.49 [INFO] Starting: Building pytest_runner.pex
17:26:25.52 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
...
pid 2787 -> /root/.cache/pants/named_caches/pex_root/venvs/8427a8787e07d8e0828aa91a7c0695bba322863d/f28b3dbba3c9dae1b4357adde5b079b8b3ca9fac/pex --disable-pip-version-check --no-python-version-warning --exists-action a --isolated -q --cache-dir /root/.cache/pants/named_caches/pex_root --log /tmp/process-executionHBj8Tl/.tmp/tmph9shut22/pip.log download --dest /tmp/process-executionHBj8Tl/.tmp/tmplh07wwwf/usr.local.bin.python3.7 GPUtil==1.4.0 boto3-stubs[s3]==1.18.35 boto3==1.17.112 botocore==1.20.112 catboost==0.26.1 daemonize==2.5.0 dask-gateway==0.9.0 dask[dataframe]==2021.7.2 distributed==2021.7.2 future==0.18.2 hypothesis==6.17.4 jellyfish==0.8.8 moto==1.3.14 numpy<1.21 pandas==1.2.5 parmap==1.5.2 protobuf==3.17.3 pyarrow==5.0.0 pydantic==1.7.4 python-json-logger==2.0.2 pyyaml==5.4.1 requests==2.22.0 scikit-learn==0.24.0 shap==0.31.0 simplejson==3.17.5 snowflake-sqlalchemy==1.2.3 torch==1.9.0 tqdm==4.62.2 types-PyYAML==5.4.6 types-protobuf==3.17.4 types-requests==2.25.6 --index-url <https://pypi.org/simple/> --extra-index-url <https://pypi.cbhq.net/> --find-links ~/wheelhouse/ --retries 5 --timeout 15 exited with -9 and STDERR:
None
I attached the output for the failing tests as well.loud-stone-83419
09/21/2021, 1:40 AMBUILD
files, even if the config specifies build_patterns = ["BUILD.v2"]
is there a way to change what gets generatedloud-stone-83419
09/21/2021, 1:40 AMException message: 1 Exception encountered:
ResolveError: Directory 'build-tools/bins' does not contain any BUILD files.
loud-stone-83419
09/21/2021, 1:41 AM