Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't filter the env passed to OptionsBootstrapper. #20956

Merged
merged 5 commits into from
May 27, 2024

Conversation

benjyw
Copy link
Contributor

@benjyw benjyw commented May 25, 2024

The native parser needs access to all env vars for interpolation,
so we can't filter down to just PANTS_*.

Once we're rid of the legacy parser and can simplify options bootstrapping,
we can revisit exactly how to do this, but for now we're OK with
OptionsBootstrapper holding more data than it strictly needs.

The native parser needs access to all env vars for
interpolation, so we can't filter down to just PANTS_*.

Once we're rid of the legacy parser and can simplify
options bootstrapping, we can revisit exactly how to
do this, but for now we're OK with OptionsBootstrapper
holding more data than it strictly needs.
@benjyw benjyw added the category:internal CI, fixes for not-yet-released features, etc. label May 25, 2024
@benjyw benjyw requested review from huonw and stuhood May 25, 2024 20:38
@benjyw
Copy link
Contributor Author

benjyw commented May 25, 2024

Note that the underlying issue is that native parser uses the env from OptionsBootstrapper for interpolation, whereas the legacy parser parses Config before OptionsBootstrapper is even created.

@benjyw
Copy link
Contributor Author

benjyw commented May 25, 2024

Fixes #20952

@kaos
Copy link
Member

kaos commented May 25, 2024

Fixes #20952

Hint: if you edit that comment into the PR description, GH will auto-close the issue when this gets merged.

Copy link
Contributor

@huonw huonw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

@benjyw
Copy link
Contributor Author

benjyw commented May 26, 2024

On second thoughts, instead of skipping the test I'll make it test the new behavior, so we know if that gets reverted (and to force us to fix the test if/when we do revert it).

@benjyw benjyw merged commit 57a230c into pantsbuild:main May 27, 2024
25 checks passed
@benjyw benjyw deleted the no_env_filter branch May 27, 2024 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:internal CI, fixes for not-yet-released features, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants