-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Problem
Decision to introduce a new configuration option is always difficult. Several factors have to be taken into account, such as:
- semantics of the configuration option (ie. opt-in vs opt-out, boolean flag vs numeric)
- naming of the configuration option
- optionality
- default value
etc.
Ideally we should try to avoid introducing new configuration options if possible and provide software behaving "properly" without requiring any input from administrator/user. What "proper" means though is very often not obvious and depends on field experience.
Discussion in #4643 (comment) illustrates this pretty well: without the actual information from the field it is difficult to decide if we should introduce schema loading throttling configuration at all (and how it should look like).
Another good use case is feature flags. The discussion in #4236 (comment) is a good illustration of the need for feature flags. Adding enable_self_links configuration property (defaulting to false) is a problem right now because of future backward compatibility concerns. Gating it as an experimental config option would allow us to experiment with self links and gather information about the needs of the users.
Solution
Introduce a concept of experimental config options and experimental-config-options configuration option (yeah, I know :) ) containing an explicit list of experimental option names used in configuration.
Experimental config option can appear and disappear at any time (even in minor releases). Providing of experimental config option value would give an error if the option's name is not provided in experimental-config-options property.
The idea is to allow experimenting with new configuration options making sure users consciously and explicitly opt-in to configure them. That way we don't have to pay that much attention to long term backward compatibility when trying new config options. It should also allow us to gather information about feasibility of the options: removal of widely used experimental option would cause feedback (ie. Github issues) that we could treat as a signal to make such option non-experimental.