plain-summer-72727
10/31/2022, 11:29 PMraise InvalidFieldException(
pants.engine.target.InvalidFieldException: Unrecognized field `environment=local_docker` in target src/database:funstuff. Valid fields for the target type `pex_binary`: ['complete_platforms', 'dependencies', 'description', 'emit_warnings', 'entry_point', 'execution_mode', 'ignore_errors', 'include_requirements', 'include_sources', 'include_tools', 'inherit_path', 'interpreter_constraints', 'layout', 'output_path', 'platforms', 'resolve', 'resolve_local_platforms', 'restartable', 'script', 'shebang', 'strip_pex_env', 'tags', 'venv_site_packages_copies'].
I just want to confirm that I have 2.15.0a0 set up properly, since it looks like my pex_binary target isn't accepting environment
as a field:
• I set pants_version
to 2.15.0a0
• In pants.toml, I set [environments-preview.names]
to local_docker="//:local_docker"
• In my topmost BUILD file I added:
docker_environment(
name="local_docker",
platform="linux_x86_64",
image="python:3.9-bullseye",
)
• Lastly, in src/database/BUILD I added:
pex_binary(
name="funstuff",
entry_point="funstuff.py",
environment="local_docker",
)
docker_image(
name="docker_image",
instructions=[
"FROM python:3.9-bullseye",
'ENTRYPOINT ["/main"]',
"COPY examples/main.pex /main",
],
)
(funstuff.py is just a hello-world Python script).
Definitely understand that this is an alpha build but I figured this is likely a basic error w/ something I'm msising. Help would be appreciated - thank you!witty-crayon-22786
10/31/2022, 11:34 PMpex_binary
didn’t actually get its environment=
field: sorry for the oversight! we’ll get a change out for that tomorrow.plain-summer-72727
10/31/2022, 11:36 PMancient-vegetable-10556
11/02/2022, 5:21 PMmain
now!incalculable-hydrogen-44003
11/04/2022, 2:39 PMancient-vegetable-10556
11/04/2022, 2:50 PMPANTS_SHA
to invoke it, as there isn’t a release yet, but if you’re OK with that, then yes!incalculable-hydrogen-44003
11/04/2022, 2:51 PMA deprecated alias for `[python-repos].find_links`.
12:01:42.32 [ERROR] Invalid option 'tailor_ignore_solitary_init_files' under [python] in /home/sepehr500/Documents/starkblast/pants.toml
12:01:42.32 [ERROR] Invalid option 'inits' under [python-infer] in /home/sepehr500/Documents/starkblast/pants.toml
12:01:42.32 [ERROR] Invalid config entries detected. See log for details on which entries to update or remove.
(Specify --no-verify-config to disable this check.)
ancient-vegetable-10556
11/04/2022, 4:05 PM34c5cd8f22d9db60c4478824cbdc17932b15457c
firstincalculable-hydrogen-44003
11/04/2022, 4:05 PM2de6f77ee6dfb4acf89e45f5e3b9ec7cb8ebdb11
ancient-vegetable-10556
11/04/2022, 4:05 PMincalculable-hydrogen-44003
11/04/2022, 4:06 PMancient-vegetable-10556
11/04/2022, 4:06 PM2de…
is on main
, which will have the 2.16 API, not the 2.15 APIincalculable-hydrogen-44003
11/04/2022, 4:07 PMancient-vegetable-10556
11/04/2022, 4:07 PM34c….
is on 2.15.x
incalculable-hydrogen-44003
11/04/2022, 4:07 PMERROR: No matching distribution found for pantsbuild.pants==2.15.0a0+git34c5cd8f
34c5cd8f22d9db60c4478824cbdc17932b15457c
ancient-vegetable-10556
11/04/2022, 4:09 PMincalculable-hydrogen-44003
11/04/2022, 4:09 PMPANTS_SHA=34c5cd8f22d9db60c4478824cbdc17932b15457c ./pants package src/cort/manage.py -- runserver 0.0.0.0:8000 --noreload
ancient-vegetable-10556
11/04/2022, 4:10 PMPANTS_SHA
goes and looks for a wheel that has been built in CI. 34c
did not have a wheel uploaded. I went back through commits in the 2.15.x branch, and this one has the fix available, and is ready to go: 217edbcdc37b3005abb96911f1e65a7d6b938669
incalculable-hydrogen-44003
11/04/2022, 4:14 PMA deprecated alias for `[python-repos].find_links`.
12:01:42.32 [ERROR] Invalid option 'tailor_ignore_solitary_init_files' under [python] in /home/sepehr500/Documents/starkblast/pants.toml
12:01:42.32 [ERROR] Invalid option 'inits' under [python-infer] in /home/sepehr500/Documents/starkblast/pants.toml
12:01:42.32 [ERROR] Invalid config entries detected. See log for details on which entries to update or remove.
(Specify --no-verify-config to disable this check.)
ancient-vegetable-10556
11/04/2022, 4:16 PMincalculable-hydrogen-44003
11/04/2022, 4:16 PMenvironment=
issue?ancient-vegetable-10556
11/04/2022, 4:19 PM--no-verify-config
to switch off the errors. There may be a way to adjust your config to silence those errors, but --no-verify-config
is at least a starting pointwitty-crayon-22786
11/04/2022, 4:19 PMincalculable-hydrogen-44003
11/04/2022, 4:21 PM2.15.0a0
and got nvalid option 'tailor_ignore_solitary_init_files'
witty-crayon-22786
11/04/2022, 4:24 PMincalculable-hydrogen-44003
11/04/2022, 4:24 PMwitty-crayon-22786
11/04/2022, 4:24 PMincalculable-hydrogen-44003
11/04/2022, 4:26 PMInvalid option 'inits'
witty-crayon-22786
11/04/2022, 4:26 PMincalculable-hydrogen-44003
11/04/2022, 4:26 PMwitty-crayon-22786
11/04/2022, 4:26 PMincalculable-hydrogen-44003
11/04/2022, 6:30 PM[Errno 2] No such file or directory: '/tmp/pants-sandbox-hFwPns/.tmp/pex-pip-log.ck6i41a7/pip.log'
on the sha 217edbcdc37b3005abb96911f1e65a7d6b938669
witty-crayon-22786
11/04/2022, 6:34 PMincalculable-hydrogen-44003
11/04/2022, 6:34 PM