Page MenuHomePhabricator

CirrusSearch is using hard deprecated Title::getBacklinkCache
Closed, ResolvedPublic

Event Timeline

Zabe renamed this task from Cirrussearch is using hard deprecated Title::getBacklinkCache to CirrusSearch is using hard deprecated Title::getBacklinkCache.Sep 13 2021, 6:40 PM
Zabe triaged this task as High priority.

Change 720798 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/CirrusSearch@master] RedirectsAndIncomingLinks: inject BacklinkCacheFactory

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

Change 720798 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@master] RedirectsAndIncomingLinks: inject BacklinkCacheFactory

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

Change 720847 had a related patch set uploaded (by Majavah; author: Zabe):

[mediawiki/extensions/CirrusSearch@REL1_37] RedirectsAndIncomingLinks: inject BacklinkCacheFactory

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

Change 720847 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@REL1_37] RedirectsAndIncomingLinks: inject BacklinkCacheFactory

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

hashar added a subscriber: hashar.

With 1.37.0-wmf.23:

PHP Deprecated: Use of Title::getBacklinkCache was deprecated in MediaWiki 1.37. [Called from CirrusSearch\BuildDocument\RedirectsAndIncomingLinks::initialize]

from /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/BuildDocument/RedirectsAndIncomingLinks.php(81)
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, string, array)
#1 /srv/mediawiki/php-1.37.0-wmf.23/includes/debug/MWDebug.php(375): trigger_error(string, integer)
#2 /srv/mediawiki/php-1.37.0-wmf.23/includes/debug/MWDebug.php(351): MWDebug::sendRawDeprecated(string, boolean, string)
#3 /srv/mediawiki/php-1.37.0-wmf.23/includes/debug/MWDebug.php(230): MWDebug::deprecatedMsg(string, string, string, integer)
#4 /srv/mediawiki/php-1.37.0-wmf.23/includes/GlobalFunctions.php(1005): MWDebug::deprecated(string, string, string, integer)
#5 /srv/mediawiki/php-1.37.0-wmf.23/includes/Title.php(3918): wfDeprecated(string, string)
#6 /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/BuildDocument/RedirectsAndIncomingLinks.php(81): Title->getBacklinkCache()
#7 /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/BuildDocument/BuildDocument.php(240): CirrusSearch\BuildDocument\RedirectsAndIncomingLinks->initialize(Elastica\Document, WikiPage)
#8 /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/BuildDocument/BuildDocument.php(117): CirrusSearch\BuildDocument\BuildDocument->initializeDoc(WikiPage, array, integer)
#9 /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/Updater.php(204): CirrusSearch\BuildDocument\BuildDocument->initialize(array, integer)
#10 /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/Updater.php(79): CirrusSearch\Updater->updatePages(array, integer)
#11 /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/Job/LinksUpdate.php(51): CirrusSearch\Updater->updateFromTitle(Title)
#12 /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/Job/JobTraits.php(136): CirrusSearch\Job\LinksUpdate->doJob()
#13 /srv/mediawiki/php-1.37.0-wmf.23/includes/jobqueue/JobRunner.php(373): CirrusSearch\Job\CirrusTitleJob->run()
#14 /srv/mediawiki/php-1.37.0-wmf.23/includes/jobqueue/JobRunner.php(334): JobRunner->doExecuteJob(CirrusSearch\Job\LinksUpdate)
#15 /srv/mediawiki/php-1.37.0-wmf.23/includes/jobqueue/JobRunner.php(247): JobRunner->executeJob(CirrusSearch\Job\LinksUpdate)
#16 /srv/mediawiki/php-1.37.0-wmf.23/maintenance/runJobs.php(97): JobRunner->run(array)
#17 /srv/mediawiki/php-1.37.0-wmf.23/maintenance/doMaintenance.php(108): RunJobs->execute()
#18 /srv/mediawiki/php-1.37.0-wmf.23/maintenance/runJobs.php(134): require_once(string)
#19 /srv/mediawiki/multiversion/MWScript.php(116): require_once(string)
#20 {main}

I guess we need to backport https://gerrit.wikimedia.org/r/720798 which is not in 1.37.0-wmf.23

With 1.37.0-wmf.23:

PHP Deprecated: Use of Title::getBacklinkCache was deprecated in MediaWiki 1.37. [Called from CirrusSearch\BuildDocument\RedirectsAndIncomingLinks::initialize]

from /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/BuildDocument/RedirectsAndIncomingLinks.php(81)
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, string, array)
#1 /srv/mediawiki/php-1.37.0-wmf.23/includes/debug/MWDebug.php(375): trigger_error(string, integer)
#2 /srv/mediawiki/php-1.37.0-wmf.23/includes/debug/MWDebug.php(351): MWDebug::sendRawDeprecated(string, boolean, string)
#3 /srv/mediawiki/php-1.37.0-wmf.23/includes/debug/MWDebug.php(230): MWDebug::deprecatedMsg(string, string, string, integer)
#4 /srv/mediawiki/php-1.37.0-wmf.23/includes/GlobalFunctions.php(1005): MWDebug::deprecated(string, string, string, integer)
#5 /srv/mediawiki/php-1.37.0-wmf.23/includes/Title.php(3918): wfDeprecated(string, string)
#6 /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/BuildDocument/RedirectsAndIncomingLinks.php(81): Title->getBacklinkCache()
#7 /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/BuildDocument/BuildDocument.php(240): CirrusSearch\BuildDocument\RedirectsAndIncomingLinks->initialize(Elastica\Document, WikiPage)
#8 /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/BuildDocument/BuildDocument.php(117): CirrusSearch\BuildDocument\BuildDocument->initializeDoc(WikiPage, array, integer)
#9 /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/Updater.php(204): CirrusSearch\BuildDocument\BuildDocument->initialize(array, integer)
#10 /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/Updater.php(79): CirrusSearch\Updater->updatePages(array, integer)
#11 /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/Job/LinksUpdate.php(51): CirrusSearch\Updater->updateFromTitle(Title)
#12 /srv/mediawiki/php-1.37.0-wmf.23/extensions/CirrusSearch/includes/Job/JobTraits.php(136): CirrusSearch\Job\LinksUpdate->doJob()
#13 /srv/mediawiki/php-1.37.0-wmf.23/includes/jobqueue/JobRunner.php(373): CirrusSearch\Job\CirrusTitleJob->run()
#14 /srv/mediawiki/php-1.37.0-wmf.23/includes/jobqueue/JobRunner.php(334): JobRunner->doExecuteJob(CirrusSearch\Job\LinksUpdate)
#15 /srv/mediawiki/php-1.37.0-wmf.23/includes/jobqueue/JobRunner.php(247): JobRunner->executeJob(CirrusSearch\Job\LinksUpdate)
#16 /srv/mediawiki/php-1.37.0-wmf.23/maintenance/runJobs.php(97): JobRunner->run(array)
#17 /srv/mediawiki/php-1.37.0-wmf.23/maintenance/doMaintenance.php(108): RunJobs->execute()
#18 /srv/mediawiki/php-1.37.0-wmf.23/maintenance/runJobs.php(134): require_once(string)
#19 /srv/mediawiki/multiversion/MWScript.php(116): require_once(string)
#20 {main}

I guess we need to backport https://gerrit.wikimedia.org/r/720798 which is not in 1.37.0-wmf.23

Yes, you need to backport the patch if you want to get rid of the logspam.

A backport doesn't seem to be necessary.

Good point! I have filtered out the error from logstash referring to this task. The patch will be included in the next train next week so I think it is fine. Marking resolved again.