Page MenuHomePhabricator

Expected logspam from ProofreadPage
Closed, ResolvedPublic

Description

I expect we'll get logspam from ProofreadPage on wikisource wikis caused by the deprecation of dynamic property access (https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1004257).

This is patched in master at https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1020249 and https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ProofreadPage/+/1020250 -- both patches are necessary because ProofreadPage does an unset on the property, so without 1020250 the declared property will become dynamic again after the unset and start emitting deprecation warnings again.

I will prepare backport patches for 1.43-wmf.1 for these, but I may have intermittent connectivity over the next few days (presenting at MWUD 2024 conference) so I wanted to make sure there was a task and explanation here to empower SREs to handle the backports (and any similar log spam that may arise) in my absence.

Event Timeline

cscott renamed this task from Logspam from Proofread page to Expected logspam from ProofreadPage.Apr 16 2024, 4:09 PM
cscott updated the task description. (Show Details)

Please do apply the 1.43.0-wmf.1 backport ASAP so we don't have any issues w/ log spam.

Change #1020282 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] [Parser] Add deprecated Parser::$mTemplatePath property

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

Change #1020284 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/extensions/LabeledSectionTransclusion@master] The dynamic Parser::$mTemplatePath property has been made actual

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

Change #1020250 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/extensions/ProofreadPage@master] Workaround dynamic Parser::$proofreadRenderingPages property

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

@cscott and I are chatting and we may just suppress the deprecation (and backport that one patch to Parser.php) instead of having to backport a series of patches. We'll let all these change right the next train and in the meantime, see if there are other instances that trigger this deprecation.

Change #1020293 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] [Parser] Temporarily disable deprecation warnings for dynamic properties

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

Change #1020231 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@wmf/1.43.0-wmf.1] [Parser] Temporarily disable deprecation warnings for dynamic properties

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

Ok, here's the status:

  1. The root cause is that some extensions which use dynamic properties of $parser aren't included in (or aren't adequately tested by) the gated-extensions CI, so there's a risk of log spam about dynamic properties this week during the train.
  2. As mentioned above, I'm traveling to the MediaWiki Users and Developers Conference tonight-Friday this week, so I won't necessarily be available to deal with these in a timely manner.
  3. The "proper" fix to any logspam found involves (a) a new phab task to record the need to eventually remove the newly added property (these should be children of T343227), (b) adding the dynamic property as a real property of Parser, and (c) patching the extension itself to replace any unset($parser->dynamicProperty) with $parser->dynamicProperty = null since after the unset even a declared property will become "dynamic" again and start to trigger warnings. Also phan often has "undeclared property" suppressions that then start to fail once the property /actually exists/ and so to unbreak the extension's CI those need to be removed.
  4. One option is the backport the 4 patches to 1.43-wmf.1 and then either suppress any other logspam found during the train (it is harmless) or else backport additional pairs of patches as in item 3 above: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1020282 and https://gerrit.wikimedia.org/r/c/mediawiki/extensions/LabeledSectionTransclusion/+/1020284 for LST; and https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1020249 and https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ProofreadPage/+/1020250 for ProofreadPage.
  5. The other (preferred) option is to backport https://gerrit.wikimedia.org/r/1020231 to 1.43.0-wmf.1 to temporarily disable the deprecation warnings for 1.43.0-wmf.1. The ProofreadPage/LST patches will ride the train on 1.43.0-wmf.2 along with re-enabled deprecation warnings -- and if any further Bad Extensions are found, I will be back from the conference and available to patch and backport to fix them (or we can cherry-pick the "temporarily disable deprecation warnings" patch and rinse and repeat.)

Change #1020293 abandoned by C. Scott Ananian:

[mediawiki/core@master] [Parser] Temporarily disable deprecation warnings for dynamic properties

Reason:

cherry-picked, but we don't need to merge and immediately revert on master

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

Change #1020231 merged by jenkins-bot:

[mediawiki/core@wmf/1.43.0-wmf.1] [Parser] Temporarily disable deprecation warnings for dynamic properties

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

Mentioned in SAL (#wikimedia-operations) [2024-04-16T18:26:01Z] <dancy@deploy1002> Started scap: Backport for [[gerrit:1020231|[Parser] Temporarily disable deprecation warnings for dynamic properties (T362692)]]

Mentioned in SAL (#wikimedia-operations) [2024-04-16T18:29:05Z] <dancy@deploy1002> cscott and dancy: Backport for [[gerrit:1020231|[Parser] Temporarily disable deprecation warnings for dynamic properties (T362692)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-04-16T18:48:57Z] <dancy@deploy1002> Finished scap: Backport for [[gerrit:1020231|[Parser] Temporarily disable deprecation warnings for dynamic properties (T362692)]] (duration: 22m 56s)

cscott claimed this task.

After the backport, tested https://test.wikipedia.org/wiki/User:Cscott/LST?useparsoid=0&action=purge and https://test.wikipedia.org/wiki/User:Cscott/LST?useparsoid=1&action=purge when 1.43-wmf.1 was on testwikis and couldn't trigger the deprecation warning, so calling this fixed.

The warning was disabled on 1.43-wmf.1 but not on master, so the ProofreadPage and LST patches will ride the 1.43-wmf.2 train along with the re-enabled deprecation warnings.

Change #1020282 merged by jenkins-bot:

[mediawiki/core@master] [Parser] Add deprecated Parser::$mTemplatePath property

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

Change #1020284 merged by jenkins-bot:

[mediawiki/extensions/LabeledSectionTransclusion@master] The dynamic Parser::$mTemplatePath property has been made actual

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

Change #1020250 merged by jenkins-bot:

[mediawiki/extensions/ProofreadPage@master] Workaround dynamic Parser::$proofreadRenderingPages property

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

Change #1021798 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/extensions/ProofreadPage@REL1_42] Workaround dynamic Parser::$proofreadRenderingPages property

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

Change #1021799 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@REL1_42] [Parser] Add deprecated Parser::$mTemplatePath property

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

Change #1021800 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/extensions/LabeledSectionTransclusion@REL1_42] The dynamic Parser::$mTemplatePath property has been made actual

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

Change #1021799 merged by jenkins-bot:

[mediawiki/core@REL1_42] [Parser] Add deprecated Parser::$mTemplatePath property

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

Change #1021798 merged by Arlolra:

[mediawiki/extensions/ProofreadPage@REL1_42] Workaround dynamic Parser::$proofreadRenderingPages property

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

Change #1021800 merged by jenkins-bot:

[mediawiki/extensions/LabeledSectionTransclusion@REL1_42] The dynamic Parser::$mTemplatePath property has been made actual

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