temporal icon indicating copy to clipboard operation
temporal copied to clipboard

Simple configuration structure

Open bergundy opened this issue 1 year ago • 2 comments

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.

bergundy avatar Sep 26 '24 00:09 bergundy

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.pollInterval is still respected.
  • Currently dynamicConfigClient.pollInterval is required, with a minimum of 5s. This would be changed so it's not required anymore, defaults to infinite (do not reload), same minimum.

dnr avatar Sep 26 '24 21:09 dnr

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.

bergundy avatar Sep 27 '24 15:09 bergundy