Page MenuHomePhabricator

PHP Warning: Undefined array key "user_identifier_type"
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
  • mwversion: 1.46.0-wmf.22
  • timestamp: 2026-03-31T07:35:05.945Z
  • phpversion: 8.3.30
  • reqId: 80fa7fa6-7abe-4eeb-ba40-9c54d8352690
  • Find reqId in Logstash
normalized_message
[{reqId}] {exception_url}   PHP Warning: Undefined array key "user_identifier_type"
FrameLocationCall
from/srv/mediawiki/php-1.46.0-wmf.22/extensions/TestKitchen/includes/Sdk/ExperimentManager.php(124)
#0/srv/mediawiki/php-1.46.0-wmf.22/extensions/TestKitchen/includes/Sdk/ExperimentManager.php(124)MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, int)
#1/srv/mediawiki/php-1.46.0-wmf.22/extensions/GrowthExperiments/includes/ExperimentTestKitchenManager.php(35)MediaWiki\Extension\TestKitchen\Sdk\ExperimentManager->getExperiment(string)
#2/srv/mediawiki/php-1.46.0-wmf.22/extensions/GrowthExperiments/includes/FeatureManager.php(65)GrowthExperiments\ExperimentTestKitchenManager->getAssignedGroup(string)
#3/srv/mediawiki/php-1.46.0-wmf.22/extensions/GrowthExperiments/includes/NewcomerTasks/NewcomerTasksUserOptionsLookup.php(133)GrowthExperiments\FeatureManager->shouldShowReviseToneTasksForUser(MediaWiki\User\User)
#4/srv/mediawiki/php-1.46.0-wmf.22/extensions/GrowthExperiments/includes/NewcomerTasks/NewcomerTasksUserOptionsLookup.php(178)GrowthExperiments\NewcomerTasks\NewcomerTasksUserOptionsLookup->areReviseToneRecommendationsEnabled(MediaWiki\User\User)
#5/srv/mediawiki/php-1.46.0-wmf.22/extensions/GrowthExperiments/includes/NewcomerTasks/NewcomerTasksUserOptionsLookup.php(200)GrowthExperiments\NewcomerTasks\NewcomerTasksUserOptionsLookup->getConversionMap(MediaWiki\User\User)
#6/srv/mediawiki/php-1.46.0-wmf.22/extensions/GrowthExperiments/includes/NewcomerTasks/TaskType/TaskTypeManager.php(106)GrowthExperiments\NewcomerTasks\NewcomerTasksUserOptionsLookup->convertTaskTypes(array, MediaWiki\User\User)
#7/srv/mediawiki/php-1.46.0-wmf.22/extensions/GrowthExperiments/includes/NewcomerTasks/TaskType/TaskTypeManager.php(52)GrowthExperiments\NewcomerTasks\TaskType\TaskTypeManager->loadTaskTypes(MediaWiki\User\User)
#8/srv/mediawiki/php-1.46.0-wmf.22/extensions/GrowthExperiments/includes/HomepageHooks.php(353)GrowthExperiments\NewcomerTasks\TaskType\TaskTypeManager->getTaskTypesForUser(MediaWiki\User\User)
#9/srv/mediawiki/php-1.46.0-wmf.22/includes/HookContainer/HookContainer.php(135)GrowthExperiments\HomepageHooks->onBeforePageDisplay(MediaWiki\Output\OutputPage, MediaWiki\Skins\Vector\SkinVector22)
#10/srv/mediawiki/php-1.46.0-wmf.22/includes/HookContainer/HookRunner.php(1022)MediaWiki\HookContainer\HookContainer->run(string, array, array)
#11/srv/mediawiki/php-1.46.0-wmf.22/includes/Output/OutputPage.php(3306)MediaWiki\HookContainer\HookRunner->onBeforePageDisplay(MediaWiki\Output\OutputPage, MediaWiki\Skins\Vector\SkinVector22)
#12/srv/mediawiki/php-1.46.0-wmf.22/includes/Actions/ActionEntryPoint.php(162)MediaWiki\Output\OutputPage->output(bool)
#13/srv/mediawiki/php-1.46.0-wmf.22/includes/MediaWikiEntryPoint.php(180)MediaWiki\Actions\ActionEntryPoint->execute()
#14/srv/mediawiki/php-1.46.0-wmf.22/index.php(44)MediaWiki\MediaWikiEntryPoint->run()
#15/srv/mediawiki/w/index.php(3)require(string)
#16{main}
Notes

