You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org
GrowthExperiments setup: Difference between revisions
imported>Gergő Tisza |
imported>Gergő Tisza No edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Note|content=If something goes wrong, [[GrowthExperiments setup/Old]] has the old, manual instructions.}} | |||
This is a documentation for developers for adding [[mw:Growth|Growth features]] to a Wikimedia wiki. For requesting these features as a community member, see [[mw:Growth/Communities/Get the Growth experiments on your wiki]] instead. | This is a documentation for developers for adding [[mw:Growth|Growth features]] to a Wikimedia wiki. For requesting these features as a community member, see [[mw:Growth/Communities/Get the Growth experiments on your wiki]] instead. | ||
== Preparation == | == Preparation == | ||
Add special page aliases for the new language. (Example patch: {{gerrit|643084}} Note: do not include namespace names.) Unlike the other changes described here, this is deployed via the [[Deployments/Train|train]] so it's worth doing ''ahead of the rest''. This is an i18n change so if you need to backport it, you have to use [[Scap#scap%20sync-world|scap sync-world]]. | |||
Add | |||
This can be omitted if needed. | This can be omitted if needed. | ||
== | == Dark mode deployment == | ||
Growth features are usually first deployed in so-called dark mode | |||
In addition to <code>wmgUseGrowthExperiments</code>, you need to add the wiki to the growthexperiments [[Configuration_files#dblists|dblist]] by adding <code>growthexperiments</code> to the <code>inheritsFrom</code> list in <code>wmf-config/config/{wiki id}.yaml</code> | === Prepare patches === | ||
In <code>wmf-config/InitialiseSettings.php</code> (can be found in <code>operations/mediawiki-config</code> repository), you will need to enable <code>wmgUseGrowthExperiments</code>. In addition to <code>wmgUseGrowthExperiments</code>, you need to add the wiki to the growthexperiments [[Configuration_files#dblists|dblist]] by adding <code>growthexperiments</code> to the <code>inheritsFrom</code> list in <code>wmf-config/config/{wiki id}.yaml</code> same repo (run <code>composer buildDBLists</code> to update <code>dblists/growthexperiments.dblist</code>). | |||
You also need to set <code>wmgGEFeaturesMayBeAvailableToNewcomers</code> to <code>false</code> to ensure features are not available to newcomers yet. | |||
This part can be done ahead of actual deployment, and does not require any permissions apart from having a developer account. Rest of the instructions require deployment access. | |||
=== Deployment === | === Deployment === | ||
Deploy the | It is recommended to proceed only if you are comfortable with editing on-wiki config files (for that, +staff or similar access is needed), if necessary. If everything goes all right, it should not be needed, but the need might arise. | ||
Usually, the deployment is done as part of a [[backport window]] (without booking a dedicated window) – the scripts should not be time consuming. | |||
# Run <code>mwscript extensions/WikimediaMaintenance/createExtensionTables.php --wiki='''XX'''wiki GrowthExperiments</code>. This is '''important''', as it will create necessary database tables. <code>!log</code> the table creation. | |||
# Merge the prepared configuration patch and fetch it to the deployment server. | |||
# ssh to maintenance server and pull the patch there via <code>scap pull</code>. | |||
# Initialize the on-wiki config via running <code>mwscript extensions/GrowthExperiments/maintenance/initWikiConfig.php --wiki='''xx'''wiki --phab=T'''xxxxx'''</code> | |||
# Go to https://xx.wikipedia.org/wiki/MediaWiki:GrowthExperimentsConfig.json and https://xx.wikipedia.org/wiki/MediaWiki:NewcomerTasks.json and verify the configuration looks fine. | |||
# Deploy the patch using instructions at [[Backport windows/Deployers]]. | |||
=== Verification === | |||
To ensure the features work, go to the wiki, enable newcomer dashboard and editor help panel in your preferences and go to Special:Homepage. You can also see the number of tasks available at https://xx.wikipedia.org/wiki/Special:NewcomerTaskInfo. | |||
# Test by enabling ''User profile > Display newcomer homepage'' and ''Editing > Enable the editor help panel'' in Special:Preferences, visiting Special:ClaimMentee (this will validate the mentor page as a side effect), visiting Special:Homepage, and clicking on a suggested task to bring up the help panel in suggested editing mode. | # Test by enabling ''User profile > Display newcomer homepage'' and ''Editing > Enable the editor help panel'' in Special:Preferences, visiting Special:ClaimMentee (this will validate the mentor page as a side effect), visiting Special:Homepage, and clicking on a suggested task to bring up the help panel in suggested editing mode. | ||
#Check that there are enough tasks, by | #Check that there are enough tasks, by going to https://xx.wikipedia.org/wiki/Special:NewcomerTaskInfo. It's especially important for the <code>copyedit</code> and <code>links</code> task types to have some tasks for each topic. | ||
#*Ideally, we would check whether there are enough tasks before deployment, but we don't have the tooling for that yet | #*Ideally, we would check whether there are enough tasks before deployment, but we don't have the tooling for that yet. | ||
== See also == | |||
* [[Add Link]] | |||
* [[Add Image]] | |||
[[Category:How-To]] | [[Category:How-To]] |
Latest revision as of 07:07, 19 February 2022
![]() | If something goes wrong, GrowthExperiments setup/Old has the old, manual instructions. |
This is a documentation for developers for adding Growth features to a Wikimedia wiki. For requesting these features as a community member, see mw:Growth/Communities/Get the Growth experiments on your wiki instead.
Preparation
Add special page aliases for the new language. (Example patch: 643084 Note: do not include namespace names.) Unlike the other changes described here, this is deployed via the train so it's worth doing ahead of the rest. This is an i18n change so if you need to backport it, you have to use scap sync-world.
This can be omitted if needed.
Dark mode deployment
Growth features are usually first deployed in so-called dark mode
Prepare patches
In wmf-config/InitialiseSettings.php
(can be found in operations/mediawiki-config
repository), you will need to enable wmgUseGrowthExperiments
. In addition to wmgUseGrowthExperiments
, you need to add the wiki to the growthexperiments dblist by adding growthexperiments
to the inheritsFrom
list in wmf-config/config/{wiki id}.yaml
same repo (run composer buildDBLists
to update dblists/growthexperiments.dblist
).
You also need to set wmgGEFeaturesMayBeAvailableToNewcomers
to false
to ensure features are not available to newcomers yet.
This part can be done ahead of actual deployment, and does not require any permissions apart from having a developer account. Rest of the instructions require deployment access.
Deployment
It is recommended to proceed only if you are comfortable with editing on-wiki config files (for that, +staff or similar access is needed), if necessary. If everything goes all right, it should not be needed, but the need might arise.
Usually, the deployment is done as part of a backport window (without booking a dedicated window) – the scripts should not be time consuming.
- Run
mwscript extensions/WikimediaMaintenance/createExtensionTables.php --wiki=XXwiki GrowthExperiments
. This is important, as it will create necessary database tables.!log
the table creation. - Merge the prepared configuration patch and fetch it to the deployment server.
- ssh to maintenance server and pull the patch there via
scap pull
. - Initialize the on-wiki config via running
mwscript extensions/GrowthExperiments/maintenance/initWikiConfig.php --wiki=xxwiki --phab=Txxxxx
- Go to https://xx.wikipedia.org/wiki/MediaWiki:GrowthExperimentsConfig.json and https://xx.wikipedia.org/wiki/MediaWiki:NewcomerTasks.json and verify the configuration looks fine.
- Deploy the patch using instructions at Backport windows/Deployers.
Verification
To ensure the features work, go to the wiki, enable newcomer dashboard and editor help panel in your preferences and go to Special:Homepage. You can also see the number of tasks available at https://xx.wikipedia.org/wiki/Special:NewcomerTaskInfo.
- Test by enabling User profile > Display newcomer homepage and Editing > Enable the editor help panel in Special:Preferences, visiting Special:ClaimMentee (this will validate the mentor page as a side effect), visiting Special:Homepage, and clicking on a suggested task to bring up the help panel in suggested editing mode.
- Check that there are enough tasks, by going to https://xx.wikipedia.org/wiki/Special:NewcomerTaskInfo. It's especially important for the
copyedit
andlinks
task types to have some tasks for each topic.- Ideally, we would check whether there are enough tasks before deployment, but we don't have the tooling for that yet.