Page MenuHomePhabricator

Cleanup deprecated calls in production
Closed, ResolvedPublic2 Estimated Story Points

Description

The following log messages are seen in production, related to the parent task:

Use of Article::exists was deprecated in MediaWiki 1.35. [Called from LqtHooks::editCheckboxes in /srv/mediawiki/php-1.35.0-wmf.30/extensions/LiquidThreads/classes/Hooks.php at line 336]
Use of Article::exists was deprecated in MediaWiki 1.35. [Called from WikiEditorHooks::editPageShowEditFormInitial in /srv/mediawiki/php-1.35.0-wmf.30/extensions/WikiEditor/includes/WikiEditorHooks.php at line 109]
Use of Article::getId was deprecated in MediaWiki 1.35. [Called from Threads::withRoot in /srv/mediawiki/php-1.35.0-wmf.30/extensions/LiquidThreads/classes/Threads.php at line 154]
Use of Article::exists was deprecated in MediaWiki 1.35. [Called from Thread::article in /srv/mediawiki/php-1.35.0-wmf.30/extensions/LiquidThreads/classes/Thread.php at line 1281]
Use of Article::getTimestamp was deprecated in MediaWiki 1.35. [Called from LqtView::threadInfoPanel in /srv/mediawiki/php-1.35.0-wmf.30/extensions/LiquidThreads/classes/View.php at line 1624]

All of these seem to belong to either LiquidThreads or WikiEditor extension. Patches need to be made for each to fix the deprecations. Patches has to be as small as possible.

Event Timeline

Pchelolo triaged this task as High priority.Apr 28 2020, 1:56 PM
Pchelolo created this task.

Change 592992 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/extensions/LiquidThreads@master] Use WikiPage methods instead hard-deprecated Article methods

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

Change 592996 had a related patch set uploaded (by Art-Baltai; owner: BAGArt):
[mediawiki/extensions/WikiEditor@master] Use WikiPage::exists instead hard-deprecated Article::exists

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

Change 593186 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/LiquidThreads@master] Remove usage of deprecated Article methods

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

Change 593186 abandoned by Abijeet Patro:
Remove usage of deprecated Article methods

Reason:
Abandoned in favor of: Ib10e780f45a2007390bcc9c11cef8998b4d0be7b

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

Change 592992 merged by jenkins-bot:
[mediawiki/extensions/LiquidThreads@master] Use WikiPage methods instead hard-deprecated Article methods

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

Change 593179 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/LiquidThreads@master] Fix capitalization of getID() method calls

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

A few more:

TimedMediaHandler:

Use of Article::exists was deprecated in MediaWiki 1.35. [Called from TimedTextPage::renderOutput in /srv/mediawiki/php-1.35.0-wmf.30/extensions/TimedMediaHandler/includes/TimedTextPage.php at line 99]

AbuseFilter:

Use of Article::getContentModel was deprecated in MediaWiki 1.35. [Called from AFComputedVariable::compute in /srv/mediawiki/php-1.35.0-wmf.30/extensions/AbuseFilter/includes/AFComputedVariable.php at line 231]
Use of Article::prepareContentForEdit was deprecated in MediaWiki 1.35. [Called from AFComputedVariable::compute in /srv/mediawiki/php-1.35.0-wmf.30/extensions/AbuseFilter/includes/AFComputedVariable.php at line 240]

TwoColConflict:

Use of Article::getContentHandler was deprecated in MediaWiki 1.35. [Called from TwoColConflict\TwoColConflictHooks::TwoColConflict\{closure} in /srv/mediawiki/php-1.35.0-wmf.30/extensions/TwoColConflict/includes/TwoColConflictHooks.php at line 54]

Change 592996 merged by jenkins-bot:
[mediawiki/extensions/WikiEditor@master] Use WikiPage::exists instead hard-deprecated Article::exists

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

Change 593356 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/extensions/Wikibase@master] Use Action::getArticle instead of deprecated Action::$page

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

Change 593360 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/extensions/TimedMediaHandler@master] Use WikiPage::exists instead hard-deprecated Article::exists

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

Change 593360 merged by jenkins-bot:
[mediawiki/extensions/TimedMediaHandler@master] Use WikiPage::exists instead hard-deprecated Article::exists

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

Pchelolo updated the task description. (Show Details)May 2 2020, 12:37 AM

All the instances of deprecated calls mentioned in this task have been cleaned up, except AbuseFilter. There it seems like the code is correct, but we've been using a cached serialized variable - thus calling on Article. Let's see if it resurrects next week.

Let's keep this ticket open for now until we're sure there's nothing left. For now the work here is done.

I've moved it to 'blocked' on your dashboard, since we're going to be waiting for a deployment of a new train before resolving this.

except AbuseFilter. There it seems like the code is correct, but we've been using a cached serialized variable - thus calling on Article. Let's see if it resurrects next week.

