Page MenuHomePhabricator

Flow errors - Insufficient permissions to see userlinks for rev_id and InvalidTopicUuidException
Closed, ResolvedPublicPRODUCTION ERROR

Description

Note: Phatality reporting wasn't working

(1) Flow\Exception\PermissionException: Insufficient permissions to see userlinks for rev_id
logstash link

Impact:
exception.class Flow\Exception\PermissionException
exception.code default
exception.file /srv/mediawiki/php-1.42.0-wmf.16/extensions/Flow/includes/Templating.php:63
exception.message Insufficient permissions to see userlinks for rev_id = x1rxhevz3h8ykbvd
normalized_message [{reqId}] {exception_url}   Flow\Exception\PermissionException: Insufficient permissions to see userlinks for rev_id = x1rxhevz3h8ykbvd
reqId 727a9d2f-dec7-4df4-a3b4-69834e144089
exception.trace
from /srv/mediawiki/php-1.42.0-wmf.16/extensions/Flow/includes/Templating.php(63)
#0 /srv/mediawiki/php-1.42.0-wmf.16/extensions/Flow/includes/Formatter/RevisionFormatter.php(947): Flow\Templating->getUserLinks(Flow\Model\PostRevision)
#1 /srv/mediawiki/php-1.42.0-wmf.16/extensions/Flow/includes/Formatter/RevisionFormatter.php(909): Flow\Formatter\RevisionFormatter->processParam(string, Flow\Model\PostRevision, Flow\Model\UUID, MediaWiki\Pager\ContribsPager, Flow\Formatter\ContributionsRow)
#2 /srv/mediawiki/php-1.42.0-wmf.16/extensions/Flow/includes/Formatter/RevisionFormatter.php(249): Flow\Formatter\RevisionFormatter->buildProperties(Flow\Model\UUID, Flow\Model\PostRevision, MediaWiki\Pager\ContribsPager, Flow\Formatter\ContributionsRow)
#3 /srv/mediawiki/php-1.42.0-wmf.16/extensions/Flow/includes/Formatter/ContributionsFormatter.php(26): Flow\Formatter\RevisionFormatter->formatApi(Flow\Formatter\ContributionsRow, MediaWiki\Pager\ContribsPager, string)
#4 /srv/mediawiki/php-1.42.0-wmf.16/extensions/Flow/includes/Hooks.php(776): Flow\Formatter\ContributionsFormatter->format(Flow\Formatter\ContributionsRow, MediaWiki\Pager\ContribsPager)
#5 /srv/mediawiki/php-1.42.0-wmf.16/extensions/Flow/includes/Hooks.php(812): Flow\Hooks->onDeletedContributionsLineEnding(MediaWiki\Pager\ContribsPager, string, Flow\Formatter\ContributionsRow, array, array)
#6 /srv/mediawiki/php-1.42.0-wmf.16/includes/HookContainer/HookContainer.php(159): Flow\Hooks->onContributionsLineEnding(MediaWiki\Pager\ContribsPager, string, Flow\Formatter\ContributionsRow, array, array)
#7 /srv/mediawiki/php-1.42.0-wmf.16/includes/HookContainer/HookRunner.php(1271): MediaWiki\HookContainer\HookContainer->run(string, array)
#8 /srv/mediawiki/php-1.42.0-wmf.16/includes/specials/pagers/ContribsPager.php(851): MediaWiki\HookContainer\HookRunner->onContributionsLineEnding(MediaWiki\Pager\ContribsPager, string, Flow\Formatter\ContributionsRow, array, array)
#9 /srv/mediawiki/php-1.42.0-wmf.16/includes/pager/ReverseChronologicalPager.php(134): MediaWiki\Pager\ContribsPager->formatRow(Flow\Formatter\ContributionsRow)
#10 /srv/mediawiki/php-1.42.0-wmf.16/includes/pager/IndexPager.php(594): MediaWiki\Pager\ReverseChronologicalPager->getRow(Flow\Formatter\ContributionsRow)
#11 /srv/mediawiki/php-1.42.0-wmf.16/includes/specials/SpecialContributions.php(332): MediaWiki\Pager\IndexPager->getBody()
#12 /srv/mediawiki/php-1.42.0-wmf.16/includes/poolcounter/PoolCounterWorkViaCallback.php(73): MediaWiki\Specials\SpecialContributions->MediaWiki\Specials\{closure}()
#13 /srv/mediawiki/php-1.42.0-wmf.16/includes/poolcounter/PoolCounterWork.php(172): MediaWiki\PoolCounter\PoolCounterWorkViaCallback->doWork()
#14 /srv/mediawiki/php-1.42.0-wmf.16/includes/specials/SpecialContributions.php(352): MediaWiki\PoolCounter\PoolCounterWork->execute()
#15 /srv/mediawiki/php-1.42.0-wmf.16/includes/specialpage/SpecialPage.php(727): MediaWiki\Specials\SpecialContributions->execute(NULL)
#16 /srv/mediawiki/php-1.42.0-wmf.16/includes/specialpage/SpecialPageFactory.php(1653): MediaWiki\SpecialPage\SpecialPage->run(NULL)
#17 /srv/mediawiki/php-1.42.0-wmf.16/includes/actions/ActionEntryPoint.php(506): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#18 /srv/mediawiki/php-1.42.0-wmf.16/includes/actions/ActionEntryPoint.php(153): MediaWiki\Actions\ActionEntryPoint->performRequest()
#19 /srv/mediawiki/php-1.42.0-wmf.16/includes/MediaWikiEntryPoint.php(185): MediaWiki\Actions\ActionEntryPoint->execute()
#20 /srv/mediawiki/php-1.42.0-wmf.16/index.php(55): MediaWiki\MediaWikiEntryPoint->run()
#21 /srv/mediawiki/w/index.php(3): require(string)
#22 {main}