Started already after deployment of 1.46.0-wmf.22 to test wikis during the train pre-sync.

Large volume, ~19k/h when including all the symptoms related errors: "user_identifier_type", "stream_name" and "contextual_attributes".

Needs to be addressed before moving to group0

Details

Request URL
https://test.wikipedia.org/wiki/Special:Contributions/Dimiork
Related Changes in Gerrit:

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
  • mwversion: 1.46.0-wmf.22
  • timestamp: 2026-03-31T07:50:02.298Z
  • phpversion: 8.3.30
  • reqId: 2d0e0e52-7f9c-4a9b-8e06-cca6d99b99b4
  • Find reqId in Logstash
normalized_message
[{reqId}] {exception_url}   PHP Warning: Undefined array key "stream_name"
FrameLocationCall
from/srv/mediawiki/php-1.46.0-wmf.22/extensions/TestKitchen/includes/ResourceLoader/Hooks.php(94)
#0/srv/mediawiki/php-1.46.0-wmf.22/extensions/TestKitchen/includes/ResourceLoader/Hooks.php(94)MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, int)
#1/srv/mediawiki/php-1.46.0-wmf.22/extensions/TestKitchen/includes/ResourceLoader/Hooks.php(70)MediaWiki\Extension\TestKitchen\ResourceLoader\Hooks::getExposureVersion(array, string)
#2/srv/mediawiki/php-1.46.0-wmf.22/extensions/TestKitchen/includes/ResourceLoader/Hooks.php(28)MediaWiki\Extension\TestKitchen\ResourceLoader\Hooks::getExperimentConfigs()
#3/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/FileModule.php(1402)MediaWiki\Extension\TestKitchen\ResourceLoader\Hooks::getConfigForTestKitchenModule(MediaWiki\ResourceLoader\Context, MediaWiki\Config\GlobalVarConfig, null)
#4/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/FileModule.php(1261)MediaWiki\ResourceLoader\FileModule->expandFileInfo(MediaWiki\ResourceLoader\Context, array, string)
#5/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/FileModule.php(690)MediaWiki\ResourceLoader\FileModule->expandPackageFiles(MediaWiki\ResourceLoader\Context)
#6/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/Module.php(839)MediaWiki\ResourceLoader\FileModule->getDefinitionSummary(MediaWiki\ResourceLoader\Context)
#7/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/StartUpModule.php(205)MediaWiki\ResourceLoader\Module->getVersionHash(MediaWiki\ResourceLoader\Context)
#8/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/StartUpModule.php(410)MediaWiki\ResourceLoader\StartUpModule->getModuleRegistrations(MediaWiki\ResourceLoader\Context)
#9/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/Module.php(734)MediaWiki\ResourceLoader\StartUpModule->getScript(MediaWiki\ResourceLoader\Context)
#10/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/Module.php(707)MediaWiki\ResourceLoader\Module->buildContent(MediaWiki\ResourceLoader\Context)
#11/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/Module.php(836)MediaWiki\ResourceLoader\Module->getModuleContent(MediaWiki\ResourceLoader\Context)
#12/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/ResourceLoader.php(594)MediaWiki\ResourceLoader\Module->getVersionHash(MediaWiki\ResourceLoader\Context)
#13/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/ResourceLoader.php(697)MediaWiki\ResourceLoader\ResourceLoader->getCombinedVersion(MediaWiki\ResourceLoader\Context, array)
#14/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/ResourceLoaderEntryPoint.php(45)MediaWiki\ResourceLoader\ResourceLoader->respond(MediaWiki\ResourceLoader\Context, array)
#15/srv/mediawiki/php-1.46.0-wmf.22/includes/MediaWikiEntryPoint.php(180)MediaWiki\ResourceLoader\ResourceLoaderEntryPoint->execute()
#16/srv/mediawiki/php-1.46.0-wmf.22/load.php(28)MediaWiki\MediaWikiEntryPoint->run()
#17/srv/mediawiki/w/load.php(3)require(string)
#18{main}
  • mwversion: 1.46.0-wmf.22
  • timestamp: 2026-03-31T07:54:04.828Z
  • phpversion: 8.3.30
  • reqId: 95100eec-b69f-4dc3-8c79-e3d42a5124ae
  • Find reqId in Logstash
