Page MenuHomePhabricator

Setup A/B test requirement for Zebra
Closed, ResolvedPublic5 Estimated Story Points

Description

An instrumentation spec is being developed for the Zebra design as part of T333222. Since this is an A/B test for logged in users, it will require some newly built scaffolding on the backend.

We'll need a new Feature requirement e.g. UserABTestRequirement();

TODO

  • Make a generic feature requirement that can read the VectorWebABTestEnrollment configuration variable. The constructor should have a name.
  • The requirement isMet method should return false, if the A/B test is disabled.
  • The requirement isMet method should return true, if the A/B test is enabled and the user is in the sample.
  • The sampling rate should be based on the ID of the current user.
  • Review https://docs.google.com/spreadsheets/d/1-23KnYroBHELliUhZ9sMSlvqfqwtmRuVjmB7oPt269Y/edit#gid=0 and ensure every field is instrumented. If not, create follow-up ticket for instrumentation (or add as part of this ticket)

QA

Using https://patchdemo.wmflabs.org/wikis/f6677dd84f/wiki/Main_Page verify that for 50% of users the class vector-feature-zebra-design-enabled is on the HTML tag and for 50% of users the vector-feature-zebra-design-disabled class is on the HTML tag. You will need to inspect the HTML of the page to confirm this.

Sign off steps

Create a ticket with clear documentation on howthe A/B test can be enabled in future.

Event Timeline

ovasileva set the point value for this task to 5.Mar 30 2023, 5:11 PM

Change 907902 had a related patch set uploaded (by Kimberly Sarabia; author: Kimberly Sarabia):

[operations/mediawiki-config@master] Set up A/B test reqiurement for Zebra

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

KSarabia-WMF claimed this task.
KSarabia-WMF subscribed.

Change 907993 had a related patch set uploaded (by Kimberly Sarabia; author: Kimberly Sarabia):

[mediawiki/skins/Vector@master] Add Vector Zebra Design A/B Test

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

Change 907993 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Add Vector Zebra Design A/B Test

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

Per my code review notes, this needs more work as currently the A/B test will not be applied consistently across projects e.g. if a user switches from French Wikipedia to English Wikipedia they might be re-bucketed. This can be fixed by using the central user ID rather than the local user id.

Change 910102 had a related patch set uploaded (by Kimberly Sarabia; author: Kimberly Sarabia):

[mediawiki/skins/Vector@master] Follow up service wiring update

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

Test wiki created on Patch demo by Jdlrobson using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/f0ba955f86/w

Test wiki on Patch demo by Jdlrobson using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/f0ba955f86/w/

Change 910102 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Follow up service wiring update

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

Jdlrobson updated Other Assignee, added: KSarabia-WMF; removed: Jdrewniak.
Edtadros subscribed.

Test Result - Beta

Status: ✅ PASS
Environment: beta, patchdemo
OS: macOS Ventura
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: Using https://patchdemo.wmflabs.org/wikis/f6677dd84f/wiki/Main_Page verify that for 50% of users the class vector-feature-zebra-design-enabled is on the HTML tag and for 50% of users the vector-feature-zebra-design-disabled class is on the HTML tag. You will need to inspect the HTML of the page to confirm this.

Screenshot 2023-04-20 at 7.40.40 PM.png (1×1 px, 310 KB)
Screenshot 2023-04-20 at 7.39.30 PM.png (1×1 px, 320 KB)

✅ AC2: On beta cluster (Where A/B test is disabled) there should be a vector-feature-zebra-design-disabled class on the HTML tag.

Screenshot 2023-04-20 at 7.43.59 PM.png (1×1 px, 350 KB)

✅ AC3: On https://patchdemo.wmflabs.org/wikis/f6677dd84f/wiki/Main_Page when logged out there should be a vector-feature-zebra-design-disabled class on the HTML tag.

Screenshot 2023-04-20 at 7.28.27 PM.png (1×1 px, 230 KB)

Change 907902 abandoned by Kimberly Sarabia:

[operations/mediawiki-config@master] Set up A/B test reqiurement for Zebra

Reason:

Abandoning draft

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