Page MenuHomePhabricator

TypeError: MediaWiki\Extension\MetricsPlatform\UserSplitter\UserSplitterInstrumentation::isSampled(): Argument #2 ($buckets) must be of type array, null given, called in /srv/mediawiki/php-1.44.0-wmf.23/extensions/MetricsPlatfo
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   TypeError: MediaWiki\Extension\MetricsPlatform\UserSplitter\UserSplitterInstrumentation::isSampled(): Argument #2 ($buckets) must be of type array, null given, called in /srv/mediawiki/php-1.44.0-wmf.23/extensions/MetricsPlatfo
FrameLocationCall
from/srv/mediawiki/php-1.44.0-wmf.23/extensions/MetricsPlatform/includes/UserSplitter/UserSplitterInstrumentation.php(53)
#0/srv/mediawiki/php-1.44.0-wmf.23/extensions/MetricsPlatform/includes/ExperimentManager.php(156)MediaWiki\Extension\MetricsPlatform\UserSplitter\UserSplitterInstrumentation->isSampled(float, null, float)
#1/srv/mediawiki/php-1.44.0-wmf.23/extensions/MetricsPlatform/includes/Hooks.php(142)MediaWiki\Extension\MetricsPlatform\ExperimentManager->enrollUser(MediaWiki\User\User, MediaWiki\Request\WebRequest)
#2/srv/mediawiki/php-1.44.0-wmf.23/includes/HookContainer/HookContainer.php(155)MediaWiki\Extension\MetricsPlatform\Hooks->onBeforePageDisplay(MediaWiki\Output\OutputPage, MediaWiki\Skins\Vector\SkinVector22)
#3/srv/mediawiki/php-1.44.0-wmf.23/includes/HookContainer/HookRunner.php(994)MediaWiki\HookContainer\HookContainer->run(string, array, array)
#4/srv/mediawiki/php-1.44.0-wmf.23/includes/Output/OutputPage.php(3276)MediaWiki\HookContainer\HookRunner->onBeforePageDisplay(MediaWiki\Output\OutputPage, MediaWiki\Skins\Vector\SkinVector22)
#5/srv/mediawiki/php-1.44.0-wmf.23/includes/actions/ActionEntryPoint.php(160)MediaWiki\Output\OutputPage->output(bool)
#6/srv/mediawiki/php-1.44.0-wmf.23/includes/MediaWikiEntryPoint.php(202)MediaWiki\Actions\ActionEntryPoint->execute()
#7/srv/mediawiki/php-1.44.0-wmf.23/index.php(58)MediaWiki\MediaWikiEntryPoint->run()
#8/srv/mediawiki/w/index.php(3)require(string)
#9{main}
Impact
Notes

Details

Request URL
https://test.wikipedia.org/wiki/Special:RestSandbox
Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Workaround for mpic to work with groupsrepos/data-engineering/test-kitchen!165sfacigroups-workaroundmain
Customize query in GitLab

Event Timeline

Michael triaged this task as Unbreak Now! priority.
Jdforrester-WMF subscribed.

Note that RestSandbox was only just enabled in production yesterday – https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/1131384 — but was already live on testwiki, where this error occurred. CCing the MW Interfaces team.

Change #1133111 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[operations/deployment-charts@master] xLab: : Deploying to staging and production

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

Change #1133111 merged by jenkins-bot:

[operations/deployment-charts@master] xLab: : Deploying to staging and production

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

Michael lowered the priority of this task from Unbreak Now! to Needs Triage.Apr 1 2025, 12:13 PM

Testwiki seems to be fixed, and so I would assume that this is no longer blocking the train. I'll leave it to the metrics platform team to close this task as per their processes.

(Is there a documented overall process that I should be aware of for how to close train blocking production errors?)

cjming claimed this task.

This was an error on our part - while we pushed code to the xLab application to pre-empt sending null groups in the api response, the simpler fix would have been to disable an active experiment on prod that mistakenly got left enabled (which we also took care of - disabled the experiment that should not have been active).

For posterity: The change that disabled the MetricsPlatform extension behaviour that was triggering the error was https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/1133124, which was during the UTC afternoon backport window (see https://schedule-deployment.toolforge.org/window/1743512400).