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

Filter out irrelevant env vars in OptionsBootstrapper #7312

Conversation

Projects
None yet
5 participants
@stuhood
Copy link
Member

commented Mar 5, 2019

Problem

The OptionsBootstrapper holds the env/args/config that can eventually be fully parsed into an Options object that can be consumed by the rest of pants.

Options parsing only consumes env vars that start with PANTS_, but the OptionsBootstrapper currently captures the entire env. This can make the OptionsBootstrapper unnecessarily large (and its __str__ unwieldy).

Solution

Filter env vars recorded in the OptionsBootstrapper to only those starting with PANTS_.

@stuhood stuhood force-pushed the twitter:stuhood/smaller-env-in-options-bootstrapper branch from 82c1353 to 23bc948 Mar 5, 2019

@stuhood stuhood changed the title WIP: Filter env vars in OptionsBootstrapper Filter out irrelevant env vars in OptionsBootstrapper Mar 5, 2019

@stuhood stuhood requested review from ity, benjyw and cosmicexplorer Mar 5, 2019

@ity

ity approved these changes Mar 5, 2019

Copy link
Contributor

left a comment

looks good- thanks!

@benjyw

benjyw approved these changes Mar 5, 2019

Copy link
Contributor

left a comment

Nice!

@cosmicexplorer
Copy link
Contributor

left a comment

This should have been done a while ago, great change.

@stuhood stuhood merged commit 4436b7e into pantsbuild:master Mar 5, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@stuhood stuhood deleted the twitter:stuhood/smaller-env-in-options-bootstrapper branch Mar 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.