Page MenuHomePhabricator

Error: Call to undefined method MediaWiki\User\TempUser\RealTempUserConfig::isEnabled()
Closed, ResolvedPublicPRODUCTION ERROR

Description

Permalink: https://logstash.wikimedia.org/app/discover#/doc/logstash-*/logstash-deploy-2022.05.05?id=AMUkloABe_s_NRHm9gDO

Error
normalized_message
[{reqId}] {exception_url}   Error: Call to undefined method MediaWiki\User\TempUser\RealTempUserConfig::isEnabled()
exception.trace
from /srv/mediawiki/php-1.39.0-wmf.10/includes/user/UserGroupManager.php(295)
#0 /srv/mediawiki/php-1.39.0-wmf.10/includes/user/UserGroupManager.php(338): MediaWiki\User\UserGroupManager->getUserImplicitGroups(User, integer, boolean)
#1 /srv/mediawiki/php-1.39.0-wmf.10/includes/Permissions/PermissionManager.php(1469): MediaWiki\User\UserGroupManager->getUserEffectiveGroups(User)
#2 /srv/mediawiki/php-1.39.0-wmf.10/includes/Permissions/PermissionManager.php(1418): MediaWiki\Permissions\PermissionManager->getUserPermissions(User)
#3 /srv/mediawiki/php-1.39.0-wmf.10/extensions/FlaggedRevs/backend/FlaggedRevsHooks.php(1306): MediaWiki\Permissions\PermissionManager->userHasRight(User, string)
#4 /srv/mediawiki/php-1.39.0-wmf.10/includes/HookContainer/HookContainer.php(338): FlaggedRevsHooks::setSessionKey(User)
#5 /srv/mediawiki/php-1.39.0-wmf.10/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#6 /srv/mediawiki/php-1.39.0-wmf.10/includes/HookContainer/HookRunner.php(4213): MediaWiki\HookContainer\HookContainer->run(string, array)
#7 /srv/mediawiki/php-1.39.0-wmf.10/includes/user/User.php(443): MediaWiki\HookContainer\HookRunner->onUserLoadAfterLoadFromSession(User)
#8 /srv/mediawiki/php-1.39.0-wmf.10/includes/user/User.php(1903): User->load()
#9 /srv/mediawiki/php-1.39.0-wmf.10/includes/user/User.php(2548): User->getId()
#10 /srv/mediawiki/php-1.39.0-wmf.10/includes/user/UserOptionsManager.php(645): User->isRegistered()
#11 /srv/mediawiki/php-1.39.0-wmf.10/includes/user/UserOptionsManager.php(497): MediaWiki\User\UserOptionsManager->getCacheKey(User)
#12 /srv/mediawiki/php-1.39.0-wmf.10/includes/user/UserOptionsManager.php(148): MediaWiki\User\UserOptionsManager->loadUserOptions(User, integer)
#13 /srv/mediawiki/php-1.39.0-wmf.10/includes/user/User.php(2370): MediaWiki\User\UserOptionsManager->getOption(User, string, NULL, boolean)
#14 /srv/mediawiki/php-1.39.0-wmf.10/includes/context/RequestContext.php(451): User->getOption(string)
#15 /srv/mediawiki/php-1.39.0-wmf.10/includes/language/Message.php(815): RequestContext->getLanguage()
#16 /srv/mediawiki/php-1.39.0-wmf.10/includes/context/RequestContext.php(544): Message->setContext(RequestContext)
#17 /srv/mediawiki/php-1.39.0-wmf.10/extensions/GrowthExperiments/includes/NewcomerTasks/TaskType/TaskType.php(136): RequestContext->msg(string)
#18 /srv/mediawiki/php-1.39.0-wmf.10/extensions/GrowthExperiments/includes/NewcomerTasks/ConfigurationLoader/ConfigurationValidator.php(196): GrowthExperiments\NewcomerTasks\TaskType\TaskType->getName(RequestContext)
#19 /srv/mediawiki/php-1.39.0-wmf.10/extensions/GrowthExperiments/includes/NewcomerTasks/TaskType/TaskTypeHandler.php(175): GrowthExperiments\NewcomerTasks\ConfigurationLoader\ConfigurationValidator->validateTaskMessages(GrowthExperiments\NewcomerTasks\TaskType\TemplateBasedTaskType)
#20 /srv/mediawiki/php-1.39.0-wmf.10/extensions/GrowthExperiments/includes/NewcomerTasks/ConfigurationLoader/PageConfigurationLoader.php(205): GrowthExperiments\NewcomerTasks\TaskType\TaskTypeHandler->validateTaskTypeObject(GrowthExperiments\NewcomerTasks\TaskType\TemplateBasedTaskType)
#21 /srv/mediawiki/php-1.39.0-wmf.10/extensions/GrowthExperiments/includes/NewcomerTasks/ConfigurationLoader/PageConfigurationLoader.php(132): GrowthExperiments\NewcomerTasks\ConfigurationLoader\PageConfigurationLoader->parseTaskTypesFromConfig(array)
#22 /srv/mediawiki/php-1.39.0-wmf.10/extensions/GrowthExperiments/includes/NewcomerTasks/ConfigurationLoader/ConfigurationLoaderTrait.php(35): GrowthExperiments\NewcomerTasks\ConfigurationLoader\PageConfigurationLoader->loadTaskTypes()
#23 /srv/mediawiki/php-1.39.0-wmf.10/extensions/GrowthExperiments/includes/HomepageHooks.php(1350): GrowthExperiments\NewcomerTasks\ConfigurationLoader\PageConfigurationLoader->getTaskTypes()
#24 /srv/mediawiki/php-1.39.0-wmf.10/includes/HookContainer/HookContainer.php(338): GrowthExperiments\HomepageHooks::onCirrusSearchAddQueryFeatures(CirrusSearch\SearchConfig, array)
#25 /srv/mediawiki/php-1.39.0-wmf.10/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#26 /srv/mediawiki/php-1.39.0-wmf.10/extensions/CirrusSearch/includes/CirrusSearchHookRunner.php(42): MediaWiki\HookContainer\HookContainer->run(string, array)
#27 /srv/mediawiki/php-1.39.0-wmf.10/extensions/CirrusSearch/includes/Parser/FullTextKeywordRegistry.php(99): CirrusSearch\CirrusSearchHookRunner->onCirrusSearchAddQueryFeatures(CirrusSearch\SearchConfig, array)
#28 /srv/mediawiki/php-1.39.0-wmf.10/extensions/CirrusSearch/includes/Parser/QueryParserFactory.php(34): CirrusSearch\Parser\FullTextKeywordRegistry->__construct(CirrusSearch\SearchConfig, CirrusSearch\CirrusSearchHookRunner, class@anonymous
Impact
Notes

