refined-addition-53644
08/31/2022, 2:28 PMbuild_arg
to have some default value. The use case is we set such env vars only in our CI/CD but for local run it can be any random value.
https://www.pantsbuild.org/docs/tagging-docker-images#using-env-vars-to-include-dynamic-data-in-tagscolossal-angle-79806
08/31/2022, 2:50 PMfresh-cat-90827
08/31/2022, 3:41 PMpants.toml
? š I could be misunderstanding the docs.high-yak-85899
08/31/2022, 4:29 PM$HOME
)?worried-painter-31382
08/31/2022, 4:44 PMpex_binary
is built to target? I missed that they are built to target the current host machine and have some issues with docker builds and the fact some of our devs use macos.flat-zoo-31952
08/31/2022, 7:05 PMadamant-magazine-16751
08/31/2022, 9:47 PMProcessExecutionFailure: Process 'Building...failed with exit code 1.
stdout:
stderr:
pid 536 -> /root/.cache/pants/named_caches/pex_root/venvs/.../pex --retries [...] --retries 5 --timeout 15 exited with -9 and STDERR:
None
Building the same pex_binary works locally, so I assume this is a problem with the gitlab shared runner running OOM (I think it has <4gigs available)
So I guess my questions are:
1. Am I correct about it being an oom error?
2. Do you maybe see a simpler alternative to using pants in the scenario I just described?careful-wolf-40930
09/01/2022, 12:25 PMcareful-wolf-40930
09/01/2022, 12:26 PMcareful-wolf-40930
09/01/2022, 12:27 PMcareful-wolf-40930
09/01/2022, 12:32 PMcareful-wolf-40930
09/01/2022, 12:33 PMrefined-addition-53644
09/01/2022, 12:39 PMpex_binary
. Not sure if you already read about it
https://www.pantsbuild.org/docs/python-package-goal#creating-a-pex-file-from-a-pex_binary-target
You can combine this with docker. Worth going though the docs to understand the flow.
https://www.pantsbuild.org/docs/dockerpowerful-eye-58407
09/01/2022, 1:25 PMworried-painter-31382
09/01/2022, 1:42 PMpants
invocations in pythons subprocess
. So far it had worked ok, but using
[python-repos]
indexes = [
'<https://aws>:%(env.CODE_ARTIFACT_TOKEN)s@<our-python-repo>/simple
]
and adding the appropriate platform to the pex_binary
causes
subprocess.run(f'./pants package {dockerfile} --dynamic-ui=False', shell=True, text=True, env=os.environ)
to hang.
Running ./pants package <the-dockerfile>
works, so it's something specific to subprocess
careful-wolf-40930
09/01/2022, 2:41 PMrefined-addition-53644
09/01/2022, 2:43 PMThe PEX file will contain all the code needed to run the binary, namely:
⢠All Python code and resources the binary transitively depends on.
⢠The resolved 3rd-party Python dependencies (sdists and wheels) of all targets the binary transitively depends on.
careful-wolf-40930
09/01/2022, 2:44 PMrefined-addition-53644
09/01/2022, 2:45 PMcareful-wolf-40930
09/01/2022, 2:46 PMpolite-garden-50641
09/01/2022, 4:46 PMGOARCH=amd64 GOOS=linux go build .
when using pant's golang support (`./pants package src/go/someplace/goapp/::`` ) ? didn't find any reference to this in docs https://www.pantsbuild.org/v2.13/docs/go (trying to build a linux amd64 files on an apple m1)careful-address-89803
09/01/2022, 5:40 PMpython_distribution
?adamant-coat-28831
09/01/2022, 7:25 PMwide-midnight-78598
09/02/2022, 12:03 PMworried-painter-31382
09/02/2022, 1:57 PM--cache-from
argument to the docker_image
via some pants invocation?hundreds-carpet-28072
09/02/2022, 3:31 PMancient-rose-27306
09/02/2022, 3:57 PM~/.cache/pants/named_caches/pex_root/venvs
get created? I see a bunch of them in my linux Docker container where I run Pants, why is that so? Why canāt there be only one venv? Moreover, how are the directories under venvs/
named? After some SHA256 (of what)? And then sub-directories under them which eventually have pex installed? For example, the last two directories in this path:
~/.cache/pants/named_caches/pex_root/venvs/f61cf2fb294c1349fb246a9500aef689076f209a/319fabea91de21f4b9853622585d1be26b57025e/
freezing-lamp-12123
09/02/2022, 5:39 PMripe-cpu-85141
09/02/2022, 5:45 PMpants dependencies --transitive the lambda_target
but pants package
doesn't bring it in.
If I rm -r dist/
, pkill pantsd
and repackage, the file is finally added. Do I miss something? I'm not sure how to diagnose that kind of issue.flat-zoo-31952
09/02/2022, 6:32 PMtailor
issue I'm running into when creating something with pre-commit: I'd like to just pass filenames from pre-commit, but the issue is stuff in pants_ignore
. Anything in pants_ignore
that shows up on the command line causes pants to error out. Example:
⯠./pants tailor --check aiven/README.md
14:28:43.11 [ERROR] 1 Exception encountered:
Exception: Unmatched glob from CLI arguments: "aiven/README.md"
Do the file(s) exist? If so, check if the file(s) are in your `.gitignore` or the global `pants_ignore` option, which may result in Pants not being able to see the file(s) even though they exist on disk. Refer to <https://www.pantsbuild.org/v2.13/docs/troubleshooting#pants-cannot-find-a-file-in-your-project>.
Is there a way to avoid this? Or do I need to filter before passing to tailor
?