normalized_message
[{reqId}] {exception_url}   PHP Warning: Undefined array key "contextual_attributes"
FrameLocationCall
from/srv/mediawiki/php-1.46.0-wmf.22/extensions/TestKitchen/includes/ResourceLoader/Hooks.php(69)
#0/srv/mediawiki/php-1.46.0-wmf.22/extensions/TestKitchen/includes/ResourceLoader/Hooks.php(69)MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, int)
#1/srv/mediawiki/php-1.46.0-wmf.22/extensions/TestKitchen/includes/ResourceLoader/Hooks.php(28)MediaWiki\Extension\TestKitchen\ResourceLoader\Hooks::getExperimentConfigs()
#2/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/FileModule.php(1402)MediaWiki\Extension\TestKitchen\ResourceLoader\Hooks::getConfigForTestKitchenModule(MediaWiki\ResourceLoader\Context, MediaWiki\Config\GlobalVarConfig, null)
#3/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/FileModule.php(1261)MediaWiki\ResourceLoader\FileModule->expandFileInfo(MediaWiki\ResourceLoader\Context, array, string)
#4/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/FileModule.php(690)MediaWiki\ResourceLoader\FileModule->expandPackageFiles(MediaWiki\ResourceLoader\Context)
#5/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/Module.php(839)MediaWiki\ResourceLoader\FileModule->getDefinitionSummary(MediaWiki\ResourceLoader\Context)
#6/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/StartUpModule.php(205)MediaWiki\ResourceLoader\Module->getVersionHash(MediaWiki\ResourceLoader\Context)
#7/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/StartUpModule.php(410)MediaWiki\ResourceLoader\StartUpModule->getModuleRegistrations(MediaWiki\ResourceLoader\Context)
#8/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/Module.php(734)MediaWiki\ResourceLoader\StartUpModule->getScript(MediaWiki\ResourceLoader\Context)
#9/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/Module.php(707)MediaWiki\ResourceLoader\Module->buildContent(MediaWiki\ResourceLoader\Context)
#10/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/Module.php(836)MediaWiki\ResourceLoader\Module->getModuleContent(MediaWiki\ResourceLoader\Context)
#11/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/ResourceLoader.php(594)MediaWiki\ResourceLoader\Module->getVersionHash(MediaWiki\ResourceLoader\Context)
#12/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/ResourceLoader.php(697)MediaWiki\ResourceLoader\ResourceLoader->getCombinedVersion(MediaWiki\ResourceLoader\Context, array)
#13/srv/mediawiki/php-1.46.0-wmf.22/includes/ResourceLoader/ResourceLoaderEntryPoint.php(45)MediaWiki\ResourceLoader\ResourceLoader->respond(MediaWiki\ResourceLoader\Context, array)
#14/srv/mediawiki/php-1.46.0-wmf.22/includes/MediaWikiEntryPoint.php(180)MediaWiki\ResourceLoader\ResourceLoaderEntryPoint->execute()
#15/srv/mediawiki/php-1.46.0-wmf.22/load.php(28)MediaWiki\MediaWikiEntryPoint->run()
#16/srv/mediawiki/w/load.php(3)require(string)
#17{main}

In the last hour just for the test wikis:

image.png (151×310 px, 14 KB)

Urbanecm_WMF subscribed.

Flagged to (the rest of) Growth engineers

The generally-helpful changelog is now empty... Is that intentional?

The usage was recently modified (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/TestKitchen/+/1251216). As far as I can see, this seems to be an issue in Test Kitchen internals rather than Growth's usage of it. CC @cjming @Sfaci @phuedx.

The usage was recently modified (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/TestKitchen/+/1251216). As far as I can see, this seems to be an issue in Test Kitchen internals rather than Growth's usage of it. CC @cjming @Sfaci @phuedx.

I think so. It's related to that change and also to other we made in Test Kitchen UI to add new fields to an API response that TestKitchen extension consumes (https://gitlab.wikimedia.org/repos/data-engineering/test-kitchen/-/merge_requests/309).
It seems that TestKitchen is not finding those new fields in the response and that's why we are seeing those errors about user_identifier_type, stream_name and contextual_attributes. The endpoint URL and the response that the extension consumes changed

Moving out of our sprint in favor of Experiment Platform; feel free to ping us for assistance.

