Page MenuHomePhabricator

[CLIENT] Investigate potential references to wrong ParserOutput in WikibaseClient code
Closed, ResolvedPublic

Description

In T255706, we eventually figured out that some usage tracking was getting lost during Parsoid parses because Scribunto_LuaWikibaseEntityLibrary was holding a reference to an outdated ParserOutput instance (and adding entity usage to that instead of the current ParserOutput instance). We should investigate whether the same issue exists in:

  • Scribunto_LuaWikibaseLibrary
  • Scribunto_LuaWikibaseLexemeLibrary
  • Scribunto_LuaWikibaseLexemeEntityLexemeLibrary
  • Scribunto_LuaWikibaseLexemeEntityFormLibrary
  • Scribunto_LuaWikibaseLexemeEntitySenseLibrary
  • Scribunto_LuaWikibaseMediaInfoLibrary
  • Scribunto_LuaWikibaseMediaInfoEntityLibrary
  • Wikibase\Client\DataAccess\ParserFunctions\Runner ({{#statements:}} and {{#property:}} parser functions)

And, if the issue does exist, fix it (TBD whether that’s part of this task or a separate one).

Event Timeline

ArthurTaylor renamed this task from Investigate potential references to wrong ParserOutput in WikibaseClient code to [CLIENT] Investigate potential references to wrong ParserOutput in WikibaseClient code.Feb 2 2024, 10:54 AM

Prio Notes:

Impact AreaAffected
production / end usersyes
monitoringno
development effortsno
onboarding effortsno
additional stakeholdersyes
ArthurTaylor renamed this task from [CLIENT] Investigate potential references to wrong ParserOutput in WikibaseClient code to [CLIENT] [SW] Investigate potential references to wrong ParserOutput in WikibaseClient code.Feb 26 2024, 10:38 AM
ArthurTaylor renamed this task from [CLIENT] [SW] Investigate potential references to wrong ParserOutput in WikibaseClient code to [CLIENT] Investigate potential references to wrong ParserOutput in WikibaseClient code.Feb 28 2024, 10:16 AM

Change 1007570 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Wikibase@master] Fix references to wrong ParserOutput in UsageAccumulator for Lua

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

Change 1007571 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/WikibaseLexeme@master] Fix references to wrong ParserOutput in UsageAccumulator for Lua

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

I've made a couple of PRs here for Wikibase and WikibaseLexeme, that should cover the associated Scribunto Modules. For WikibaseMediaInfo, the changes in the Wikibase patch (plus the changes we already committed) should already be enough to prevent any issue there. It seems that for Wikibase\Client\DataAccess\ParserFunctions\Runner, the runner is creating a new renderer/usageAccumulator for every invocation - there are no singletons there to worry about (that I can see).

Change 1008448 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Wikibase@master] Remove compatibility wrapper for UsageAccumulatorFactory

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

Change 1008813 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Wikibase@master] Add strict types to touched files

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

Change 1007570 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Fix references to wrong ParserOutput in UsageAccumulator for Lua

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

Change 1007571 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Fix references to wrong ParserOutput in UsageAccumulator for Lua

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

Change 1008448 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Remove compatibility wrapper for UsageAccumulatorFactory

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

Change 1008813 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Add strict types to touched files

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

I think we can just close this task and check back on T255706 in two weeks or so; @ArthurTaylor do you agree?