high-yak-85899
05/11/2022, 4:58 PM./pants export ::
fine locally, but my CI system complained when it came time to clone a vcs requirement with "Permission denied" errors for public keys. I know these CI systems have access since they're cloning down our repos to get to this step. Any ideas of things to try? We already have the following in our pants.toml
[subprocess-environment]
env_vars.add = ["SSH_AUTH_SOCK"]
full-ocean-15873
05/11/2022, 5:32 PMwide-midnight-78598
05/11/2022, 10:09 PMsymbol not found
error when using the RuleRunner
? I ran into this in the past and just kinda assumed it wasn't a big deal, but on a different computer, same error. Even more specifically, why is my XCode Python3.8 library used in here, when I'm pointing my environment (and everything else) at homebrew's 3.9?
pants % ./pants test src/python/pants/backend/python/lint/black/rules_integration_test.py
18:00:56.67 [ERROR] Completed: Run Pytest - src/python/pants/backend/python/lint/black/rules_integration_test.py:rules_integration_test failed (exit code 2).
============================= test session starts ==============================
collected 0 items / 1 error
==================================== ERRORS ====================================
_ ERROR collecting src/python/pants/backend/python/lint/black/rules_integration_test.py _
ImportError while importing test module '/private/var/folders/2y/y_j1jxgn3tj5rb67_gjb7v700000gn/T/process-executionpSyKcR/src/python/pants/backend/python/lint/black/rules_integration_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
src/python/pants/backend/python/lint/black/rules_integration_test.py:10: in <module>
from pants.backend.python import target_types_rules
src/python/pants/backend/python/target_types_rules.py:18: in <module>
from pants.backend.python.dependency_inference.module_mapper import (
src/python/pants/backend/python/dependency_inference/module_mapper.py:21: in <module>
from pants.backend.python.subsystems.setup import PythonSetup
src/python/pants/backend/python/subsystems/setup.py:19: in <module>
from pants.option.subsystem import Subsystem
src/python/pants/option/subsystem.py:12: in <module>
from pants.engine.internals.selectors import AwaitableConstraints, Get
src/python/pants/engine/internals/selectors.py:14: in <module>
from pants.engine.internals.native_engine import (
E ImportError: dlopen(/private/var/folders/2y/y_j1jxgn3tj5rb67_gjb7v700000gn/T/process-executionpSyKcR/src/python/pants/engine/internals/native_engine.so, 0x0002): symbol not found in flat namespace '_PyCMethod_New'
- generated xml file: /private/var/folders/2y/y_j1jxgn3tj5rb67_gjb7v700000gn/T/process-executionpSyKcR/src.python.pants.backend.python.lint.black.rules_integration_test.py.rules_integration_test.xml -
=========================== short test summary info ============================
ERROR src/python/pants/backend/python/lint/black/rules_integration_test.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.46s ===============================
ā src/python/pants/backend/python/lint/black/rules_integration_test.py:rules_integration_test failed in 1.50s.
happy-kitchen-89482
05/12/2022, 5:16 AMambitious-actor-36781
05/12/2022, 9:36 AMgreen-match-66337
05/12/2022, 11:43 AMaws-lambda-powertools
as a dependency for my lambda... Giving me this error aws-xray-sdk 2.9.0 depends on future
green-match-66337
05/12/2022, 11:43 AMProcessExecutionFailure: Process 'Building template_get/lambda.zip with 1 requirement: aws-lambda-powertools==1.25.10' failed with exit code 1.
stdout:
stderr:
ERROR: Cannot install aws-lambda-powertools because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit <https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies>
pid 30265 -> /Users/andy.challis/.cache/pants/named_caches/pex_root/venvs/4a4903f4a53b18a8968a4b2bac7896c88ae1b1da/cda4085b8dca33309a87eb474877cbd3a6659e25/pex --disable-pip-version-check --no-python-version-warning --exists-action a --isolated -q --cache-dir /Users/andy.challis/.cache/pants/named_caches/pex_root --log /private/var/folders/44/2rnr2jp97g1ddjr20xccsvv40000gn/T/process-executionYYi5SJ/.tmp/pex-pip-logfc_g6lfa/pip.log download --dest /private/var/folders/44/2rnr2jp97g1ddjr20xccsvv40000gn/T/process-executionYYi5SJ/.tmp/tmpjrsxhnm8/cp39-cp39-linux_x86_64 --only-binary :all: aws-lambda-powertools==1.25.10 --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 1 and STDERR:
The conflict is caused by:
aws-xray-sdk 2.9.0 depends on future
aws-xray-sdk 2.8.0 depends on future
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
Use `--no-process-cleanup` to preserve process chroots for inspection.
cold-soccer-63228
05/12/2022, 1:00 PMvulture
from the check
goal? I see that today, it's only mypy
that is invoked.
https://www.pantsbuild.org/docs/python-check-goalcold-soccer-63228
05/12/2022, 1:20 PMBUILD
files for python_tests
targets. See the code snippets below for reference.
⢠Why is a name
parameter generated at all? Why is this necessary?
⢠Why is it that sometimes a "tests0"
string is (rarely) used for a name, whereas other times "tests"
is used?
# path/to/some/BUILD
python_tests(
name="tests0",
)
# path/to/another/BUILD
python_tests(
name="tests",
)
cold-soccer-63228
05/12/2022, 2:20 PM./pants fmt ::
, without explicitly modifying files while it is running.
10:19:26.61 [INFO] Filesystem changed during run: retrying `Fmt` in 500ms...
Is this to be expected as a result of the formatter modifying files?calm-ambulance-65371
05/12/2022, 3:13 PM./pants package ::
. The module in question here packages fine when I run ./pants package module::
, so it's not the .whl
or the package itself. Looks like it's also trying to print a binary blob, most likely the ziped up .whl
brainy-solstice-27042
05/12/2022, 5:46 PMcold-soccer-63228
05/12/2022, 6:55 PMBUILD
files only in semi-top level folders, rather than in every directory? Something like the following?
my_project/
āāā awesome_service/
ā āāā internals/
ā | āāā utils.py
ā | āāā constants.py
ā āāā client/
ā | āāā client.py
ā āāā BUILD
āāā another_awesome_service/
āāā internals/
| āāā utils.py
| āāā constants.py
āāā client/
| āāā client.py
āāā BUILD
loud-laptop-17949
05/12/2022, 9:04 PMcold-soccer-63228
05/13/2022, 3:58 AM./pants test ::
. It seems to come from the ariadne package, and looks as follows.
E graphql.error.syntax_error.GraphQLSyntaxError: Syntax Error: Unexpected <EOF>
E
E GraphQL request:238:1
E 237 |
E 238 |
E | ^
E 239 |
I've pasted the stack trace in the thread to avoid myself from adding a super long message into the channel.
I initially suspected this may be some issue related to ariadne not specifying their dependencies correctly. Previously, I've added to the overrides
field of the pipenv_requirements
target in the root BUILD
file in order to resolve those types of issues, e.g.
pipenv_requirements(
...
overrides = {
"google-cloud-pubsub": { "dependencies": [":requirements#setuptools"] },
}
)
However, the error message is not easy for me to understand in this case, and I can't quite tell what kind of error this is, and whether it is due to the same root cause. I'm wondering if the Pants engineering team has any tips on how I can diagnose what is going wrong here and how I could go about trying to resolve this.
I've already run the following, and see that ariadne is at the very least correctly listed as a dependency of my target.
ā ./pants dependencies front_porch/modules/graphql_views/executable_schema.py
//:requirements#ariadne
...
adorable-caravan-6626
05/13/2022, 5:15 AM14:14:18.56 [ERROR] Completed: pants.backend.terraform.goals.check.terraform_check - terraform-validate failed (exit code 1).
ā·
ā Error: Could not load plugin
ā
ā
ā Plugin reinitialization required. Please run "terraform init".
ā
ā Plugins are external binaries that Terraform uses to access and manipulate
ā resources. The configuration provided requires plugins which can't be
ā located,
ā don't satisfy the version constraints, or are otherwise incompatible.
ā
ā Terraform automatically discovers provider requirements from your
ā configuration, including providers used in child modules. To see the
ā requirements and constraints, run "terraform providers".
ā
ā failed to instantiate provider "<http://registry.terraform.io/hashicorp/google|registry.terraform.io/hashicorp/google>" to
ā obtain schema: unknown provider "<http://registry.terraform.io/hashicorp/google|registry.terraform.io/hashicorp/google>"
rhythmic-morning-87313
05/13/2022, 7:22 AMrhythmic-morning-87313
05/13/2022, 7:23 AMrhythmic-morning-87313
05/13/2022, 7:24 AMxargs
once the dependencies are resolved and caches are verifiedgreen-match-66337
05/13/2022, 7:47 AMpurple-umbrella-89891
05/13/2022, 8:03 AMsphinx-build
and sphinx-apidoc
within it. Can this be written as a pants target?bitter-ability-32190
05/13/2022, 3:27 PMhigh-yak-85899
05/13/2022, 9:34 PMpaths
. I have two dockerfiles with pex binaries that I know are independent of one another. But somehow paths
is saying that they are dependent. Here's a quick sketch of what I have
> src
> foo
A.py
B.py
Dockerfile
> bar
C.py
D.py
Dockerfile
A.py
depends on B.py
and goes into foo/Dockerfile
as a pex. C.py
depends on D.py
and B.py
and goes into bar/Dockerfile
. When I do paths
from bar/Dockerfile
to A.py
, I would expect no link, but somehow I am getting one through the Dockerfiles. Do target tags mess with the dependency tree at all?hundreds-father-404
05/13/2022, 10:33 PM[mypy].extra_type_stubs
, feedback appreciated on https://github.com/pantsbuild/pants/issues/15455hundreds-father-404
05/13/2022, 11:42 PMacceptable-night-23367
05/14/2022, 9:30 PMapp.py
module, plus some static assets), I've gone through the getting started docs, but can't get it to run the app. It looks like it's starting the initial process correctly, flask (werkzeug) comes up and says it's going to listen on whatever port, and tries to start the child serving process, but that one fails to import flask. It seems like the child process created by werkzeug isn't running with the same environment the parent process is using?happy-kitchen-89482
05/14/2022, 10:06 PMtall-jelly-41236
05/15/2022, 4:01 AMpytest-bdd
, My feature files are not accessible, and I have tried as python_test_utils
and files
and included them in dependencies for python_test, still no luck,. I am facing file not found issue for /private/tmp/.tmpBDSdib/tests/bdd/features/integration_instance.feature
I am sure its very small thing I am missing, hope some one can help me here.rhythmic-morning-87313
05/15/2022, 4:37 AMpython_tests()
target.
It seems that %(buildroot)s
expansion is not working in BUILD files. How could I achieve a similar thing?
e.g.,
python_tests(
name="tests",
extra_env_vars=[
"BACKEND_CONFIG_FILE=%(buildroot)s/manager.toml",
],
)
rhythmic-morning-87313
05/15/2022, 4:45 AMpython_tests()
with pytest? (i.e., select specific test(s) to run)