Page MenuHomePhabricator

Update Wikibase to use the new HookContainer/HookRunner system
Open, Needs TriagePublic

Description

Implement the Hook system added in MediaWiki 1.35 in the extensions, see Hooks.md for documentation.

  • Create HookRunner class and the hook handler interfaces
  • Use hook handlers
    • client
      • core hooks
      • CirrusSearch hooks
      • Echo hoooks
      • Scribunto hooks
      • Own hooks
    • repo
      • core hooks
      • MobileFrontend hooks
      • Vector hook
      • Own hooks

Related Objects

Event Timeline

Change 928175 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/Wikibase@master] Expand/Create HookRunner classes and create hook handler interfaces

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

This should probably be a Wikibase ADR, though I’m not sure which team at WMDE is responsible for it (probably Wikibase Product Platform Team WPP?).

Change 928175 abandoned by Umherirrender:

[mediawiki/extensions/Wikibase@master] Expand/Create HookRunner classes and create hook handler interfaces

Reason:

Seems to need some architectural approval for this group of extension. Maybe better done in small patch sets once approved.

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

Change 962195 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/Wikibase@master] client: Move GetDoubleUnderscoreIDs hook to HookHandlers

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

Change 962196 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/Wikibase@master] client: Move LoginFormValidErrorMessagesHandler to HookHandlers

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

Change 962197 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/Wikibase@master] client: Move MaintenanceShellStart hook to TrivialHookHandler

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

Change 962197 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] client: Move MaintenanceShellStart hook to TrivialHookHandler

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

Change 962195 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] client: Move GetDoubleUnderscoreIDs hook to HookHandlers

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

Change 962196 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] client: Move LoginFormValidErrorMessagesHandler to HookHandlers

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

Just going to quote these two comments again…

This should probably be a Wikibase ADR, though I’m not sure which team at WMDE is responsible for it (probably Wikibase Product Platform Team WPP?).

Change 928175 abandoned by Umherirrender:

[mediawiki/extensions/Wikibase@master] Expand/Create HookRunner classes and create hook handler interfaces

Reason:

Seems to need some architectural approval for this group of extension. Maybe better done in small patch sets once approved.

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

I still think this task should have a decision by Wikibase developers. What the task doesn’t need is untested and broken patches (T347818) that are uploaded on a Sunday evening and merged less than two hours later, thus ensuring that no WMDE developer can possibly review them in time. (The brokenness of the MaintenanceShellStart patch would’ve been quite easily testable by a developer who knew what the hook does – just pop open a maintenance shell.)

This should probably be a Wikibase ADR, though I’m not sure which team at WMDE is responsible for it (probably Wikibase Product Platform Team WPP?).

Does this apply to Wikibase only? Or also for other deployed extensions from the eco system?
Extensions like:

I still think this task should have a decision by Wikibase developers. What the task doesn’t need is untested and broken patches (T347818) that are uploaded on a Sunday evening and merged less than two hours later, thus ensuring that no WMDE developer can possibly review them in time. (The brokenness of the MaintenanceShellStart patch would’ve been quite easily testable by a developer who knew what the hook does – just pop open a maintenance shell.)

Wikibase already uses HookHandlers, I was not aware that converting already-existing handlers to use this function is also covered by that.

This should probably be a Wikibase ADR, though I’m not sure which team at WMDE is responsible for it (probably Wikibase Product Platform Team WPP?).

Does this apply to Wikibase only? Or also for other deployed extensions from the eco system?
Extensions like:

I would probably include the extensions WMDE is primarily responsible for – such as ArticlePlaceholder, WikibaseLexeme, WikibaseQualityConstraints, WikimediaBadges. Wikibase(Lexeme)CirrusSearch and WikibaseMediaInfo are primarily maintained by the WMF as far as I’m aware, though it’s still not uncommon for us to merge changes there.