henrikingo opened a new issue, #82:
URL: https://github.com/apache/otava/issues/82
Note that this is a generalisation of #65 .
If a user, particularly a new user, has not created a configuration file for
otava, they will default to reading the one supplied in
`otava/resources/otava.yml`.
That file uses some kind of template variables (jinja2?), such as
${GRAFANA_ADDRESS}. This allows the user to define these values as environment
variables and have them interpolated into the yaml file eventually. However,
this has the unintended consequence that all of the variables in this default
yaml file are now required.
**Workaround** : Just supply dummy values in the corresponding environment
variables. Or, create your own otava.yaml file with minimal configuration. In
that case the default file will never be read and this problem is avoided.
(This is the common path.)
**Proposed solution**: IMO mixing environment variables into the yaml file
configuration is the problem here. The correct way to support environment
variables in my opinion is to read them and the yaml options separately, then
merge them in some well defined priority order.
My personal preference would be to user
[ConfigArgParse](https://pypi.org/project/ConfigArgParse/) and support all
options in the same library. (CLI options, yaml file,
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]