better-sunset-63499
03/01/2022, 4:21 PMBUILD
files? I like to have them set as the Python type to get autoformatting, but it's a sea of red because python_sources
and such aren't definedlively-exabyte-12840
03/01/2022, 4:31 PMloud-laptop-17949
03/01/2022, 6:44 PMsrc/django_apps/::/migrations
, but it seems that I can't do that in a BUILD file. Is there a good way around this? Or will we need to manually manage that list?bitter-ability-32190
03/02/2022, 1:08 AMfmt
and lint
use the same process (the args used for formatting) for both fmt
and lint
. fmt
then applies the changes to the workspace while lint
diffs (optionally outputting the diff if requested). Then ./pants fmt lint ::
is a no-op in lint
for formatters 🎉
The risk is meaningful stdout/err
being removed from the tool, but the gain is perf through caching, consistency, and plugin simplification.eager-dress-66405
03/02/2022, 5:46 AM...
[docker]
build_args.add = [
"BASE_PYTHON_IMAGE=foo",
]
`pants.ci.toml`:
...
[docker]
# Expose aws auth to docker.
build_args.add = [
"AWS_DEFAULT_REGION",
"AWS_ACCESS_KEY_ID",
"AWS_SECRET_ACCESS_KEY",
"AWS_SESSION_TOKEN",
]
`Dockerfile`:
ARG BASE_PYTHON_IMAGE
FROM ${BASE_PYTHON_IMAGE}
...
Running in CI:
$ export PANTS_CONFIG_FILES=pants.ci.toml
$ ./pants package docker/image:target
...
failed to solve with frontend dockerfile.v0: failed to create LLB definition: base name (${BASE_PYTHON_IMAGE}) should not be blank
...
witty-family-13337
03/02/2022, 4:17 PMreference.conf
file at the top-level, when trying to pack the code that needs Akka using deploy_jar
we get file colissions (as it finds the same file name more than once).
So this either requires having a target that allows to package a thin jar, or use something similar to what SBT does (in sbt-assembly
) by having Merge strategies, not sure if anyone here has thought on other ways of solving this.ambitious-student-81104
03/02/2022, 5:16 PMfastparquet
dependency, it errors out on numpy
being installed already:
FileExistsError: [Errno 17] File exists: '/private/var/folders/5c/tp4p_z3d2bnc6fb68lth0d4w0000gp/T/process-executionyhk5sS/.tmp/pip-req-build-vkux75ls/.eggs/numpy-1.14.5-py3.7-macosx-10.16-x86_64.egg'
this is python 3.7.10
, pants 2.9.0
. fastparquet==0.7.1
meanwhile I can pip install fastparquet==0.7.1
just fine, but it's using a cached wheel.
it seems to be a known problem for fastparquet 0.7.1 (github link) but I don't know what exactly the solution israpid-crayon-8232
03/02/2022, 5:51 PMexperimental_shell_command
to generate c++ extensions using cmake and pybind11 for python, the build file I'm using right now:
shell_sources(name="build-c-exts", sources=["./**/*"])
experimental_shell_command(
name="c-deps",
command="./build.sh",
log_output=True,
tools=["make", "cmake", "cat", "bash", "env", "chmod", "gcc", "g++", "as", "ld"],
dependencies=[":build-c-exts"],
outputs=["results/", "logs/my-script.log"],
)
But I get an error that it can't find Python.h
(I'm using pyenv), error in the thread ⬇️loud-laptop-17949
03/02/2022, 6:59 PM10:59:31.12 [INFO] Remote cache/execution options updated: reinitializing scheduler...
?clever-yacht-60730
03/02/2022, 9:15 PMdocker_image
. The image is building successfully, but when I run a container using the image, it is not able to serve requests to the host (made sure that I am forwarding the correct port). I am using docker on WSL2, and have pasted pants' BUILD
file and the dockerfile
I'm using to build the image in the thread. Any ideas on how I can fix this? 🙂lively-exabyte-12840
03/02/2022, 9:26 PMhigh-yak-85899
03/02/2022, 11:09 PMwith MyClass():
while True:
time.sleep(1)
When I run this, I see MyClass.__enter__
called, but if I Ctrl+C, I never see MyClass.__exit__
called. This only happens with Pants. If I run my program as python my_prog.py
, then I see MyClass.__exit__
successfully called. Is there any way to recover this behavior? It makes sense to me why this is happening, but I'd really like to make sure I can gracefully shut down things.loud-laptop-17949
03/02/2022, 11:14 PMfresh-cat-90827
03/03/2022, 9:16 AMBUILD
files to see if they would raise any warnings when target is being used?wide-zoo-86070
03/03/2022, 7:45 PM.pants --version
I encounter the following error.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1122)'))': /simple/virtualenv/
I think this warning comes from
"${python}" "${pex_path}" -r requirements.txt -c virtualenv -o virtualenv.pex
In my company, we have artifactory mirrors /simple. I am wondering how to config pants to use that?icy-hair-30586
03/03/2022, 8:37 PMfresh-cat-90827
03/03/2022, 8:40 PMpex_binary
declaration only, and if the entry_point
file is not listed as sources
, the PEX file is still produced, but isn’t usable since the module is absent.flat-zoo-31952
03/03/2022, 9:32 PMflat-zoo-31952
03/03/2022, 10:11 PMambitious-student-81104
03/03/2022, 11:47 PMstocky-raincoat-64723
03/04/2022, 5:03 PMstocky-dream-14103
03/04/2022, 6:00 PMDYLD_FALLBACK_LIBRARY_PATH
. I set it in test.extra_env_vars
in pants.toml
, set the environment variable and then call ./pants test ::
.
• But it looks like MacOS System Integrity Protection is preventing me to pass the DYLD environment variable to ./pants
, because it’s running a /bin/bash
binary, which is protected by the SIP.
• I understand this is not a Pants issue, but curious if anybody had found a workaround?
• Note: the issue has been documented in several StackOverflow questions, but the workarounds are not super practical (e.g. copy the bash executable outside of /bin
or /usr/bin
)hundreds-father-404
03/05/2022, 1:25 AMhundreds-father-404
03/05/2022, 1:26 AMrefined-addition-53644
03/05/2022, 12:04 PMbland-father-19717
03/05/2022, 2:35 PMwide-midnight-78598
03/06/2022, 2:08 AMflat-zoo-31952
03/07/2022, 6:44 PMhundreds-father-404
03/07/2022, 7:42 PMgood first issue
that could speed up Pants a decent bit & should be approachable. https://github.com/pantsbuild/pants/issues/14719
Optimize Pants's data structures by not sorting as much (FrozenOrderedSet and FrozenDict)
wide-zoo-86070
03/07/2022, 7:49 PM./pants --version
, I see the following error
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/virtualenv/
ERROR: Could not find a version that satisfies the requirement virtualenv==20.4.7 (from -r requirements.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for virtualenv==20.4.7 (from -r requirements.txt (line 1))
.pex/venvs/32a5dda4259a11b7add428d3f3e5656078dd2fe0/f28b3dbba3c9dae1b4357adde5b079b8b3ca9fac/pex --disable-pip-version-check --no-python-version-warning --exists-action a --use-deprecated legacy-resolver --isolated -q --cache-dir .pex download --dest /tmp/tmpwm2e_tsu/data.user.miniconda3.bin.python3.7 --requirement requirements.txt --index-url <https://pypi.org/simple> --retries 5 --timeout 15
Is there a way to pass other --index-url?