Details

Request URL
https://en.wikipedia.org/w/api.php?action=query&continue=*&coprop=*&format=*&generator=*&gsrinfo=*&gsrlimit=*&gsrnamespace=*&gsroffset=*&gsrprop=*&gsrsearch=*&gsrwhat=*&pilimit=*&piprop=*&pithumbsize=*&ppprop=*&prop=*&redirects=*&rvprop=*

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
tstarling claimed this task.
tstarling added a subscriber: brennen.

It was just a burst during deployment of https://gerrit.wikimedia.org/r/c/mediawiki/core/+/789332/

21:35 brennen@deploy1002: Synchronized php-1.39.0-wmf.10/includes/user: Backport: Suppress "named" group when TempUser system is disabled (T307675) (duration: 00m 48s)

RealTempUserConfig should have been pushed out before UserGroupManager.

Yeah, confirming this as a deployment error on my part.

I should probably note that if we're strictly following deployment guidelines, patches which require multiple syncs for safe deployment are disallowed:

Forbidden types of patches

  • Single patches that require more than one sync - in other words, changes to multiple files which depend on each other.
    • Instead, please break up the patches into multiple safe patches that can be deployed by themselves. See: task T187761

In practice, I think many deployers aren't aware of this restriction or let it slide in trivial instances, but if I'd caught the dependency here I might have requested that it be broken up. I'll probably do so in future.

I should probably note that if we're strictly following deployment guidelines, patches which require multiple syncs for safe deployment are disallowed:

Forbidden types of patches

  • Single patches that require more than one sync - in other words, changes to multiple files which depend on each other.
    • Instead, please break up the patches into multiple safe patches that can be deployed by themselves. See: task T187761

In practice, I think many deployers aren't aware of this restriction or let it slide in trivial instances, but if I'd caught the dependency here I might have requested that it be broken up. I'll probably do so in future.

That every deployer must perfectly determine file dependencies is a failure of our deployment system (and sometimes there are circular dependencies that make it impossible). And we wrote this guideline to compensate.

Ideally we'd do atomic deploys or restart as part of deployment. Scap can do a rolling-restart on each deployment (tracked in T266055: Update Scap to perform rolling restart for all MW deploy) but that may be stalled.