Page MenuHomePhabricator

Remove $wgVirtualRestConfig from MediaWiki
Closed, ResolvedPublic

Description

Background

VirtualRESTService was deprecated and has been removed from MediaWiki core since Oct 2023 (see T338921 and subtasks).

Despite MediaWiki no longer declaring or recognising $wgVirtualRestConfig, we still set in wmf-config. And while that would ideally be just an unused setting that we can safely remove, other code has begun to rely on it for some indirect purposes. The good news is that (afaik) none of these actually end up making requests to it in a way that expects anything from RESTBase. The bad news is, there are piles of hacks that start and end without thinking about RESTBase, but somewhere in the middle, rely on the complex array structure behind $wgVirtualRestConfig as currently set in prouduction, which makes the code hard to understand, hard to test/debug locally, and hard to change.

Scope

  • Math extension: reads VirtualRestConfig. T349582#12113039
  • Collection extension: reads VirtualRestConfig.
  • MediaWiki core Setup.php: writes wgVirtualRestConfig.
  • wmf-config: writes wgVirtualRestConfig.

Event Timeline

Change #1329425 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/extensions/Collection@master] Remove last remnant of $wgVirtualRestConfig

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

aaron triaged this task as Medium priority.Wed, Aug 26, 8:06 AM

Change #1329425 merged by jenkins-bot:

[mediawiki/extensions/Collection@master] Remove last remnant of $wgVirtualRestConfig

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

Change #1334028 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/core@master] Remove unused $wgVirtualRestConfig

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

Change #1334032 had a related patch set uploaded (by Krinkle; author: Krinkle):

[operations/mediawiki-config@master] Remove the last vestiges of $wgVirtualRestConfig

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

Change #1334032 merged by jenkins-bot:

[operations/mediawiki-config@master] Remove the last vestiges of $wgVirtualRestConfig

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

Mentioned in SAL (#wikimedia-operations) [2026-09-02T21:50:39Z] <krinkle@deploy1003> Started scap sync-world: Backport for [[gerrit:1334068|Extract MathJax DOM filter into a separate file (T435274)]], [[gerrit:1334070|Respect contextual binomial sizing (T434477 T418144 T401718)]], [[gerrit:1334032|Remove the last vestiges of $wgVirtualRestConfig (T436054)]]

Mentioned in SAL (#wikimedia-operations) [2026-09-02T21:54:57Z] <krinkle@deploy1003> krinkle: Backport for [[gerrit:1334068|Extract MathJax DOM filter into a separate file (T435274)]], [[gerrit:1334070|Respect contextual binomial sizing (T434477 T418144 T401718)]], [[gerrit:1334032|Remove the last vestiges of $wgVirtualRestConfig (T436054)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-09-02T22:04:53Z] <krinkle@deploy1003> Finished scap sync-world: Backport for [[gerrit:1334068|Extract MathJax DOM filter into a separate file (T435274)]], [[gerrit:1334070|Respect contextual binomial sizing (T434477 T418144 T401718)]], [[gerrit:1334032|Remove the last vestiges of $wgVirtualRestConfig (T436054)]] (duration: 14m 14s)

Change #1334028 merged by jenkins-bot:

[mediawiki/core@master] Remove unused $wgVirtualRestConfig

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

Krinkle claimed this task.
Krinkle updated the task description. (Show Details)