freezing-lamp-12123
10/25/2022, 7:19 PMhigh-yak-85899
10/25/2022, 7:40 PM13:39:41.24 [WARN] /home/nathanael/.cache/pants/setup/bootstrap-Linux-x86_64/2.14.0rc5_py39/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/specifiers.py:255: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
warnings.warn(
high-yak-85899
10/25/2022, 7:52 PMconftest.py
. Pants doesn't know that _pytest
comes from the pytest
package. Where's the most appropriate place to inform that? I could get by with a # pants: no-infer-dep
, but curious about a more proper fix.brash-student-40401
10/25/2022, 7:55 PMdocker_image
target is very simple:
docker_image(
name="app",
image_tags=["{build_args.GIT_COMMIT}", "latest"],
registries=["{build_args.REGISTRY}"],
)
then I have Github run it using ./pants --docker-build-args="[GIT_COMMIT=${GITHUB_SHA::7}, REGISTRY=${{ steps.login-ecr.outputs.registry }}]" package src/services/app/Dockerfile
. The error is in the 🧵, my guess is I have the syntax wrong in my package statement but I can't figure it out.abundant-keyboard-19745
10/26/2022, 1:37 AMnative_engine.PantsdClientException: The pantsd process was killed during the run.
If this was not intentionally done by you, Pants may have been killed by the operating system due to memory overconsumption (i.e. OOM-killed). You can set the global option `--pantsd-max-memory-usage` to reduce Pantsd's memory consumption by retaining less in its in-memory cache (run `./pants help-advanced global`). You can also disable pantsd with the global option `--no-pantsd` to avoid persisting memory across Pants runs, although you will miss out on additional caching.
If neither of those help, please consider filing a GitHub issue or reaching out on Slack so that we can investigate the possible memory overconsumption (<https://www.pantsbuild.org/docs/getting-help>).
I tried following the two pieces of advice in the error message, but to no avail. What did help alleviate the crashing was closing all other running applications (I also cleared the Pants cache for good measure). I understand that Pants is being OOM-killed in this type of situation. However, the advice in the error message did not help me at all. Only after I closed all other applications did the crashing stop. Can this error message please be revised to include advice that is easier to understand and follow, i.e. closing all other running applications to reduce memory consumption?lively-dusk-46231
10/26/2022, 3:32 AM[flake8].extra_requirements
from a requirements.txt
file ?
Instead of hardcoding it in the pants.toml ?bitter-ability-32190
10/26/2022, 2:04 PMgenerate-lockfiles
, but you can if you just use pex
to lock directly, and set [python].invalid_lockfile_behavior = "ignore"
bitter-ability-32190
10/26/2022, 2:05 PMbitter-ability-32190
10/26/2022, 2:05 PMlively-dusk-46231
10/26/2022, 2:08 PMrequirements-flake8.txt
, requirements-pytest.txt
, Etc)
And was wondering if I can reuse them instead of rewriting them in a config file which is pants specificbitter-ability-32190
10/26/2022, 2:09 PMlively-dusk-46231
10/26/2022, 2:14 PMbitter-ability-32190
10/26/2022, 2:20 PMbitter-ability-32190
10/26/2022, 2:20 PMpex
for anyone to use let me know as wellproud-dentist-22844
10/26/2022, 3:54 PMwitty-crayon-22786
10/26/2022, 4:12 PMwide-midnight-78598
10/26/2022, 5:23 PMwebpack
, vite
, esbuild
(yay Go), swc
(yay Rust), etc (to which I'm a giant 👎 ) - or,
B) would it be to use those as plugins and facilitate their usage in a consistent matter, and maybe throw some dep inference + caching in for good measure, or
C) Alternative/middleground
prettier
is currently a plugin, eslint
should be added in (and can be added in, if not already there) - so we've started on the fmt
and lint
(and fix
stories) and then we're stuck with the question of transpiling/bundling (check
, package
). For instance, my internal tooling moved from experimental_shell
to a ViteJS plugin which uses all of my existing configuration (and, more importantly, plugins for Svelte/Kit) and basically calls the correct vite args at the command line.
The prospect of using Pants and migrating config from vite
to yet another transpiler/builder (since the JS ecosystem is the wild west), is a non-starter for me.loud-laptop-17949
10/26/2022, 6:23 PMfuture-oxygen-10553
10/26/2022, 7:14 PMimportlib.metadata.version
to get the installed version of my packages at runtime from the installation metadata. Unfortunately, pants doesn’t install packages into its hermetic environment when the package is under test, so importing the package fails because importlib.metadata
cannot find the package. Is there any way around this other than try/except
in the __init__.py
for the package?boundless-zebra-79556
10/26/2022, 8:41 PMtables
on mac m1. With vanilla pip
, I install with extra brew packages and environment vars:
brew install hdf5 c-blosc lzo bzip2
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
export HDF5_DIR=/opt/homebrew/opt/hdf5
export BLOSC_DIR=/opt/homebrew/opt/c-blosc
Is there anyway I can propagate these environment vars to pants
when its building requirement pex
?ambitious-xylophone-5772
10/26/2022, 11:27 PMtests/
- test_a.py
- test_b.py
- BUILD
I want to have a structure like this:
tests/
- test_a.py
- test_b.py
- BUILD
- extra/
- test_c.py
- test_d.py
What do I need to do to have my BUILD pick up the tests in that directory as well?cold-vr-15232
10/27/2022, 8:23 AMworried-painter-31382
10/27/2022, 8:48 AMcold-vr-15232
10/27/2022, 9:10 AMclever-crayon-70731
10/27/2022, 2:58 PMpex_binary()
takes a platforms
argument, python_awslambda()
does not. Is there a reason for this? 🤔gentle-sugar-52379
10/27/2022, 4:21 PMfreezing-lamp-12123
10/27/2022, 5:02 PMfreezing-lamp-12123
10/27/2022, 6:14 PMcommand
field be wrapped by parametrize
while extra_env_vars
seem to work out …
is there some expectancy around parameterization of input fields?clever-gigabyte-29368
10/28/2022, 12:52 AMrhythmic-morning-87313
10/28/2022, 8:11 AM./pants export
against only a specific python tool?