polite-angle-82480
02/14/2023, 8:02 PMpolite-angle-82480
02/14/2023, 8:02 PMsilly-breakfast-1564
02/14/2023, 8:33 PMpack: open __pkg__.a: permission denied
. It appears for a couple of the dependencies I’m using (namely golang.org/x/sys/unix and github.com/cespare/xxhash/v2).
My theory is there is a name collision or something between these dependencies and others, anyone have an idea for how to deal with this/get around it and/or if my intuition is wrong?wonderful-boots-93625
02/14/2023, 9:02 PMpython_distribution(
name="dist",
dependencies=[
"iai_fl_client:reqs",
"iai_auth:dist",
"iai_fl_client/src/iai_fl_client",
"iai_fl_client/src/iai_fl_client/utils",
"iai_fl_client/src/iai_fl_client/client",
],
provides=python_artifact(
name="iai-fl-client",
version="2.0.24",
),
wheel_config_settings={"--global-option": ["--python-tag", "py37.py38.py39"]},
)
and in the tests BUILD
python_tests(
name="tests",
timeout=120,
runtime_package_dependencies=[
"iai_fl_client:dist",
"iai_auth:dist",
]
)
And when running tests it can’t import iai_fl_client.utils
- what am I doing wrong?
_________________ ERROR collecting tests/test_client_utils.py __________________
ImportError while importing test module '/private/var/folders/xn/yvv0m2ln4dg_vyr8rp8_3xzh0000gn/T/pants-sandbox-dNO8Kw/iai_fl_client/tests/test_client_utils.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Users/nasron/.pyenv/versions/3.8.13/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
iai_fl_client/tests/test_client_utils.py:3: in <module>
from iai_fl_client.utils.util import poll_server_info
E ModuleNotFoundError: No module named 'iai_fl_client.utils'
silly-breakfast-1564
02/14/2023, 9:47 PMaloof-appointment-30987
02/14/2023, 11:03 PM./pants --print-stacktrace -ldebug list ::
Using version 2.16.0.dev3
Traceback (most recent call last):
File "/home/vagrant/.cache/pants/setup/bootstrap-Linux-x86_64/2.16.0.dev3_py38/lib/python3.8/site-packages/pants/backend/go/util_rules/build_pkg.py", line 774, in required_built_go_package
raise Exception(
Exception: Failed to compile main:
./main.go:18:2: could not import encoding/json (open : no such file or directory)
./main.go:19:2: could not import fmt (open : no such file or directory)
...
./main.go:27:2: too many errors
it looks to me like pants is not picking up the default $GOPATH (I'm not a GoLang expert however...)
I show default GOPATH
vagrant@linux:~$ go env GOPATH
/home/vagrant/go
Same command using pants version 2.16.0.dev5
File "/home/vagrant/.cache/pants/setup/bootstrap-Linux-x86_64/2.16.0.dev5_py38/lib/python3.8/site-packages/pants/util/frozendict.py", line 51, in __getitem__
return self._data[k]
KeyError: 'unicode/utf8'
Full debug log with stacktrace for both pants versions attachedaloof-appointment-30987
02/14/2023, 11:14 PMsilly-queen-7197
02/14/2023, 11:53 PMextra_build_args=['FURY_AUTH=%(env.FURY_AUTH)s']
to work in a BUILD
file, I'm trying to create a Docker image target. I can do
[docker]
build_args = ['FURY_AUTH=%(env.FURY_AUTH)s']
in pants.toml
but I haven't had any luck figuring out the corresponding syntax in a BUILD
file.lively-zebra-24587
02/15/2023, 2:53 AMrequirements.pex
from lock files, and certain packages cannot be installed. Here's and example of the error logs:
21:45:36.76 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Building 22 requirements for requirements.pex from the build-support/databricks_lock.txt resolve: boto3==1.16.7, cleanco<2.2, enigma-data-catalog-sdk, enigma-enrichment, enigma-namedframes~=1.0.2, enigma-pyspark-commons, fuzzywuzzy, jellyfish, matplotlib==3.4.2, mlflow==1.20.2, numpy<1.24,>=1.20, pandas==1.2.4, plotly==5.1.0, probablepeople, protobuf==3.17.2, pyarrow==4.0.0, pyspark-test, pyspark==3.1.2, pytest, scikit-learn==0.24.1, scipy~=1.6.0, tldextract' failed with exit code 1.
stdout:
stderr:
There were 4 errors downloading required artifacts:
1. pandas 1.2.4 from <https://files.pythonhosted.org/packages/e8/81/f7be049fe887865200a0450b137f2c574647b9154503865502cfd720ab5d/pandas-1.2.4.tar.gz>
ERROR: Command errored out with exit status 1: /Users/tom/.cache/pants/named_caches/pex_root/venvs/cac1718c056bb509f51fcdcc0c376b33deaaa8ec/80d537a6fbdf98a843c78d59de5b2b2db73ee10d/bin/python /Users/tom/.cache/pants/named_caches/pex_root/venvs/cac1718c056bb509f51fcdcc0c376b33deaaa8ec/80d537a6fbdf98a843c78d59de5b2b2db73ee10d/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /Users/tom/.cache/pants/named_caches/pex_root/pip_cache/.tmp/pip-build-env-nq8fgxoc/overlay --no-warn-script-location -v --no-binary :none: --only-binary :none: -i <https://pypi.org/simple/> --extra-index-url https://****@repo.artifactory.enigma.com/artifactory/api/pypi/pypi-local/simple -- setuptools wheel 'Cython>=0.29.21,<3' 'numpy==1.16.5; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.5; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy; python_version>='"'"'3.9'"'"'' Check the logs for full command output.
the packages that fail are pandas==1.2.4
, pyarrow==4.0.0
and scikit-learn=0.24.1
high-magician-46188
02/15/2023, 10:51 AMpants test
.
Just to make sure: does Pants/Pex's sandboxing has a virtual network interface or anything related that could have a race-condition with Docker when creating a container?famous-xylophone-36532
02/15/2023, 10:56 AMpants.toml
file somewhere? Would be nice to be able to find all of the available options for [docker]
in one place for example.melodic-carpenter-39613
02/15/2023, 2:25 PM--changed-since
flag to work with a Github Action triggered by a Pull Request?
I keep encountering issues such as "fatal origin/stage...HEAD: no merge base" , but don't know how to correct the issue. Can anyone help me? 🙏🤞lively-gpu-26436
02/15/2023, 3:07 PMfuture-oxygen-10553
02/15/2023, 4:43 PMbig-fall-51153
02/15/2023, 5:37 PMgenerate-lockfiles
on a specific package publicly available via pypi (lexid
) - I'm trying to figure out how to debug this and not having much luck. I searched slack history and other times this has come up has been around private packages, so this seems different. I have a repo up with an isolated minimal test case https://github.com/rhysyngsun/pants-lexid-test, but the short of it is python_requirement(requirements=["lexid"])
is enough to trigger it. I'll throw the stacktrace I'm getting in a threaded response to this message.proud-dentist-22844
02/15/2023, 7:12 PMrepositories
param of python_distributions
. Per https://www.pantsbuild.org/docs/python-publish-goal (linked from the bottom of https://www.pantsbuild.org/docs/python-distributions) it could include aliases like @pypi
or private indexes.
What about @testpypi
vs @pypi
? It might be interesting to publish first to @testpypi
and then @pypi
- If I put python_distributions(repositories=["@pypi", "@testpypi"], …)
does that mean that it will publish to both repos? Or I can use TWINE_* vars to select which one to publish to?
background: this is for StackStorm, an open source project. So, I don’t need to worry about publishing to private indexes.silly-queen-7197
02/15/2023, 7:50 PMtensorflow-ranking
which has a dependency on tensforflow
. On M1 laptops, engineers install tensforflow-macos
not tensorflow
. We get around this by pip
installing it with --no-deps
. I tried checking to see if I could specify that flag in requirements.txt
and solve this outside of pants
but haven't found anything. Is there a way I can add --no-deps
to tensorflow-ranking
in pants
?broad-processor-92400
02/15/2023, 9:36 PMlmdb_store
directory is currently at 46GiB, which is a fairly hefty proportion of my full disk. AIUI, pantsd is meant to be doing some GC on it, but, if so, there's a lot of non-garbage. Can I introspect the GC process? Is there a way to force a (harder) GC?plain-night-51324
02/15/2023, 9:57 PMERROR: Could not find a version that satisfies the requirement flake8==6.0.0
ERROR: No matching distribution found for flake8==6.0.0
curved-farmer-66180
02/16/2023, 2:57 AM./pants --changed-since=HEAD~1 --changed-dependees=transitive publish \
--docker-build-args="[ \
'DD_ENV=${STAGE}', \
'DD_VERSION=${COMMIT_REF}', \
'STAGE=${STAGE}', \
'ECR_REGISTRY=${ECR_REGISTRY}', \
'IMAGE_TAG=${COMMIT_REF}', \
'A_REPOSITORY=${A_REPOSITORY}', \
'B_REPOSITORY=${B_REPOSITORY}', \
'C_REPOSITORY=${C_REPOSITORY}', \
]"
I am using this command to deploy docker to ecs(actually ecr)
1. I want to deploy when something changed in the container. Is that the right way I am doing now? Is there better way?
2. I want to add more repository here but I am worried that cd speed is a bit slower. What is the best way to deploy multiple docker image?
3. Is there any way to check updated image, so that I can use the output for the next step? (to ecs run)gorgeous-winter-99296
02/16/2023, 10:23 AMalert-dawn-51425
02/16/2023, 2:45 PMaverage-sugar-68948
02/16/2023, 4:10 PM--debug-adapter
with a python target in VS Code at Pants version 2.16.0.dev5
. It starts up and connects ok, but in one of my projects it fails on importing a (generated) protobuf module. In another simple project breakpoints simply aren't hit. Both of these things seem to point to the debugger not being aware of the sandboxing. I tried adding run_goal_use_sandbox=False,
to my target to no avail (which maybe wouldn't work with generated protobuf modules anyway?). If I revert to 2.14.0
things seem to work ok. Any ideas to try? @bitter-ability-32190lively-gpu-26436
02/16/2023, 5:59 PMrapid-bird-79300
02/16/2023, 7:24 PMgoal_rule
. Using targets: Targets
doesn't seem to include BUILD files.wonderful-boots-93625
02/16/2023, 7:34 PMpytest_psql
when running tests within the pex sandbox:
/Users/nasron/.cache/pants/named_caches/pex_root/venvs/s/e101a3aa/venv/lib/python3.8/site-packages/pytest_pgsql/plugin.py:88: in database_snapshot
return database.create_database_snapshot(pg_engine)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
connectable = Engine(<postgresql://postgres@127.0.0.1:63347/test>)
def create_database_snapshot(connectable):
"""Create a snapshot of the current state of the database so that we can
restore it to this state when the test exits.
Arguments:
connectable (`sqlalchemy.engine.Connectable`):
The engine, connection, or other Connectable to use to take this
snapshot.
Returns (dict):
A dictionary with three keys:
* ``schemas``: A tuple of the names of all the schemas present.
* ``tables``: A list of all of the tables present. Each item in the list
is a dictionary with the schema name, table name, and table OID.
* ``extensions``: A tuple of the names of all the extensions currently
installed.
"""
> execute = connectable.execute
E AttributeError: 'Engine' object has no attribute 'execute'
I think pyscopg2-binary
isn’t getting installed despite being in the dependency list - but I’m note sure.silly-queen-7197
02/16/2023, 8:32 PM./pants test
to include doctests? I added
python_tests(
name="tests",
sources=["*.py"],
)
as a target in my directory and ran ./pants test foobar/:: -- --doctest-modules
but it fails on a bunch of files without testshigh-yak-85899
02/16/2023, 10:03 PM./pants export
improvements slated for 2.15 release? I've been getting a growing number of reports internally on our use of export hanging for a long time. I know from the past there's been some back and forth about taking the risk of using some pants internals for the exported venv instead of generating it fresh.wonderful-boots-93625
02/16/2023, 10:22 PMalert-dawn-51425
02/17/2023, 1:05 AM