-
Notifications
You must be signed in to change notification settings - Fork 32
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
Fix config loading #334
Fix config loading #334
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.
I think this is okay but it would be good to get @istreeter's opinion as well since original design was his and there might be reason to use ConfigFactory.load
in there.
@@ -67,7 +67,7 @@ object ConfigParser { | |||
} | |||
|
|||
private def loadAll(config: TypesafeConfig): TypesafeConfig = | |||
namespaced(ConfigFactory.load(namespaced(config.withFallback(namespaced(ConfigFactory.load()))))) | |||
namespaced(config.withFallback(namespaced(ConfigFactory.load()))) |
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.
If you do it this way, then config precedence goes in this order:
- The config file
- System properties passed on the command line (e.g.
-Dcollector.port=8888
) - Application defaults
It is more common to have this kind of precedence:
- System properties
- The config file
- Application defaults.
All of our other applications have the extra ConfigFactory.load
so I would prefer to keep it if we can find a way.
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.
The reason for this change is that we observed that the config file was not overriding the default parameters. Do you know why ?
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.
f7bef4e
to
bf461b5
Compare
No description provided.