cool-easter-32542
05/23/2024, 10:36 PMpants.ci.toml that looks like this:
[python-repos]
indexes.add = [
"<https://aws:%(env.CODEARTIFACT_AUTH_TOKEN)s@mydomain-myaccountid.d.codeartifact.us-east-2.amazonaws.com/pypi/pypi-internal/simple/>"
]
This is used to connect to AWS CodeArtifact and download some private dependencies from there. It works fine in Pants 2.22.0.dev1, but breaks in 2.22.0.dev2 with the following error + stack trace:
Traceback (most recent call last):
File "/home/runner/.cache/nce/ab1acf935c4cc43338c604ae7d0f6aa2419f2415d94eb9cae381601dbba70a61/bindings/venvs/2.22.0.dev2/bin/pants", line 19, in <module>
sys.exit(entry_point())
File "/home/runner/.cache/nce/ab1acf935c4cc43338c604ae7d0f6aa2419f2415d94eb9cae381601dbba70a61/bindings/venvs/2.22.0.dev2/lib/python3.9/site-packages/pants/bin/pants_loader.py", line 112, in main
PantsLoader.main()
File "/home/runner/.cache/nce/ab1acf935c4cc43338c604ae7d0f6aa2419f2415d94eb9cae381601dbba70a61/bindings/venvs/2.22.0.dev2/lib/python3.9/site-packages/pants/bin/pants_loader.py", line 108, in main
cls.run_default_entrypoint()
File "/home/runner/.cache/nce/ab1acf935c4cc43338c604ae7d0f6aa2419f2415d94eb9cae381601dbba70a61/bindings/venvs/2.22.0.dev2/lib/python3.9/site-packages/pants/bin/pants_loader.py", line 91, in run_default_entrypoint
exit_code = runner.run(start_time)
File "/home/runner/.cache/nce/ab1acf935c4cc43338c604ae7d0f6aa2419f2415d94eb9cae381601dbba70a61/bindings/venvs/2.22.0.dev2/lib/python3.9/site-packages/pants/bin/pants_runner.py", line 76, in run
bootstrap_options = options_bootstrapper.bootstrap_options
File "/home/runner/.cache/nce/ab1acf935c4cc43338c604ae7d0f6aa2419f2415d94eb9cae381601dbba70a61/bindings/venvs/2.22.0.dev2/lib/python3.9/site-packages/pants/util/memo.py", line 1[23](<https://github.com/researchrabbit/six-degrees-backend/actions/runs/9215571975/job/25354208128#step:13:24>), in memoize
result = func(*args, **kwargs)
File "/home/runner/.cache/nce/ab1acf935c4cc43338c604ae7d0f6aa2419f2415d94eb9cae381601dbba70a61/bindings/venvs/2.22.0.dev2/lib/python3.9/site-packages/pants/option/options_bootstrapper.py", line 236, in bootstrap_options
return self.parse_bootstrap_options(self.env, self.bootstrap_args, self.config)
File "/home/runner/.cache/nce/ab1acf935c4cc43338c604ae7d0f6aa[24](<https://github.com/researchrabbit/six-degrees-backend/actions/runs/9215571975/job/25354208128#step:13:25>)19f2415d94eb9cae381601dbba70a61/bindings/venvs/2.22.0.dev2/lib/python3.9/site-packages/pants/option/options_bootstrapper.py", line 95, in parse_bootstrap_options
bootstrap_options = Options.create(
File "/home/runner/.cache/nce/ab1acf935c4cc43338c604ae7d0f6aa2419f2415d94eb9cae381601dbba70a61/bindings/venvs/2.22.0.dev2/lib/python3.9/site-packages/pants/option/options.py", line 166, in create
native_parser = NativeOptionParser(args, env, config.sources(), allow_pantsrc=True)
File "/home/runner/.cache/nce/ab1acf935c4cc43338c604ae7d0f6aa2419f2415d94eb9cae381601dbba70a61/bindings/venvs/2.22.0.dev2/lib/python3.9/site-packages/pants/option/native_options.py", line 47, in __init__
self._native_parser = native_engine.PyOptionParser(
ValueError: Unknown value for placeholder `env.CODEARTIFACT_AUTH_TOKEN` in config file pants.ci.toml, section python-repos, key indexes
Pants version
Which version of Pants are you using?
2.22.0.dev2 - this regression was introduced between 2.22.0.dev1 and 2.22.0.dev2
OS
Are you encountering the bug on MacOS, Linux, or both?
Linux
Additional info
Add any other information about the problem here, such as attachments or links to gists, if relevant.
If I had to guess, the regression was probably introduced in this PR.
pantsbuild/pantscool-easter-32542
05/27/2024, 4:54 AM