Indeed, and this is a constant source of pain. Fortunately, it's close to an end -- we hope to clean up the serialized values next week (T246539).

Art-Baltai set the point value for this task to 2.May 6 2020, 3:12 PM

We got a few more:

Use of Article::getId was deprecated in MediaWiki 1.35. [Called from Threads::articleClause in /srv/mediawiki/php-1.35.0-wmf.31/extensions/LiquidThreads/classes/Threads.php at line 215]
Use of Article::getId was deprecated in MediaWiki 1.35. [Called from Threads::synchroniseArticleData in /srv/mediawiki/php-1.35.0-wmf.31/extensions/LiquidThreads/classes/Threads.php at line 348]

Change 596065 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/extensions/LiquidThreads@master] Use WikiPage::getId methods instead hard-deprecated Article::getId

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

Change 596065 merged by jenkins-bot:
[mediawiki/extensions/LiquidThreads@master] Use WikiPage::getId methods instead hard-deprecated Article::getId

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

Change 597355 had a related patch set uploaded (by Krinkle; owner: Art-Baltai):
[mediawiki/extensions/LiquidThreads@wmf/1.35.0-wmf.32] Use WikiPage::getId methods instead hard-deprecated Article::getId

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

@Art-Baltai What's the blocker for this ticket?

Art-Baltai added a comment.EditedMay 21 2020, 2:40 AM

AbuseFilter:

Use of Article::getContentModel was deprecated in MediaWiki 1.35. [Called from AFComputedVariable::compute in /srv/mediawiki/php-1.35.0-wmf.30/extensions/AbuseFilter/includes/AFComputedVariable.php at line 231]
Use of Article::prepareContentForEdit was deprecated in MediaWiki 1.35. [Called from AFComputedVariable::compute in /srv/mediawiki/php-1.35.0-wmf.30/extensions/AbuseFilter/includes/AFComputedVariable.php at line 240]

AbuseFilter: in \AFComputedVariable::compute
actual code:

				/* @var WikiPage $article */
				if ( $article->getContentModel() === CONTENT_MODEL_WIKITEXT ) {

$article is declared as WikiPage, but actually it is Article on production env
Reason: $article is a cached value
What to do: reset cache with problem value
I don't know about the actual status.
I don't have access to cache to do it myself

Change 597355 merged by jenkins-bot:
[mediawiki/extensions/LiquidThreads@wmf/1.35.0-wmf.32] Use WikiPage::getId methods instead hard-deprecated Article::getId

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

Krinkle added a subscriber: Krinkle.

AbuseFilter: […]

AbuseFilter: in \AFComputedVariable::compute
actual code:

				/* @var WikiPage $article */
				if ( $article->getContentModel() === CONTENT_MODEL_WIKITEXT ) {

$article is declared as WikiPage, but actually it is Article on production env
Reason: $article is a cached value
What to do: reset cache with problem value […]

@Daimona Can you confirm this hypothesis and perhaps advice on whether and what kind of patch you think is needed?

@Daimona Can you confirm this hypothesis and perhaps advice on whether and what kind of patch you think is needed?

Yes, see T251278#6101975. It's the usual code path which brings new crazy issues from time to time. As you can see on T246539, only group1 and 2 are left to clean up.

Naike changed the task status from Open to Stalled.May 22 2020, 7:11 AM
Aklapper changed the task status from Stalled to Open.May 22 2020, 11:17 AM
Aklapper added a subscriber: Naike.

@Naike: The previous comments don't explain what/who exactly this task is stalled on ("If a report is waiting for further input (e.g. from its reporter or a third party) and can currently not be acted on"). Hence resetting task status.

(Smallprint, as general orientation for task management: If you wanted to express that nobody is currently working on this task, then the assignee should be removed and/or priority could be lowered instead. If work on this task is blocked by another task, then that other task should be added via Edit Related Tasks...Edit Subtasks. If this task is stalled on an upstream project, then the Upstream tag should be added. If this task requires info from the task reporter, then there should be instructions which info is needed. If this task is out of scope and nobody should ever work on this, then task status should have the "Declined" status.)

Krinkle closed this task as Resolved.May 28 2020, 2:12 AM

The only warnings left in prod are:

  • Use of Article::getContentModel was deprecated in MediaWiki 1.35. [Called from AFComputedVariable::compute in /srv/mediawiki/php-1.35.0-wmf.32/extensions/AbuseFilter/includes/AFComputedVariable.php at line 232]
  • Use of Article::prepareContentForEdit was deprecated in MediaWiki 1.35. [Called from AFComputedVariable::compute in /srv/mediawiki/php-1.35.0-wmf.32/extensions/AbuseFilter/includes/AFComputedVariable.php at line 241]

Which are tracked separately and were not part of this task.

Change 593179 merged by jenkins-bot:
[mediawiki/extensions/LiquidThreads@master] Fix capitalization of getID() method calls

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