Page MenuHomePhabricator

enwikinews: FlaggedRev hook triggers: Error: Class 'GoogleNewsSitemap' not found
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   Error: Class 'GoogleNewsSitemap' not found
exception.trace
from /srv/mediawiki/php-1.39.0-wmf.10/extensions/FlaggedRevs/backend/FlaggedRevsHooks.php(1348)
#0 /srv/mediawiki/php-1.39.0-wmf.10/includes/HookContainer/HookContainer.php(338): FlaggedRevsHooks::gnsmQueryModifier(array, array, array, array)
#1 /srv/mediawiki/php-1.39.0-wmf.10/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#2 /srv/mediawiki/php-1.39.0-wmf.10/extensions/GoogleNewsSitemap/includes/Specials/GoogleNewsSitemap.php(340): MediaWiki\HookContainer\HookContainer->run(string, array)
#3 /srv/mediawiki/php-1.39.0-wmf.10/extensions/GoogleNewsSitemap/includes/Specials/GoogleNewsSitemap.php(145): MediaWiki\Extension\GoogleNewsSitemap\Specials\GoogleNewsSitemap->getCategories(array, array, array)
#4 /srv/mediawiki/php-1.39.0-wmf.10/includes/specialpage/SpecialPage.php(688): MediaWiki\Extension\GoogleNewsSitemap\Specials\GoogleNewsSitemap->execute(NULL)
#5 /srv/mediawiki/php-1.39.0-wmf.10/includes/specialpage/SpecialPageFactory.php(1409): SpecialPage->run(NULL)
#6 /srv/mediawiki/php-1.39.0-wmf.10/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#7 /srv/mediawiki/php-1.39.0-wmf.10/includes/MediaWiki.php(912): MediaWiki->performRequest()
#8 /srv/mediawiki/php-1.39.0-wmf.10/includes/MediaWiki.php(566): MediaWiki->main()
#9 /srv/mediawiki/php-1.39.0-wmf.10/index.php(50): MediaWiki->run()
#10 /srv/mediawiki/php-1.39.0-wmf.10/index.php(46): wfIndexMain()
#11 /srv/mediawiki/w/index.php(3): require(string)
#12 {main}
Impact
Notes

Event Timeline

hashar triaged this task as Unbreak Now! priority.May 4 2022, 9:19 AM
hashar created this task.

That can be found via: https://codesearch.wmcloud.org/search/?q=GoogleNewsSitemap&i=nope&files=&excludeFiles=&repos=Extension:FlaggedRevs

The issue was not caught on CI by Phan cause there is a stub file:

.phan/stubs/googlenewssitemap.php
<?php

class GoogleNewsSitemap {
	public const OPT_INCLUDE = 0;
	public const OPT_ONLY = 1;

Which should be addressed, we need the Phan job triggering for FlaggedRevs to inject the GoogleNewsSitemap extension (which can be done in integration/config by adding the dependency to zuul/parameter_functions.py under the dict phan_dependencies).

we need the Phan job triggering for FlaggedRevs to inject the GoogleNewsSitemap extension (which can be done in integration/config by adding the dependency to zuul/parameter_functions.py under the dict phan_dependencies).

That's already set (done in rCICFe8f52636e431: [FlaggedRevs] Add phan dependencies), it's just that the stub was over-riding.

Edit: Ah, because rEFLR501a88dc8feb: Add Phan stub for GoogleNewsSitemap extension removed it. :-(

Change 789122 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/FlaggedRevs@master] phan: Properly use actual GoogleNewsSitemap, not a stub

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

Change 789124 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/FlaggedRevs@master] FlaggedRevsHooks: Update use of GoogleNewsSitemap constants

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

Change 789124 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@master] FlaggedRevsHooks: Update use of GoogleNewsSitemap constants

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

Change 789122 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@master] phan: Properly use actual GoogleNewsSitemap, not a stub

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

Change 788861 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/FlaggedRevs@wmf/1.39.0-wmf.10] FlaggedRevsHooks: Update use of GoogleNewsSitemap constants

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

Change 788861 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@wmf/1.39.0-wmf.10] FlaggedRevsHooks: Update use of GoogleNewsSitemap constants

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

Mentioned in SAL (#wikimedia-operations) [2022-05-04T12:38:22Z] <hashar@deploy1002> Synchronized php-1.39.0-wmf.10/extensions/FlaggedRevs/: FlaggedRevsHooks: Update use of GoogleNewsSitemap constants - T307552 (duration: 00m 51s)

hashar assigned this task to Jdforrester-WMF.