Page MenuHomePhabricator

Create sync-config subcommand
Open, LowPublic

Description

Running a sync-dir to deploy a configuration change that includes introducing a new $wmg* variable is not generally a good idea. Scap actually tries very hard since T60618: [scap] Touch InitialiseSettings.php if syncing to bust any local cache of initialiseSettings data, but as your recent experience shows this does not always work. The safe way to introduce a configuration change which adds a new $wmg* variable is to split it into two patches, one that adds the new variable in InitialiseSettings.php and a second which uses that variable in CommonSettings.php.

We could add a new special sync-config command that is tuned just for syncing the wmf-config directory which enforces this best practice by running rsync twice: once with CommonSetttings excluded and once just for CommonSettings. That command would probably require a similar level of socialization as the knowledge of this particular quirk of the wmf-config system, but we could also make sync-dir abort with a custom error message if asked to sync the wmf-config directory.