Create reverse migration script for Gadgets 2.0
Closed, ResolvedPublic8 Estimated Story Points

Description

If converting to Gadgets 2.0 goes awry and we have to switch everything back, we'll need a reverse migration script that formats the gadgets back to 1.0.

See https://gerrit.wikimedia.org/r/#/c/247869/ for existing Gadgets 2.0 code.

Event Timeline

There is already a forward migration script, FYI: migrateGadgets.php.

DannyH set the point value for this task to 8.

Change 981622 had a related patch set uploaded (by Krinkle; author: SD0001):

[mediawiki/extensions/Gadgets@master] Introduce MultiGadgetRepo to facilitate repo migration

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

Change 981622 merged by jenkins-bot:

[mediawiki/extensions/Gadgets@master] Introduce MultiGadgetRepo to facilitate repo migration

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

Krinkle claimed this task.
Krinkle subscribed.

With MultiGadgetRepo, adoption will be gradual with users having full autonomy at the individual gadget level. This means adopting a JSON gadget is as easy as creating the appropiate page (JSON will have precedence over the entry from the legacy definition page). And switching back would involve deleting or moving said page, or changing its content model, so as to not be loaded.

I imagine in most cases, people will choose not to eagerly delete the old definition, so that should naturally offer an easy way back.