-
-
Notifications
You must be signed in to change notification settings - Fork 782
Fix and consolidate generation of st2.conf.sample #5710
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix, good catch! 👍
| INIT_COMMENT = """ | ||
| # Sample config which contains all the available options which the corresponding descriptions | ||
| # Note: This file is automatically generated using tools/config_gen.py - DO NOT UPDATE MANUALLY | ||
| """.strip() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's definitely much better place for the config autogenerated note 👍
e960375 to
85827b2
Compare
85827b2 to
06da276
Compare
06da276 to
cf94559
Compare
cf94559 to
1fa58ca
Compare
nzlosh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Background
I'm working towards introducing
pants. One of the first things we will use it for is linting / reformatting (it will run black, flake8, etc). Updating sample conf must happen whenever the source python files change. Pants will know which file changes require regenerating the sample conf, so it is advantageous to let it handle that. So, we'll hook that up so pants runs it when it runs fmt and other tools.Overview
Pants will not use the Makefile to generate
st2.conf.sample, it will usetools/config_gen.pydirectly. So, this moves a header comment from the Makefile intotools/config_gen.py, with the rest of the generation logic.It also fixes a long standing issue where our
st2.conf.samplefile was actually invalid.[sensorcontainer].partition_providershould not have a python dict literal, but that's how it got serialized. It should have space separtedkey:valuepairs forpartition_providerconfig. So, this also adjusttools/config_gen.pyto fix that issue.