CommunityConfiguration needs to be able to shut itself down if required (Emergency Shutdown mode). This is done by short-circuiting CommunityConfiguration logic, returning default values from all providers, rather than querying the configuration store and checking what the real value is. Unfortunately, there is no single default value to return, as it depends on the type and semantics of each configuration option. Fortunately, providers have a schema associated, which specifies default values for each of the values, which can be used during Emergency Shutdown.
During Emergency Shutdown, the schema itself cannot be safely accessed (it is only accessible well after a significant portion of of CommunityConfiguration already runs). For this reason, there will be a defaults file generated for each provider, which will include values to return during Emergency Shutdown. This defaults file will meet the following requirements:
- formatted as a PHP file, containing an array,
stored within the client extension's repository (location defined as an attribute in extension.json, defaulting to CommunityConfigurationFallbacks, relative to extension's root directory),stored in CommunityConfigurationFallbacks relative to the extension's root directory; making this configurable was scoped out to T376985,- named after the respective provider, in order to guarantee a predictable name that is computable when Emergency Shutdown is in effect,
- managed via a maintenance script provided by CommunityConfiguration; this maintenance script would query the schemas and update all necessary default files
Creation of the maintenance script is the scope of this task. For more details about the requirements above, please see T367516#10116543.