echoing-london-29138
02/17/2022, 8:36 AMwitty-family-13337
02/17/2022, 11:52 AMWSDL -> Java
backend? I have a working one implementation that Id be happy to share. Hopefully itβs less controversial than the Helm plugin we had a chat about already π
limited-insurance-37393
02/17/2022, 2:14 PMpython_sources
below a certain BUILD file? I noticed that tailor isn't automatically creating a BUILD definition in the root of a package anymore?better-sunset-63499
02/17/2022, 3:51 PMdownload_file(name:str, description:Optional[str], url:str, expected_digest:str, expected_size:Optional[str], path:str)
That will then materialize the file to be used afterwards in any file(s)
or resource(s)
targets after the fact. Overloading file
and resource
with optional URL/digest/etc options feels more confusing than helpfulambitious-petabyte-59095
02/17/2022, 4:39 PMdocker exec -t projectA-container pytest tests projectA)
, which is one session.
This is my current project structure:
projectA
- tests
- units
- __init__.py
- BUILD # tests
- test_task1.py
- utils
- __init__.py
- BUILD
- init_data.py
__init__.py
BUILD # test utils
conftest.py
this is the relevant part of my conftest.py
@pytest.fixture(scope="session", autouse=True)
def mongo():
client = MongoClient(settings.MONGO_URI)
db = client["test"]
yield db
client.drop_database("test")
I know that the tests are executed in parallel given enough cores so I was wondering if this could possibly affect the "session" scope? Any help to better understand this would be appreciated. Thanks so much!limited-insurance-37393
02/17/2022, 5:50 PMpython_library
-> python_sources
nice-florist-55958
02/17/2022, 11:58 PM18:30:01 SHA256 fingerprint of file:///var/tmp/pjenkslv/jenkins/workspace/casper-codetree-release-lib-ANY/casper/codetree/codetree/src/pantsbuild/pex verified.
18:30:01 Preparinng bootstrap with initial requirements
18:30:01 /ms/dist/python/PROJ/core/3.7.5/exec/bin/python: can't find '__main__' module in '/var/tmp/emmdev/.pex/unzipped_pexes/478cc1fa371ca40aa3e7dafee735ca438d4a243f'
The specific line is:
"${python}" "${pex_path}" --cert="${PIP_CERT}" -r requirements.txt -c virtualenv -o virtualenv.pex --retries=1 --timeout=1 --index-url="${PIP_INDEX_URL}"
The extra arguments are our own to make downloading packages work, but this is in the boostrap_virtualenv function, and it has worked fine until just recently.
It's very hard to diagnose problems on the CI host, so at the moment I can't tell if this is Pants/Pex related or some problem with the host...happy-kitchen-89482
02/18/2022, 12:16 AMwide-midnight-78598
02/18/2022, 1:05 AMbland-father-19717
02/18/2022, 8:42 AMpants-jupyter-plugin
Β related question.
I am using pants-jupyter-plugin
Β in AWS SageMaker Studio. I have a failure with %pants_load
, but there is little information in the error log and I am struggling to investigate.echoing-london-29138
02/18/2022, 9:05 AMresource(name="pyproject", source="pyproject.toml")
python_sources(name="source", sources=["./**/*.py", "!setup.py"])
python_distribution(
name="utils",
provides=python_artifact(
name="utils",
version="0.1.0",
),
dependencies=[
":pyproject",
":source",
],
wheel_config_settings={"--global-option": ["--python-tag", "py3"]},
)
But when I tried to run a test which is in another module, I got the following error :
ModuleNotFoundError: No module named 'utils'
I feel Iβm not configuring as it should be, but Iβm completely lost. Is there a project that I could have a look on to understand how to use pants ?echoing-london-29138
02/18/2022, 1:11 PMrapid-bird-79300
02/18/2022, 4:58 PMskip_pylint
default to False
for a project needing incremental adoption? I'd like to avoid having to create custom plugin overriding the skip default. I thought maybe macros can help but it seems a bit complicated for what we're trying to achieve.busy-vase-39202
02/18/2022, 6:18 PM"Now I, at long last, have a fully integrated end-to-end Python workflow that starts with me typing code and ends with a fully tested executable binary."
busy-vase-39202
02/18/2022, 7:14 PMrapid-bird-79300
02/18/2022, 8:04 PMhundreds-father-404
02/18/2022, 8:50 PMbusy-vase-39202
02/18/2022, 10:05 PMbreezy-manchester-62939
02/18/2022, 10:41 PM[test].use_coverage = true
) on pants version 2.8.0
.
I get an error when I try to run with these two configurations
β’ [coverage-py].global_report = true
in pants.toml
β’ [tool.coverage.run].branch = true
in pyproject.toml
Everything works fine if one of these is set to false
, but throws following error message if both are set to `true`:
ProcessExecutionFailure: Process 'Merge 2 Pytest coverage reports.' failed with exit code 1.
stdout:
Can't combine arc data with line data
stderr:
fresh-cat-90827
02/19/2022, 7:31 AMGoogle has spent a tremendous amount of engineering effort over its lifetime in creating its own build system from the ground up, with the goal of ensuring that our engineers are able to quickly and reliably build code.Β The effort has been so successful that Blaze, the main component of the build system, has been reimplemented several different times by ex-Googlers who have left the company (2).The URL in the footnote (2) https://www.pantsbuild.org/index.html which takes you to the web site (the page itself is not found though), but itβs taking you to the right site which is great!
nice-hydrogen-28689
02/20/2022, 5:43 AMtailor
generated a bunch of build files, but when I to run ./pants list ::
I get an error complaining that one of our dependencies does not exist β itβs something that weβve vendored and linked through go.mod, and when I looked in the chroot for that step I found that only my mod and sum files were there. No sources or anything.witty-family-13337
02/21/2022, 9:17 AMWSDL -> Java
codegen backend and Iβm getting an import error when doing ./pants test src/python/pants/backend/codegen/soap::
on a fresh pull of the pants
repo (well, in fact it happens when I try running any Python test using the ./pants
script). The error looks like the following:
_ ERROR collecting src/python/pants/backend/codegen/soap/target_types_test.py __
ImportError while importing test module '/private/var/folders/c9/5v4gbjh17w9_vy73fc90fnch0000gn/T/process-executionF88I01/src/python/pants/backend/codegen/soap/target_types_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/codegen/soap/target_types_test.py:9: in <module>
from pants.backend.codegen.soap import target_types
src/python/pants/backend/codegen/soap/target_types.py:4: in <module>
from pants.engine.rules import collect_rules, rule
src/python/pants/engine/rules.py:28: in <module>
from pants.engine.engine_aware import SideEffecting
src/python/pants/engine/engine_aware.py:9: in <module>
from pants.engine.internals import native_engine
E ImportError: dlopen(/private/var/folders/c9/5v4gbjh17w9_vy73fc90fnch0000gn/T/process-executionF88I01/src/python/pants/engine/internals/native_engine.so, 0x0002): symbol not found in flat namespace '_PyObject_VectorcallMethod'
I did a ./cargo build
and ./cargo test
separately and those commands succeed β¦ does any of know what I may be missing that causes that error?fresh-cat-90827
02/21/2022, 9:53 PMwooden-library-2965
02/22/2022, 1:54 PMlively-exabyte-12840
02/22/2022, 5:04 PMlively-exabyte-12840
02/22/2022, 5:51 PMpants export ::
does not have a "pip" file in it. Is that by design? My use case for it is using e.g. pip list | more
as a quick test of what's in the venv for when I want to run something outside of running it via pantsechoing-farmer-15630
02/22/2022, 9:09 PMexecution_mode="venv"
, but basically what's happening is that in my virtual environment I can import the namespace package and do a dir
and see lots of stuff; the pex shows the identical dependencies in there, and I can still import the namespace package, but the result is an empty module.
I can post more specifics, but is this a known thing with pexes that can be worked around?rapid-bird-79300
02/23/2022, 12:20 AMkilled
output with no additional info. We're trying to run with --no-pantsd
and --no-watch-filesystem
but no success just yet. Created this gist for logs.salmon-wire-73102
02/23/2022, 12:58 AM./pants -ldebug version
Bootstrapping Pants using /Users/nizarhejazi/.pyenv/shims/python3.9
Creating the virtualenv PEX.
Downloading the Pex PEX.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 640 100 640 0 0 3023 0 --:--:-- --:--:-- --:--:-- 3076
100 3529k 100 3529k 0 0 4661k 0 --:--:-- --:--:-- --:--:-- 4661k
SHA256 fingerprint of <https://github.com/pantsbuild/pex/releases/download/v2.1.42/pex> verified.
Failed to spawn a job for DistributionTarget(interpreter=PythonInterpreter('/Users/nizarhejazi/.pyenv/versions/3.9.5_x86/bin/python3.9', PythonIdentity('/Users/nizarhejazi/.pyenv/versions/3.9.5_x86/bin/python3.9', 'cp39', 'cp39', 'macosx_12_0_x86_64', (3, 9, 5)))): [Errno 2] No such file or directory: '/Users/nizarhejazi/.pex/venvs/d205c7f978b881f663df257d6bf11d02e6309c3b/832e95f85413646e8b7b056ab4e60414f83d7397/pex'
mv: rename /Users/nizarhejazi/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.7jKJ9F/virtualenv.pex to /Users/nizarhejazi/.cache/pants/setup/bootstrap-Darwin-x86_64/virtualenv-20.4.7/virtualenv.pex: No such file or directory
Installing pantsbuild.pants==2.7.0 into a virtual environment at /Users/nizarhejazi/.cache/pants/setup/bootstrap-Darwin-x86_64/2.7.0_py39
/Users/nizarhejazi/.pyenv/versions/3.9.5_x86/bin/python3.9: can't open file '/Users/nizarhejazi/.cache/pants/setup/bootstrap-Darwin-x86_64/virtualenv-20.4.7/virtualenv.pex': [Errno 2] No such file or directory
I have been following this article to setup my env. I am running ./pants
command using iTerm w/ Rosetta. Any help is appreciated.wonderful-yak-59945
02/23/2022, 6:42 AM"file": null
for it which the post processing script seems to be choking on)