temporal
temporal copied to clipboard
Simple configuration structure
Is your feature request related to a problem? Please describe.
The current server configuration takes a directory and an environment name, supports merging multiple files and requires separate files for static and dynamic config.
This complexity hurts the developer experience and is the reason we don't expose server configuration in the Temporal CLI.
Describe the solution you'd like
Come up with a clean config structure that can be contained in a single file.
Additional context
Extra care should be taken if we migrate to a new format to avoid breaking existing users.
Straw-man proposal for dynamic config part:
- Assume that static config has been collapsed to only use one file (I'm not proposing details for that part).
- If the static config file contains a top-level key
dynamicConfig, then the value of that key is used exactly the same way the dynamic config file is used now, including reloading on change. (Of course, changes to any other keys in the file will not take effect without restart.) - If the config also has a value for
dynamicConfigClient.filepath, then an error is raised on startup. - The value of
dynamicConfigClient.pollIntervalis still respected. - Currently
dynamicConfigClient.pollIntervalis required, with a minimum of 5s. This would be changed so it's not required anymore, defaults to infinite (do not reload), same minimum.
Overall SGTM. I'd maybe just call the top level key dynamic because you're already in the context of config but that's mostly nitpicking.