(2)
logstash link

exception.class  Flow\Exception\InvalidTopicUuidException
exception.file   /srv/mediawiki/php-1.42.0-wmf.16/extensions/Flow/includes/WorkflowLoaderFactory.php:165
exception.message An error has occurred.
exception.trace
from /srv/mediawiki/php-1.42.0-wmf.16/extensions/Flow/includes/WorkflowLoaderFactory.php(165)
#0 /srv/mediawiki/php-1.42.0-wmf.16/extensions/Flow/includes/WorkflowLoaderFactory.php(146): Flow\WorkflowLoaderFactory::uuidFromTitlePair(integer, string)
#1 /srv/mediawiki/php-1.42.0-wmf.16/extensions/Flow/includes/Hooks.php(1339): Flow\WorkflowLoaderFactory::uuidFromTitle(MediaWiki\Title\Title)
#2 /srv/mediawiki/php-1.42.0-wmf.16/includes/HookContainer/HookContainer.php(159): Flow\Hooks->onTitleSquidURLs(MediaWiki\Title\Title, array)
#3 /srv/mediawiki/php-1.42.0-wmf.16/includes/HookContainer/HookRunner.php(3982): MediaWiki\HookContainer\HookContainer->run(string, array)
#4 /srv/mediawiki/php-1.42.0-wmf.16/includes/cache/HtmlCacheUpdater.php(251): MediaWiki\HookContainer\HookRunner->onTitleSquidURLs(MediaWiki\Title\Title, array)
#5 /srv/mediawiki/php-1.42.0-wmf.16/includes/actions/ActionEntryPoint.php(728): HtmlCacheUpdater->getUrls(MediaWiki\Title\Title)
#6 /srv/mediawiki/php-1.42.0-wmf.16/includes/actions/ActionEntryPoint.php(512): MediaWiki\Actions\ActionEntryPoint->performAction(Article, MediaWiki\Title\Title)
#7 /srv/mediawiki/php-1.42.0-wmf.16/includes/actions/ActionEntryPoint.php(153): MediaWiki\Actions\ActionEntryPoint->performRequest()
#8 /srv/mediawiki/php-1.42.0-wmf.16/includes/MediaWikiEntryPoint.php(185): MediaWiki\Actions\ActionEntryPoint->execute()
#9 /srv/mediawiki/php-1.42.0-wmf.16/index.php(55): MediaWiki\MediaWikiEntryPoint->run()
#10 /srv/mediawiki/w/index.php(3): require(string)
#11 {main}

Event Timeline

Reedy renamed this task from Flow errors - Insufficient permissions to see userlinks for rev_id and InvalidTopicUuidException to Flow errors - Insufficient permissions to see userlinks for rev_id and InvalidTopicUuidException.Jan 30 2024, 11:13 PM
Reedy updated the task description. (Show Details)

Hello everyone! Release-Engineering-Team Train operators humbly request love on this ticket. The error is particularly spammy in our monitoring tools.

It doesn't seem like this code changed recently, so this might be caused by my refactoring of the exception itself causing it to be reported in a different way – see rEFLW4adac5bfc7a7: Replace subclasses of MWException.

Yeah… Flow\Exception\PermissionException has isLoggable(): false: https://gerrit.wikimedia.org/g/mediawiki/extensions/Flow/+/39bc4531c632f416df3f207b460830c37a2696b0/includes/Exception/PermissionException.php#19

When it was a MWException, that prevented these errors from ever being logged (they were still occurring, just quietly), but now they are revealed.

I missed this override when making those changes.

Change 997957 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/Flow@master] Fix PermissionException being logged

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

Change 997957 merged by jenkins-bot:

[mediawiki/extensions/Flow@master] Fix PermissionException being logged

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

Change 997877 had a related patch set uploaded (by Jforrester; author: Bartosz Dziewoński):

[mediawiki/extensions/Flow@wmf/1.42.0-wmf.17] Fix PermissionException being logged

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

Change 997878 had a related patch set uploaded (by Jforrester; author: Bartosz Dziewoński):

[mediawiki/extensions/Flow@wmf/1.42.0-wmf.16] Fix PermissionException being logged

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

Change 997878 merged by jenkins-bot:

[mediawiki/extensions/Flow@wmf/1.42.0-wmf.16] Fix PermissionException being logged

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

Change 997877 merged by jenkins-bot:

[mediawiki/extensions/Flow@wmf/1.42.0-wmf.17] Fix PermissionException being logged

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

Mentioned in SAL (#wikimedia-operations) [2024-02-07T14:09:47Z] <logmsgbot> lucaswerkmeister-wmde@deploy2002 Started scap: Backport for [[gerrit:997878|Fix PermissionException being logged (T356223)]], [[gerrit:997877|Fix PermissionException being logged (T356223)]]

Mentioned in SAL (#wikimedia-operations) [2024-02-07T14:11:20Z] <logmsgbot> lucaswerkmeister-wmde@deploy2002 jforrester and lucaswerkmeister-wmde: Backport for [[gerrit:997878|Fix PermissionException being logged (T356223)]], [[gerrit:997877|Fix PermissionException being logged (T356223)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-02-07T14:17:56Z] <logmsgbot> lucaswerkmeister-wmde@deploy2002 Finished scap: Backport for [[gerrit:997878|Fix PermissionException being logged (T356223)]], [[gerrit:997877|Fix PermissionException being logged (T356223)]] (duration: 08m 08s)