Page MenuHomePhabricator

Script to migrate current GrowthExperiments config schemas into new structure
Closed, ResolvedPublic5 Estimated Story Points

Description

Since Growth team has decided to split the current configuration in Special:EditGrowthConfig into (4) themed editor pages we will need to create valid json configuration pages for these based on the existing values on each wiki. This task is to create an script that facilitates that work.

Acceptance criteria
The script should:

  • Copy all the existing configuration options located in MediaWiki:NewcomerTasks.json into MediaWiki:GrowthExperimentsSuggestedEdits.json
  • Copy the existing GEInfoboxTemplates located in MediaWiki:GrowthExperimentsConfig.json to MediaWiki:GrowthExperimentsSuggestedEdits.json
  • Copy the homepage related configurations from MediaWiki:GrowthExperimentsConfig.json to MediaWiki:GrowthExperimentsHomepage.json
  • Copy the help panel related configurations from MediaWiki:GrowthExperimentsConfig.json to MediaWiki:GrowthExperimentsHelpPanel.json
  • Copy the mentorship related configurations from MediaWiki:GrowthExperimentsConfig.json to MediaWiki:GrowthExperimentsMentorship.json

Open questions

  • Another wrinkle found while analyzing current EditGrowthConfig data schemas is that some information is captured with unconventional controls. An example of this are the radio buttons used for capturing Are mentorship features enabled? which are mapped to a boolean data type while the conventional control for boolean is a checkbox. Maybe this data migration and others can be considered while developing this script.
    • No data migration is required within this script. All data will be displayed with the conventional default control.
  • Do we need to preserve the history or relate the old and new pages in some way?

Related Objects

Event Timeline

Sgs triaged this task as Medium priority.Mar 19 2024, 2:07 PM
KStoller-WMF set the point value for this task to 5.Mar 19 2024, 2:33 PM
Sgs raised the priority of this task from Medium to High.Apr 29 2024, 7:52 AM
Sgs updated the task description. (Show Details)

Change #1029167 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] [WIP] Config: add maintenance script to migrate to CC2.0

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

We definitely should migrate the actually stored on-wiki config into the new format. This should be handled as part of T359038: Script to migrate current GrowthExperiments config schemas into new structure (or possibly, a follow-up task to that one, as the description states no data migration should happen). Then, when reading the configuration, we would need to convert the new configuration format into the old one, so that reads would work intact.

My initial thought was to check for config data validity against the provided schemas within the script, but according to your comment I understand you are suggesting to skip validity? I think the description note No data migration is required within this script. All data will be displayed with the conventional default control. was written without accounting for this particular problem. What do you think? Should we skip validity checks or solve first T364053 in a way it does not produce validation errors? cc @Urbanecm_WMF

I was not suggesting to skip validation; I was just confused, as the description mentioned "no data migration". Transferring the data into the valid format makes sense to me.

I was not suggesting to skip validation; I was just confused, as the description mentioned "no data migration". Transferring the data into the valid format makes sense to me.

Indeed, I wrote that note update optimistically. The script takes in account the GrowthExperiments provider special casings, that includes computed properties, data transforms and override hyphened top level properties.

Any thoughts about the open question Do we need to preserve the history or relate the old and new pages in some way?

Change #1035473 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[operations/mediawiki-config@master] [GrowthExperiments] Disable personalized praise in eswiki labs

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

Change #1029167 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Config: add maintenance script to migrate to CC2.0

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

Change #1038817 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] Config: display a custom message on validation errors

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

Change #1038817 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Config: display a custom message on validation errors

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

Script was tested during the beta/testwiki rollout, it works fine.