When the new Vector skin is enabled, we have added code to make sure end users continue to get their preferred skins. This will allow us to remove the skin version code as we will no longer need to map old preferences to new preferences. This also means we can refactor the existing Vector code safely, separating legacy and modern more distinctly.
Previously the choice of Vector mode was made by consulting the user VectorSkinVersion preference
Now the choice of Vector is made by consulting the user VectorSkinVersion preference and the skin preference.
The switch means that many users will have database rows like so:
| skin | VectorSkinVersion
| vector | 2 |
These must all be replaced by
| skin | VectorSkinVersion
| vector-2012 | 2 |
These rows will only be corrected whenever a user saves a preference.
We may need to consider writing a script to fix these, or deciding it's not important to fix.
# TODO
[] How many rows are impacted? (run a query a week after change)
[] Should we write a script to migrate these rows, or simply revert these users back to legacy Vector for manual correction?
[] Document on the team page how to do these sorts of migrations.
# Sign off steps
[] Create task detailing what we need to do next
[] Close out the epic
[] Create new EPIC task for removing skin version code from Vector.
# Developer notes
To check rows impacted, you'll need to ssh into one of the replicas (listed at https://wikitech.wikimedia.org/wiki/Analytics/Systems/MariaDB) and run a database query on the preferences table.
# Migrate script
Here is an example of a maintenance script that migrates preferences:
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/MediaSearch/+/refs/changes/53/752653/3/maintenance/MigrateSearchPagePrefs.php?autodive=0
We'll need to write our own.
Executing the script would need to happen in a special deploy (out of scope for this ticket).