Page MenuHomePhabricator

Community configuration: Create a maintenance script for configuration changes
Closed, ResolvedPublic8 Estimated Story Points

Description

Community configuration 2.0 moves MediaWiki configuration to be on-wiki. From time to time, the Foundation (generically: the site operator) needs to perform a configuration change on one or more wikis. Rather than using a personal wiki account to do such a change, there should be a maintenance script that supports this sort of change. As an example, see maintenance/changeWikiConfig.php in GrowthExperiments.

This script is also useful in case of site-reliability issues caused by CommunityConfiguration (so that there is a way to edit the config, independent of the web UI).

Acceptance Criteria
  • A maintenance script exists that allows sysadmins to change community configuration-handled values. This script allows to replace a certain store in bulk, or to manipulate with individual variables only.
  • The maintenance script is usable even when the currently-stored configuration is not valid, or when attempts to retrieve the configuration result in a fatal crash.
Open Questions
  • Should the script avoid using the CommunityConfiguration services as they could be unusable in a breakage situation? (from T365243)

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
KStoller-WMF moved this task from Inbox to Backlog on the Growth-Team board.
Sgs set the point value for this task to 8.May 28 2024, 4:36 PM
KStoller-WMF raised the priority of this task from Medium to High.Jul 24 2024, 9:13 PM
Michael moved this task from Incoming to Code Review on the Growth-Team (FY2024-25 Q1 Sprint 5) board.

Note to self: Add capability to delete specific key from all elements of an array which contains objects. Specific use-case: removing the id key from help panel links.

Change #1064361 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/CommunityConfiguration@master] Add maint script to change existing configuration

https://gerrit.wikimedia.org/r/1064361

Per @Michael's request, I did a high-level review of the patch above. I left comments on Gerrit; please do feel free to move back to CR once another review is needed (or if you need any clarification from my end).

Change #1075950 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/CommunityConfigurationExample@master] Add example array containing links to pages

https://gerrit.wikimedia.org/r/1075950

I think this is now ready for code-review, I just added the dry-run option as a last change, which I think this script should have.

In code review, I'd be especially curious about further test-cases that we should cover.

Change #1075950 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfigurationExample@master] Add example array containing links to pages

https://gerrit.wikimedia.org/r/1075950

Change #1064361 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@master] Add maint script to change existing configuration

https://gerrit.wikimedia.org/r/1064361

I think this is done. And since this is a maintenance script that is being run on-demand, I don't see how it can be tested by QA. There is a follow-up task T371678: Allow sysadmins to make an empty edit to a configuration provider, the output of which we may can get QA opinion on.

Please reopen this task if you think there is still something that needs doing.

Change #1080825 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/CommunityConfiguration@master] tests: ensure maintenance base class has always been requierd

https://gerrit.wikimedia.org/r/1080825

Change #1080828 had a related patch set uploaded (by C. Scott Ananian; author: Michael Große):

[mediawiki/extensions/CommunityConfiguration@wmf/1.43.0-wmf.27] tests: ensure maintenance base class has always been requierd

https://gerrit.wikimedia.org/r/1080828

Change #1080825 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@master] tests: ensure maintenance base class has always been requierd

https://gerrit.wikimedia.org/r/1080825

Change #1080828 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@wmf/1.43.0-wmf.27] tests: ensure maintenance base class has always been requierd

https://gerrit.wikimedia.org/r/1080828

Mentioned in SAL (#wikimedia-operations) [2024-10-17T13:27:14Z] <urbanecm@deploy2002> Started scap sync-world: Backport for [[gerrit:1080805|Set $wgAllowRawHtmlCopyrightMessages = false (T375789)]], [[gerrit:1080828|tests: ensure maintenance base class has always been requierd (T377391 T357535)]]

Mentioned in SAL (#wikimedia-operations) [2024-10-17T13:29:28Z] <urbanecm@deploy2002> cscott, urbanecm, matmarex: Backport for [[gerrit:1080805|Set $wgAllowRawHtmlCopyrightMessages = false (T375789)]], [[gerrit:1080828|tests: ensure maintenance base class has always been requierd (T377391 T357535)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-10-17T13:35:22Z] <urbanecm@deploy2002> Finished scap sync-world: Backport for [[gerrit:1080805|Set $wgAllowRawHtmlCopyrightMessages = false (T375789)]], [[gerrit:1080828|tests: ensure maintenance base class has always been requierd (T377391 T357535)]] (duration: 08m 07s)