You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Difference between revisions of "Wikimedia site requests"

From Wikitech-static
Jump to navigation Jump to search
imported>Alex Monk
 
imported>Quiddity
(fix normal->medium)
 
(26 intermediate revisions by 19 users not shown)
Line 1: Line 1:
Wikimedia site requests are requests to configure a Wikimedia project. This page gives an overview of the process for volunteers handling them, and other concerned parties from operations side.
Wikimedia site requests are requests to configure a Wikimedia project. This page gives an overview of the process for volunteers handling them, and other concerned parties from operations side.  
 
If you do not want to contribute technically, follow [[meta:Requesting wiki configuration changes]] instead.
 
If you want to contribute technically, then this is a good way to get familiar and start contributing to software changes. You need [[mw:How to become a MediaWiki hacker#PHP|very basic knowledge of PHP]] and follow [[mw:Gerrit/Tutorial]] to create your first software change (a so-called "[[:w:en:Patch (computing)|patch]]"). When you work on these types of tasks you can also look at previous similar software changes. Often you do not even have to have too much understanding of what is going on exactly. But still you can get familiar with code and especially processes!


== Lifecycle of a request ==
== Lifecycle of a request ==
A request generally follows this workflow:
A request generally follows this workflow:
#  The local project discuss the matter, in the manner the most appropriated for this project.
#  The local project discusses the matter in public, in the manner the most appropriated for this project.
# A task is filled on Phabricator, in the [https://phabricator.wikimedia.org/project/board/178/query/open/ Wikimedia-Site-requests project]. See [[meta:Requesting wiki configuration changes]].
# A task is filed on Phabricator, in the [[phab:project/board/178/query/open/|Wikimedia-Site-requests]] project (or [[phab:project/profile/188/|Wikimedia-Extension-setup]] if the change is about enabling an extension). See [[meta:Requesting wiki configuration changes]]. Please check [[m:Limits to configuration changes|Limits to configuration changes]] before.
# A volunteer writes a change to edit the relevant files in the [https://phabricator.wikimedia.org/diffusion/OMWC/ operations/mediawiki-config] repository.
# A volunteer writes a software change (patch) to change the relevant files in the [[phab:diffusion/OMWC/|operations/mediawiki-config]] code repository, as we do not directly edit the code that is running live on the servers. Then the volunteer proposes this patch in [[mw:Gerrit/Tutorial|Gerrit]] for review. (If the volunteers follow [[mw:Gerrit/Commit message guidelines|Gerrit/Commit message guidelines]], then the Phabricator task will automatically get updated about their patch in Gerrit.)
# The same volunteer - or if reluctant/absent/busy, another volunteer - schedules it for [[SWAT deploys|SWAT deployment]] on the [[Deployments]] page.
# Another pair of eyes will [[mw:Gerrit/Code review/Getting reviews|review this patch in Gerrit]].
# The change is merged and [[How to deploy code|deployed]].
# If no reviewer sees a problem with the patch, then the same volunteer - or if reluctant/absent/busy, another volunteer - schedules it in a [[Backport windows|backport window]] on the [[Deployments]] page.
# In that backport window, the software change (patch) is merged via a deployer giving it a "Code-Review +2" review and [[How to deploy code|deployed on the Wikimedia servers]], usually within one week but [[Backport windows|sometimes also faster]]. Only after this step has happened, everybody who visits a Wikimedia server will see / experience that change.
 
== Prioritization ==


== Prioritisation ==
Requests are usually handled quickly. We can deploy (make the changes available on the servers) trivial changes three times per day between Monday and Thursday.
The requests are handled in a fast pace, using a one week cadence: we can deploy them twice per week between Monday and Thursday. There is no formal sprint.


{| class="wikitable"
{| class="wikitable"
Line 16: Line 22:
! Priority on Phabricator !! Description
! Priority on Phabricator !! Description
|-
|-
| Unbreak now! || The change breaks normal production. You want a deployment right now or in the next hours. That also means you consider this task requests we set other requests aside.
| Unbreak now! || The change fixes a problem that must be fixed immediately. You want a deployment right now or in the next hours. That also means you think that your request is more important and urgent than any other requests.
|-
|-
| High || The change is needed very soon, ideally in the next SWAT, or if not possible, this SWAT week (Monday-Thursday).
| High || The change is needed very soon, ideally in the next backport window, or if not possible, this week (Monday-Thursday).
|-
|-
| Normal || The change is helpful, we can do it this SWAT week or the next (so in max. 7-10 days). This is the priority assigned to most simple tasks.
| Medium || The change is helpful, we can do it this week or the next (so in max. 7-10 days). This is the priority assigned to most simple tasks.
|-
|-
| Low || The change isn't needed before two weeks.
| Low || The change isn't needed before two weeks.
Line 26: Line 32:
| Lowest || The change can take as long as needed, or there is nothing actionable before a long time.
| Lowest || The change can take as long as needed, or there is nothing actionable before a long time.
|}
|}
== Common tasks ==
=== Disable throttling of account creations for an IP at events ===
Often requested by editors who are hosting an [[:en:wp:editathon|edit-a-thon]], account creation throttle exception are one of the most common tasks which Wikimedia site requests deals with. Such requests should follow [[meta:Mass account creation#Requesting temporary lift of IP cap]].
* Make your changes in the file <code>wmf-config/throttle.php</code> in the repository <code>operations/mediawiki-config</code>
#*<code>from</code> UTC date/time of exception start
#*<code>to</code> UTC date/time of exception end
#*<code>range</code> [[:en:CIDR|IP range(s)]] the exception applies to
#*<code>dbname</code> wiki(s) this exception applies to
* Past example: https://gerrit.wikimedia.org/r/#/c/267186/
<pre>$wmgThrottlingExceptions[] = [ // T184579
'from' => '2018-01-11T09:00 +5:30',
'to' => '2018-01-11T18:00 +5:30',
'range' => [ '103.8.192.54', '186.67.125.0/24' ],
'dbname' => [ 'enwiki', 'mrwiki' ],
'value' => 45 // 35 expected
];</pre>
=== Change the logo of a Wikimedia wiki ===
Please follow the instructions in [[git:operations/mediawiki-config/+/refs/heads/master/logos/|the logos directory of operations/mediawiki-config]] for converting a Commons SVG into the correctly compressed PNGs and updating the PHP files.
*'''Note''': the [[Backport windows|Backport window policy]] requires to have the change in <code>static/images/project-logos</code> in a separate commit than the change in <code>wmf-config/InitialiseSettings.php</code> and having those two patches dependent on each other, in the correct order: See [[mw:Gerrit/Advanced usage#Create a dependency]]
* Past examples: https://gerrit.wikimedia.org/r/#/c/operations/mediawiki-config/+/353012/ https://gerrit.wikimedia.org/r/#/c/operations/mediawiki-config/+/368444/ https://gerrit.wikimedia.org/r/#/c/operations/mediawiki-config/+/423497/
<code>'avwiki' => '/static/images/project-logos/avwiki.png', // See T48589</code>
=== Add a custom namespace ===
* Add the new namespace under <code>wgExtraNamespaces</code> in the file <code>wmf-config/InitialiseSettings.php</code> in the repository <code>operations/mediawiki-config</code>. In the namespace name, make sure to replace spaces (<code> </code>) with underscores (<code>_</code>).
* Past examples: [[phab:T221697]] and https://gerrit.wikimedia.org/r/#/c/operations/mediawiki-config/+/506134/
* After the change has been deployed (merged), run <code>namespaceDupes.php</code> to ensure no page will be left unaccessible.
* Documentation: [[:mw:Manual:Using custom namespaces]]
=== Change a namespace ===
* Make your changes in the file <code>wmf-config/InitialiseSettings.php</code> in the repository <code>operations/mediawiki-config</code>
* If necessary, also alias old names under <code>wgNamespaceAliases</code> in the file <code>wmf-config/InitialiseSettings.php</code> in the repository <code>operations/mediawiki-config</code>
* Past example: [[phab:T202347]] and https://gerrit.wikimedia.org/r/#/c/operations/mediawiki-config/+/454213/
* After config change, <code>namespaceDupes.php</code> maintenance script
=== Change the translation of a namespace ===
* Namespace localization must happen in the extension that the namespace belongs to.
* Namespace localization can require separate patches in some repositories. See e.g.
** https://gerrit.wikimedia.org/r/#/c/348112/ in MediaWiki Core.
** https://gerrit.wikimedia.org/r/#/c/348114/ in Gadgets extension.
** https://gerrit.wikimedia.org/r/#/c/348113/ in Scribunto extension (for 'Module:`)
* To deploy a custom namespace only on Wikimedia sites (and not in the MediaWiki software for everybody), the file to change is <code>wmf-config/InitialiseSettings.php</code> in the repository <code>operations/mediawiki-config</code>. This file also allows you to change project namespace (<code>wgMetaNamespace</code>).
=== Change the linktrail ===
* Make your changes to <code>$linkTrail</code> in the corresponding messages file for that language code in the directory <code>languages/messages/</code> in the repository <code>mediawiki/core</code>. You will need some [[:w:en:Regular expression|regex]] knowledge for this.
* Past examples: https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/423523/ https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/384755/
=== Update the interwiki cache ===
* Process: Run <code>extensions/WikimediaMaintenance/dumpInterwiki.php</code> script. Then upload the resulting file as a proposed patch to Gerrit.
* Past example: https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/520159/
* Also see [[Update the interwiki cache]]
=== Change local group rights ===
* Change/define the group's right under <code>GroupOverrides</code> in the file <code>wmf-config/InitialiseSettings.php</code> in the repository <code>operations/mediawiki-config</code>
* Change who can grant the group using <code>(Add|Remove)Groups(Self)</code>, otherwise, only the stewards will be able to grant/remove it.
=== Change user groups and restriction levels ===
* Make your changes under <code>wgRestrictionLevels</code> in the file <code>wmf-config/InitialiseSettings.php</code> in the repository <code>operations/mediawiki-config</code>
* Past examples: [[phab:T225896]] and its patch in https://gerrit.wikimedia.org/r/#/c/operations/mediawiki-config/+/517371/
=== Enable or disable extensions on a wiki ===
* Check first that the request followed [[meta:Requesting wiki configuration changes]], that a link to a community consensus is present, that the request is not against [[meta:Limits to configuration changes]], and that the requested extension has a [[mw:Developers/Maintainers|maintainer/steward]]
* Check that the extension is already deployed on Wikimedia servers in https://phabricator.wikimedia.org/diffusion/MREL/browse/master/make-release/settings.yaml and https://phabricator.wikimedia.org/source/mediawiki-config/browse/master/wmf-config/extension-list. If the extension is not already deployed, then the request is blocked and the extension must first go through [[mw:Review queue]]!
* Make your changes in the file <code>wmf-config/InitialiseSettings.php</code> in the repository <code>operations/mediawiki-config</code>: There must be an array called <code>wmgUseNameOfTheExtension</code> (replace <code>NameOfTheExtension</code> accordingly) and a line <code>'nameOfTheWikiDatabase' => true</code> or <code>false</code>.
* Past examples: [[phab:T230390]] and https://gerrit.wikimedia.org/r/#/c/operations/mediawiki-config/+/530381/
=== Change import sources ===
* Make your changes to <code>wgImportSources</code> in the file <code>wmf-config/InitialiseSettings.php</code> in the repository <code>operations/mediawiki-config</code>
* Past examples: [[phab:T217104]] and https://gerrit.wikimedia.org/r/#/c/492942/ ; [[phab:T228607]] and https://gerrit.wikimedia.org/r/#/c/operations/mediawiki-config/+/527229/
=== Add a website to CopyUploadsDomains (e.g. for [[:mw:Extension:GWToolset|GWToolset]]) ===
* Make your changes in the file <code>wmf-config/InitialiseSettings.php</code> in the repository <code>operations/mediawiki-config</code>
* <code>wgCopyUploadsDomains</code>, almost always for Wikimedia Commons (commonswiki)
* Past examples: [[phab:T225917]] and its patch in https://gerrit.wikimedia.org/r/#/c/518278/ ; [[phab:T225852]] and its patch in https://gerrit.wikimedia.org/r/#/c/operations/mediawiki-config/+/517170/
=== Convert digits (numbers) into a different script ===
* Make your changes to <code>$digitTransformTable</code> in the corresponding messages file for that language code in the directory <code>languages/messages/</code> in the repository <code>mediawiki/core</code>
* Past example: [[phab:T212221]] and its patch in https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/480589/
=== Remove a namespace from being indexed by internet search engines ===
* For example, when a community does not want User pages to be indexed by Yandex or Google.
* Make your changes in the file <code>wmf-config/InitialiseSettings.php</code> in the repository <code>operations/mediawiki-config</code>
* Past example: [[phab:T245787]] and https://gerrit.wikimedia.org/r/#/c/operations/mediawiki-config/+/573761/
=== Change the default timezone for a wiki ===
* Make your changes in the section <code>wgLocaltimezone</code> in the file <code>wmf-config/InitialiseSettings.php</code> in the repository <code>operations/mediawiki-config</code>
* Past example: [[phab:T255531]] and https://gerrit.wikimedia.org/r/#/c/operations/mediawiki-config/+/606075/
=== Add additional letters to the special characters toolbar ===
* Make your changes in the file <code>/resources/src/mediawiki.language/specialcharacters.json</code> in the repository <code>mediawiki/core</code>
* Past example: [[phab:T185918]] and https://gerrit.wikimedia.org/r/c/mediawiki/core/+/406829/
=== Add a wiki to a dblist ===
See [[Configuration files#dblists]].
=== Areas in the MediaWiki code base itself ===
These tasks are about the general MediaWiki code base itself, and not about the configuration of MediaWiki on Wikimedia servers like the tasks above.
==== Replacing deprecated functions ====
These functions could be found by [[:mw:Continuous integration/Phan|phan checks]] or a good [[:w:en:Integrated development environment|IDE]] with static analytic code checks.
* Past examples: https://gerrit.wikimedia.org/r/529092/ ; https://gerrit.wikimedia.org/r/520719/
==== Upgrading dev libraries ====
This is sometimes done by a bot, but that is not always and not everywhere the case.
* Past examples: https://gerrit.wikimedia.org/r/523697/
==== Alphabetize stuff ====
* Past examples: https://gerrit.wikimedia.org/r/523215/
== Useful links ==
* Current configuration settings for each Wikimedia wiki: https://noc.wikimedia.org/conf/InitialiseSettings.php.txt
* Current configuration settings shared for all Wikimedia wikis: https://noc.wikimedia.org/conf/CommonSettings.php.txt
* [[Configuration files]] - A general `about our configuration files` page
* [[How to deploy code]]
* [[:c:File:Improving MediaWiki what to do, when you're new.pdf]]

Latest revision as of 23:00, 28 November 2021

Wikimedia site requests are requests to configure a Wikimedia project. This page gives an overview of the process for volunteers handling them, and other concerned parties from operations side.

If you do not want to contribute technically, follow meta:Requesting wiki configuration changes instead.

If you want to contribute technically, then this is a good way to get familiar and start contributing to software changes. You need very basic knowledge of PHP and follow mw:Gerrit/Tutorial to create your first software change (a so-called "patch"). When you work on these types of tasks you can also look at previous similar software changes. Often you do not even have to have too much understanding of what is going on exactly. But still you can get familiar with code and especially processes!

Lifecycle of a request

A request generally follows this workflow:

  1. The local project discusses the matter in public, in the manner the most appropriated for this project.
  2. A task is filed on Phabricator, in the Wikimedia-Site-requests project (or Wikimedia-Extension-setup if the change is about enabling an extension). See meta:Requesting wiki configuration changes. Please check Limits to configuration changes before.
  3. A volunteer writes a software change (patch) to change the relevant files in the operations/mediawiki-config code repository, as we do not directly edit the code that is running live on the servers. Then the volunteer proposes this patch in Gerrit for review. (If the volunteers follow Gerrit/Commit message guidelines, then the Phabricator task will automatically get updated about their patch in Gerrit.)
  4. Another pair of eyes will review this patch in Gerrit.
  5. If no reviewer sees a problem with the patch, then the same volunteer - or if reluctant/absent/busy, another volunteer - schedules it in a backport window on the Deployments page.
  6. In that backport window, the software change (patch) is merged via a deployer giving it a "Code-Review +2" review and deployed on the Wikimedia servers, usually within one week but sometimes also faster. Only after this step has happened, everybody who visits a Wikimedia server will see / experience that change.

Prioritization

Requests are usually handled quickly. We can deploy (make the changes available on the servers) trivial changes three times per day between Monday and Thursday.

Priority on Phabricator Description
Unbreak now! The change fixes a problem that must be fixed immediately. You want a deployment right now or in the next hours. That also means you think that your request is more important and urgent than any other requests.
High The change is needed very soon, ideally in the next backport window, or if not possible, this week (Monday-Thursday).
Medium The change is helpful, we can do it this week or the next (so in max. 7-10 days). This is the priority assigned to most simple tasks.
Low The change isn't needed before two weeks.
Lowest The change can take as long as needed, or there is nothing actionable before a long time.

Common tasks

Disable throttling of account creations for an IP at events

Often requested by editors who are hosting an edit-a-thon, account creation throttle exception are one of the most common tasks which Wikimedia site requests deals with. Such requests should follow meta:Mass account creation#Requesting temporary lift of IP cap.

  • Make your changes in the file wmf-config/throttle.php in the repository operations/mediawiki-config
    • from UTC date/time of exception start
    • to UTC date/time of exception end
    • range IP range(s) the exception applies to
    • dbname wiki(s) this exception applies to
$wmgThrottlingExceptions[] = [ // T184579
	'from' => '2018-01-11T09:00 +5:30',
	'to' => '2018-01-11T18:00 +5:30',
	'range' => [ '103.8.192.54', '186.67.125.0/24' ],
	'dbname' => [ 'enwiki', 'mrwiki' ],
	'value' => 45 // 35 expected
];

Change the logo of a Wikimedia wiki

Please follow the instructions in the logos directory of operations/mediawiki-config for converting a Commons SVG into the correctly compressed PNGs and updating the PHP files.

'avwiki' => '/static/images/project-logos/avwiki.png', // See T48589

Add a custom namespace

Change a namespace

  • Make your changes in the file wmf-config/InitialiseSettings.php in the repository operations/mediawiki-config
  • If necessary, also alias old names under wgNamespaceAliases in the file wmf-config/InitialiseSettings.php in the repository operations/mediawiki-config
  • Past example: phab:T202347 and https://gerrit.wikimedia.org/r/#/c/operations/mediawiki-config/+/454213/
  • After config change, namespaceDupes.php maintenance script

Change the translation of a namespace

  • Namespace localization must happen in the extension that the namespace belongs to.
  • Namespace localization can require separate patches in some repositories. See e.g.
  • To deploy a custom namespace only on Wikimedia sites (and not in the MediaWiki software for everybody), the file to change is wmf-config/InitialiseSettings.php in the repository operations/mediawiki-config. This file also allows you to change project namespace (wgMetaNamespace).

Change the linktrail

Update the interwiki cache

Change local group rights

  • Change/define the group's right under GroupOverrides in the file wmf-config/InitialiseSettings.php in the repository operations/mediawiki-config
  • Change who can grant the group using (Add|Remove)Groups(Self), otherwise, only the stewards will be able to grant/remove it.

Change user groups and restriction levels

Enable or disable extensions on a wiki

Change import sources

Add a website to CopyUploadsDomains (e.g. for GWToolset)

Convert digits (numbers) into a different script

Remove a namespace from being indexed by internet search engines

Change the default timezone for a wiki

Add additional letters to the special characters toolbar

Add a wiki to a dblist

See Configuration files#dblists.

Areas in the MediaWiki code base itself

These tasks are about the general MediaWiki code base itself, and not about the configuration of MediaWiki on Wikimedia servers like the tasks above.

Replacing deprecated functions

These functions could be found by phan checks or a good IDE with static analytic code checks.

Upgrading dev libraries

This is sometimes done by a bot, but that is not always and not everywhere the case.

Alphabetize stuff

Useful links