Page MenuHomePhabricator

Growth KPI Grafana dashboard claims no A/B testing happens at pilot wikis
Open, HighPublicBUG REPORT

Description

According to the Growth KPI Grafana dashboard, no A/B testing is currently happening at arwiki/eswiki/frwiki/cswiki. This does not match the reality, see P71060 for cswiki queries. This task tracks fixing the charts to match reality.

Original description

Originally reported as WMF Slack post by @Michael.

According to the Growth KPI Grafana dashboard for enwiki (screenshot below), the control variant is not assigned to any newcomers at enwiki:

image.png (580×788 px, 88 KB)

This is not expected. The control variant should be assigned to 100% of enwiki newcomers. Due to the T379681: community-updates-module variant is assigned outside of Growth pilot wikis bug, the split is currently 50/50, but even in that case, the dashboard has no reason to show zeros here.

Here is a tabular view:

image.png (504×3 px, 112 KB)

image.png (1×3 px, 177 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Sgs asked me how did I assert the distribution is working. I selected few random users at https://en.wikipedia.org/wiki/Special:Log/newusers and called UserOptionsManager::getOption() on them in a shell.php session. I saw both variants, so I concluded the charts are wrong and distribution is correct"working as configured".

Here is a copy from my shell.php session (paste protected to WMF-NDA, as it contains private data):

{P71031}

I re-did my tests with more users, still seem to be working as configured:

{P71032}

@Sgs and me debugged this today. The issue is that by the time the instrumentation runs (the $this->perDbNameStatsdDataFactory->increment( 'GrowthExperiments.UserVariant.' . $variant ) call), CentralAuth does not have an ID available yet. This means we are consistently hashing a zero (the placeholder ID), and receiving a consistent variant. The ID is assigned in CentralAuth's UserCreationHookHandler::onLocalUserCreated, so it may run before or after our hook (the order is not guaranteed). As such, the ID may be missing (but doesn't need to). This does not impact the evaluation of the variant, because that runs much later in the process (after onLocalUserCreated), and the CentralAuth ID is definitely assigned by then.

@Sgs and I agreed on resolving this by creating a deferred update. That should ensure we have central ID available, and should still run before data are passed over to statsd. Assigning to @Sgs based on that.

@Sgs and I agreed on resolving this by creating a deferred update. That should ensure we have central ID available, and should still run before data are passed over to statsd. Assigning to @Sgs based on that.

Working on it, thanks for the summary

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

[mediawiki/extensions/GrowthExperiments@master] HomepageHooks: run metrics increment in deferred update

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

Change #1090884 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] HomepageHooks: run metrics increment in deferred update

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

Urbanecm_WMF changed the subtype of this task from "Task" to "Bug Report".
Urbanecm_WMF moved this task from Code Review to QA on the Growth-Team (Current Sprint) board.

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

[mediawiki/extensions/GrowthExperiments@wmf/1.44.0-wmf.3] HomepageHooks: run metrics increment in deferred update

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

Change #1091231 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.44.0-wmf.3] HomepageHooks: run metrics increment in deferred update

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

Mentioned in SAL (#wikimedia-operations) [2024-11-14T14:55:25Z] <sgimeno@deploy2002> Started scap sync-world: Backport for [[gerrit:1091231|HomepageHooks: run metrics increment in deferred update (T379682)]]

Mentioned in SAL (#wikimedia-operations) [2024-11-14T14:59:21Z] <sgimeno@deploy2002> sgimeno: Backport for [[gerrit:1091231|HomepageHooks: run metrics increment in deferred update (T379682)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-11-14T15:06:41Z] <sgimeno@deploy2002> Finished scap sync-world: Backport for [[gerrit:1091231|HomepageHooks: run metrics increment in deferred update (T379682)]] (duration: 11m 15s)

Change #1091303 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] Log an error when central user ID cannot be retrieved

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

Change #1091303 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Log an error when central user ID cannot be retrieved

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

I looked at variants for cswiki:

{P71060}

Seems the charts are still wrong.

Caused loads of error logs. Filed as a train blocker T380271.

Urbanecm_WMF renamed this task from Growth KPI Grafana dashboard claims control is not assigned to any users at enwiki to Growth KPI Grafana dashboard claims no A/B testing happens at pilot wikis.Tue, Nov 19, 4:58 PM
Urbanecm_WMF updated the task description. (Show Details)

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

[mediawiki/extensions/GrowthExperiments@master] ExperimentUserDefaultsManager: use read latest when retrieving central id

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

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

[mediawiki/extensions/GrowthExperiments@master] ExperimentsHooks: avoid computing a bucket for non-registered

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

Change #1092881 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] ExperimentUserDefaultsManager: use read latest when retrieving central id

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

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

[mediawiki/extensions/GrowthExperiments@wmf/1.44.0-wmf.4] ExperimentUserDefaultsManager: use read latest when retrieving central id

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

Change #1093889 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.44.0-wmf.4] ExperimentUserDefaultsManager: use read latest when retrieving central id

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

Mentioned in SAL (#wikimedia-operations) [2024-11-21T14:35:39Z] <sgimeno@deploy2002> Started scap sync-world: Backport for [[gerrit:1093889|ExperimentUserDefaultsManager: use read latest when retrieving central id (T379682)]]

Mentioned in SAL (#wikimedia-operations) [2024-11-21T14:41:14Z] <sgimeno@deploy2002> sgimeno: Backport for [[gerrit:1093889|ExperimentUserDefaultsManager: use read latest when retrieving central id (T379682)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Change #1092886 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] ExperimentsHooks: avoid computing a bucket for non-registered

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

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

[mediawiki/extensions/GrowthExperiments@master] Revert "ExperimentUserDefaultsManager: use read latest when retrieving central id"

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

Change #1093933 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Revert "ExperimentUserDefaultsManager: use read latest when retrieving central id"

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