For now, the only way I was able to reproduce exactly the same errors in my local was assuming that the response that comes from Test Kitchen API is the old one (where user_identifier_type, stream_name and contextual_attributes didn't exist).

And that probably doesn't make sense because the maintenance job is working fine according to their own logs (edited) 

Related to the switchover that was done last week? Maintenance jobs are running in a different cluster since then. I don't know if it was a coincidence but the maintenance job failed once last week two days after the switchover (because of timeout from etcd). But SREs considered that error as something not relevant.

Posting this here for some related context just in case. I don't think the current error is related to it

Related to the switchover that was done last week? Maintenance jobs are running in a different cluster since then

Silly question... If test-kitchen is running in both eqiad and codfw and the errors seem like the old response is returned, maybe we only deployed the new test-kitchen to codfw and not to eqiad? But I have no clue where testkitchen is deployed.

I don't know if it was a coincidence but the maintenance job failed once last week two days after the switchover (because of timeout from etcd). But SREs considered that error as something not relevant.

I agree. etcd timeouts are happening from time to time unfortunately. I wouldn't suspect the other error to have something in common with this one.

Related to the switchover that was done last week? Maintenance jobs are running in a different cluster since then

Silly question... If test-kitchen is running in both eqiad and codfw and the errors seem like the old response is returned, maybe we only deployed the new test-kitchen to codfw and not to eqiad? But I have no clue where testkitchen is deployed.

test-kitchen is running in dse-k8s-eqiad kubernetes cluster which means, if I'm not understanding wrongly, that is only running in eqiad.

I agree. etcd timeouts are happening from time to time unfortunately. I wouldn't suspect the other error to have something in common with this one.

Right! In fact I have created a sample NOOP test in test-kitchen and I have confirmed that a production wiki was updated propertly with the enrollment for that one. That would mean that the maintenance job is updating things properly, at least in the wikis that are running wmf.21 where they are using the old endpoint

I also have a silly question: Could it happen that, somehow, the maintenance job was still running the code from wmf.21 instead the new branch wmf.22? That would explain why things are updated according to the old way but not according to the new one

Suggest we bump the CACHE_VERSION in ConfigFetchers

I had this issue locally before I updated my docker containers for test kitchen devserver.

There must be experiment configs in cache from before the change that added user_identifier_type.

Change #1265424 had a related patch set uploaded (by Santiago Faci; author: Santiago Faci):

[mediawiki/extensions/TestKitchen@master] ConfigsFetcher: Increasing the cache version

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

Change #1265424 merged by jenkins-bot:

[mediawiki/extensions/TestKitchen@master] ConfigsFetcher: Increasing the cache version

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

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

[mediawiki/extensions/TestKitchen@wmf/1.46.0-wmf.22] ConfigsFetcher: Increasing the cache version

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

Change #1265436 merged by jenkins-bot:

[mediawiki/extensions/TestKitchen@wmf/1.46.0-wmf.22] ConfigsFetcher: Increasing the cache version

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

Mentioned in SAL (#wikimedia-operations) [2026-03-31T14:28:19Z] <cjming@deploy1003> Started scap sync-world: Backport for [[gerrit:1265436|ConfigsFetcher: Increasing the cache version (T421828)]]

Mentioned in SAL (#wikimedia-operations) [2026-03-31T14:30:15Z] <cjming@deploy1003> cjming: Backport for [[gerrit:1265436|ConfigsFetcher: Increasing the cache version (T421828)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-03-31T14:36:31Z] <cjming@deploy1003> Finished scap sync-world: Backport for [[gerrit:1265436|ConfigsFetcher: Increasing the cache version (T421828)]] (duration: 08m 12s)

backported UBN fix to wmf.22 and it appears errors are dropping 😌

jnuche lowered the priority of this task from Unbreak Now! to Needs Triage.Mar 31 2026, 2:43 PM

backported UBN fix to wmf.22 and it appears errors are dropping 😌

Thank you!

It seems that the schema for PHP configs have change to now have user_identifier_type as a required property (Coordination/EnrollmentsProcessor.php#19). fyi, I've updated TestKitchen#Testing_an_Experiment_on_Logged-In_Users accordingly for those who work with local configs instead of remote fetching. Hope that makes sense, also maybe there are other places to update that I've missed.

It seems that the schema for PHP configs have change to now have user_identifier_type as a required property (Coordination/EnrollmentsProcessor.php#19). fyi, I've updated TestKitchen#Testing_an_Experiment_on_Logged-In_Users accordingly for those who work with local configs instead of remote fetching. Hope that makes sense, also maybe there are other places to update that I've missed.

Good catch! Documentation still needs to be updated. In fact there are also two name fields, stream_name and contextual_attributes (you will see related errors as comments in this task) and they will have to be added as well to that local config variable.
Anyway we will be working on updating documentation in the following days. There are some also some follow up work pending to do related to this although I think they won't change a lot how all this works right now
Thanks!

KReid-WMF claimed this task.