-
Notifications
You must be signed in to change notification settings - Fork 93
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
Simplify the fedmsg configuration #425
Comments
Do note that this is going to impact quite some apps, in our control and out of it |
It'll be backwards compatible and people will have plenty of time to migrate |
i like the fact that configuration is in separate files. that allows distribution (rpm) package provide default config. and less pain for sysadmins to merge huge config when some new component is added (distro package with it's own config). |
That's a good point. Perhaps a better scheme would be: If a file is specified on the CLI, use that (and only that) configuration. Otherwise, load all configuration from /etc/fedmsg/conf.d/. If there are duplicate keys in any of the files, report it as an error to the user. |
This is up for discussion, but I'd like to propose that we start migrating to a simpler configuration format. I think we can do this in a backwards-compatible way (where we support both the new and old method and eventually remove the old method).
What I'd like is:
Use the TOML format loaded with pytoml
Load from ~/.config/fedmsg/config.toml. If it's not present, load from /etc/fedmsg/config.toml. Don't do any fancy merging. Allow for configuration to be specified via the CLI as well, which takes precedence over both those locations.
Configuration is lazy-loaded and not actually read until the configuration dictionary is actually accessed.
Ensure all the defaults are user-friendly and not Fedora-specific.
To use the configuration you just do
We can support the old configuration loading (with deprecation warnings) for a while yet and then drop it when the world is ready for the future.
The text was updated successfully, but these errors were encountered: