A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mediawiki.org/wiki/Special:MyLanguage/Writing_an_extension_for_deployment below:

Writing an extension for deployment

This page documents the steps needed for a maintainer or code steward of a MediaWiki extension to get that extension through the review process before the extension is possibly deployed to Wikimedia wikis. Anything that is deployed on Wikimedia servers needs to be reviewed for security and scalability issues. Where the word "extension" appears below, "skin" or "code" is synonymous.

Writing an extension for deployment can be a time-consuming project; any interested party is encouraged to start the process long before any deadline.

You can see the list of all extensions awaiting review.

Once an extension has made it through reviews, then the extension can be scheduled for deployment by the Wikimedia Foundation Release Manager.

General prerequisites and expectations[edit]

Follow the general guidelines and recommendations on writing extensions. Read Coding conventions, Pre-commit checklist, Performance guidelines, and Security for developers and make sure that your code follows these guidelines.

Once above steps are done, consider getting community support for your idea:

If you have followed the advice above and the feedback given by early reviewers closely, you should have less problems with the next steps.

Preparing for deployment[edit]
  1. Create a production deployment tracking task within Phabricator (in the #Wikimedia-Extension-setup and #Wikimedia-Extension-Review-Queue projects) to get an extension into the review queue. This task should only concern deployment itself. Any issues which block deployment should be separate subtasks (listed under "Task Graph") that block this parent task.
  2. Your deployment tracking bug should point to on-wiki community consensus (and/or community support/desire) for having the extension installed on a particular wiki, if applicable.
  3. Request and incorporate feedback from the following reviews. These can be included as a "checklist" within the production deployment tracking task's description, (e.g. phab:T190716) or as substasks of the production deployment tracking task. Also note that not every review listed below is a hard requirement for production deployment and that there is no specific order of reviews which need be followed.
  4. Request deployment to the Beta Cluster . See #Deploy to Beta Cluster below for more information. While it is strongly recommended to have a security readiness review performed prior to beta cluster deployment, the timing of various project milestones and the nature of the project itself may not accommodate this. In this case, it is best to discuss any proposed beta cluster deployments with the Security Team outside of any requested reviews. Having a proper, long-term maintenance plan for the code base that does not rely on individual volunteers has often been a blocker for passing the application security review.[2]
  5. Make sure the extension is automatically branched by make-wmf-branch.
  6. Request a date/time for deployment in the deployment tracking task to get it added to the deployment calendar.

This list outlines a broad procedure to follow, including requirements that should be met, but it does not amount to a "process". In particular, the activity of shipping a new extension into production does not have a WMF owner, which can make it tricky to find reviews for related patches. In case of issues, it is recommended to find people (see Gerrit/Code review/Getting reviews#Add reviewers ). Developers are advised that simply opening Phabricator tasks and waiting for someone to pay attention to them is unlikely to be sufficient. See Martin Urbanec's explanation at phab:T61245#9152895.

Before enabling a new extension in production, it must be tested on the Beta Cluster. Here are the steps required to deploy and enable a new extension on Beta. (If your extension has more steps/dependencies, say Wikibase, make sure to check with someone before you deploy.)

  1. Add the new extension submodule to the git mediawiki/extensions repo if it's not already in it. See example. This will result in the code being deployed (unused) to the Beta Cluster.
  2. Move your extension's CI config to the "Wikimedia production" section, add the "in-wikimedia-production" job template, and make sure it has and passes all the expected jobs for production code. See example.
  3. Add your extension to the json make-wmf-branch release tool at least two weeks prior to your target date for enabling on the Beta Cluster. It will add the extension as a submodule of mediawiki/core when the weekly deploy branch is cut, and the code will be deployed (unused) to production (see explanation in the next step). See example.
  4. Add your extension to extension-list. See example. This requires that the code be present on every branch running in production, since extension-list is used to build the CDB database for i18n files in both Beta and production.[3]
  5. Add your extension config variable to InitialiseSettings.php and set it to be default false. See example.
  6. Add your extension config variable (same as in previous step) to InitialiseSettings-labs.php and set it to be true on Beta Cluster wikis you want it to be on. You may want to turn it off for loginwiki (which doesn't have most extensions). See example.
  7. Load your extension in CommonSettings-labs.php. See example.

The Beta Cluster uses the same wmf-config directory in the operations/mediawiki-config repository as production, but in addition Beta Cluster servers load InitialiseSettings-labs.php and CommonSettings-labs.php files so you can have settings that only apply to Beta Cluster. Read more about these config files). When testing on Beta Cluster before production, these can override wmgUseMyExtension, setting it to true on one or more Beta Cluster wikis. (Once your extension is in use in the production wiki(s) corresponding to Beta Cluster, you can probably remove the -labs.php overrides.)

The Beta Cluster runs code from the master branch in Git. You should merge code into the master branch early and often in order to exercise that code as fully as possible on the Beta Cluster before it goes out to the general public. If you have specific questions about using the Beta Cluster, you can e-mail the Quality Assurance mailing list or ask in #wikimedia-releng connect on IRC .

Skins follow the same process (but in mediawiki/skins) repository.

Roan Kattouw's presentation on security.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4