Growth/Community configuration

Community Configuration is a scaling project of the Growth team. Up until now, any time communities wanted to change how the features the Growth team maintains behave (for instance, move the help desk, change the links included in the, or enable ), they had to create a Phabricator task and ask us to make the change for them.

Since the Growth features require many configuration options to be filled, this doesn't scale when deploying to many wikis. It also means we don't need to provide a "one size fits all" feature – wikis can customize it according to their preferences and needs.

To make sure configuration can be only changed by trusted community members, we decided that only administrators can use this feature.

Current status
TODO

Included configuration variables
It doesn't make to let communities manage all configuration variable. For instance, we don't want to let communities change which database cluster is used by the features.

As part of T275086, we decided on a list of configuration variables that we want to manage on-wiki. We put the list of variables in a spreadsheet (Google Spreadsheets).

Implementation
The configuration is stored in a JSON page in the MediaWiki: namespace, with a custom form created over it. Because reading config from the database can be expensive, the configuration is cached for a day, and the cache is purged on any edit (including null edits).

In order to let non-tech savvy community members to manage the configuration as well, we created a custom form over the JSON blob with the configuration itself. That way, community members don't need to know how to edit JSON in order to change the configuration, while keeping the configuration stored in a format that's easily understandable by machines.