Page MenuHomePhabricator

VectorPrefDiffInstrumentation should work for skin changes
Closed, ResolvedPublic3 Estimated Story Points

Description

Currently the VectorPrefDiffInstrumentation instrumentation checks for changes to the skinVersion key when the current skin is the skin key vector

With Vector being modelled as 2 separate skins, this logic will also need to consider the case where the skin is changed (instead of the skin version preference)

QA

IF
I go to http://localhost:8888/wiki/Special:Preferences?useskin=vector-2022 and chose the legacy 2010 version of Vector and hit save
THEN
VectorPrefDiffInstrumentation should log that I am going from skin version latest to skin version legacy.

IF
I go to http://localhost:8888/wiki/Special:Preferences?useskin=vector-2022 and chose Monobook and hit save
THEN
VectorPrefDiffInstrumentation should not log.

IF
I go to http://localhost:8888/wiki/Special:Preferences?useskin=vector and chose Vector (2022 version) and hit save
THEN
VectorPrefDiffInstrumentation should log that I am going from skin version legacy to skin version latest.

IF I go to http://localhost:8888/wiki/Special:Preferences?useskin=vector and modify the "Use Legacy Vector" preference and hit save
THEN
VectorPrefDiffInstrumentation should log

Developer notes

The method VectorPrefDiffInstrumentation::createEventIfNecessary should be updated to always inspect the vector key. It should look for the following scenarios:

  • skin was "vector" before, now "vector-2022" then initial_state = 'vector1', final_state = 'vector2'
  • skin was "vector-2022" before, now "vector" then initial_state = 'vector2', final_state = 'vector1'

It should check this before checking the skin version field.

Note, we can drop any events for any preference changes that change both the skin and skin version keys in the same change. These should be impossible with the UI, so would indicate someone testing/hacking.

Event Timeline

Change 753594 had a related patch set uploaded (by Nray; author: Nray):

[mediawiki/extensions/WikimediaEvents@master] Add support for Vector2022 skin option to VectorPrefDiffInstrumentation

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

nray subscribed.

Change 753594 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] Add support for Vector2022 skin option to VectorPrefDiffInstrumentation

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

I am not seeing any validation errors show up so that's good.

I checked data for the month of January. Looking at mediawiki.org, itwiki and euwiki to check that there is nothing unusual in the groups over this week. Due to an issue with the instrumentation earlier in the month, I limited my data to after 20th.
I used this query:

select * from mediawiki_skin_diff WHERE year = 2022 AND month = 1
AND ((normalized_host.project_class = 'wikipedia' 
AND (normalized_host.project = 'eu' OR normalized_host.project = 'it' )) OR normalized_host.project_class = 'mediawiki' ) AND day > 20

Events of significance:
On 24th we enabled on eu.wiki
On 25th we enabled on it.wiki

Events are pretty low for these wikis, so can't glean too much from the data other than we're still logging data despite the transition.
Looks like there was a bit of a spike (if you can call it) around then which could relate to people (myself) testing it.

Screen Shot 2022-01-31 at 2.24.05 PM.png (750×1 px, 52 KB)

Will continue to monitor this table during the week as I roll out further.

Work sheet (WMF only): https://docs.google.com/spreadsheets/d/1yEI1qmIFjXKA0bed2gAwuO0IfnKVzxyYzm6USxzGhPY/edit#gid=0

This is working as evidenced by the 1000s of people that opted out due to T300757.