Page MenuHomePhabricator

REST: Audience Designations - publish modules to REST Sandbox by default
Closed, ResolvedPublic3 Estimated Story Points

Description

tl;dr: publishing REST modules to the REST Sandbox currently requires a config change/deploy. Make publishing the default for audience designations that allow it. Adjust overrides to maintain existing production behavior.

Details

Publishing a MW REST API module to the REST Sandbox currently requires adding an entry to the RestSandboxSpecs config variable. However, the most common case is that module authors want their module published. Change the system so that enabled modules are automatically published. Special-case modules that should not be published can prevent this via the RestModuleOverrides config variable.

The set of published modules is determined in the ModuleManager::getApiSpecDefs() function. Right now, this function combines the hard-coded set of specs in ModuleManager::CORE_SPECS with the specs listed in RestSandboxSpecs.

Change ModuleManager::getApiSpecDefs() to include all enabled modules, unless their audience designation or RestModuleOverrides indicates they should not be published.

The mapping of audience designations to modes (aka functionality sets) can also be changed:

  • published => published
  • beta => published, group "beta"
  • internal => published, group "internal"
Notes

We have one special case. The site.v1 module should not be published in the REST Sandbox. Before merging the core change that will be created as part of this task, create and deploy a change to RestModuleOverrides marking site.v1 as "discoverable".

Checklist
  • create/deploy config change to prevent the special case(s) from being published in undesired places
  • change ModuleManager::getApiSpecDefs() behavior per the task description
  • change the designation/functionality set mapping per the task description

Event Timeline

HCoplin-WMF set the point value for this task to 3.Apr 23 2026, 3:33 PM

Notes from estimation:

  • Getting rid of the current way of adding modules will have to go through a full deprecation process (which will be a separate ticket); this will exist in parallel for a period of time.
  • The majority of the work will happen in ModuleManager.
  • This assumes that the work to set and override audiences already exists.

Change #1302312 had a related patch set uploaded (by BPirkle; author: BPirkle):

[mediawiki/core@master] REST: enable and publish modules by default, remove experiments

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

BPirkle changed the task status from Open to In Progress.Jun 16 2026, 2:25 PM
BPirkle claimed this task.

Change #1303004 had a related patch set uploaded (by BPirkle; author: BPirkle):

[operations/mediawiki-config@master] REST: Adjust key of Reading Lists OpenAPI spec in RestSandboxSpecs

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

Change #1303004 merged by jenkins-bot:

[operations/mediawiki-config@master] REST: Adjust key of Reading Lists OpenAPI spec in RestSandboxSpecs

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

Mentioned in SAL (#wikimedia-operations) [2026-06-18T13:23:33Z] <ladsgroup@deploy1003> Started scap sync-world: Backport for [[gerrit:1303004|REST: Adjust key of Reading Lists OpenAPI spec in RestSandboxSpecs (T422771)]]

Mentioned in SAL (#wikimedia-operations) [2026-06-18T13:25:35Z] <ladsgroup@deploy1003> ladsgroup, bpirkle: Backport for [[gerrit:1303004|REST: Adjust key of Reading Lists OpenAPI spec in RestSandboxSpecs (T422771)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-06-18T13:30:29Z] <ladsgroup@deploy1003> Finished scap sync-world: Backport for [[gerrit:1303004|REST: Adjust key of Reading Lists OpenAPI spec in RestSandboxSpecs (T422771)]] (duration: 06m 56s)

Change #1302312 merged by jenkins-bot:

[mediawiki/core@master] REST: enable and publish modules by default, remove experiments

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

Change #1304173 had a related patch set uploaded (by BPirkle; author: BPirkle):

[operations/mediawiki-config@master] REST: remove obsolete and unnecessary config entries

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

Change #1304175 had a related patch set uploaded (by BPirkle; author: BPirkle):

[operations/mediawiki-config@master] REST: adjust analytics and wikifunctions REST Sandbox visibility

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

Change #1304175 merged by jenkins-bot:

[operations/mediawiki-config@master] REST: adjust analytics and wikifunctions REST Sandbox visibility

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

Mentioned in SAL (#wikimedia-operations) [2026-06-22T20:27:18Z] <bpirkle@deploy1003> Started scap sync-world: Backport for [[gerrit:1304175|REST: adjust analytics and wikifunctions REST Sandbox visibility (T422770 T423058 T422771)]]

Mentioned in SAL (#wikimedia-operations) [2026-06-22T20:29:18Z] <bpirkle@deploy1003> bpirkle: Backport for [[gerrit:1304175|REST: adjust analytics and wikifunctions REST Sandbox visibility (T422770 T423058 T422771)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-06-22T20:34:48Z] <bpirkle@deploy1003> Finished scap sync-world: Backport for [[gerrit:1304175|REST: adjust analytics and wikifunctions REST Sandbox visibility (T422770 T423058 T422771)]] (duration: 07m 30s)

Change #1304173 merged by jenkins-bot:

[operations/mediawiki-config@master] REST: remove obsolete and unnecessary config entries

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

Mentioned in SAL (#wikimedia-operations) [2026-06-30T13:42:42Z] <bpirkle@deploy1003> Started scap sync-world: Backport for [[gerrit:1304173|REST: remove obsolete and unnecessary config entries (T422770 T423058 T422771)]]

Mentioned in SAL (#wikimedia-operations) [2026-06-30T13:44:57Z] <bpirkle@deploy1003> bpirkle: Backport for [[gerrit:1304173|REST: remove obsolete and unnecessary config entries (T422770 T423058 T422771)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-06-30T13:53:04Z] <bpirkle@deploy1003> Finished scap sync-world: Backport for [[gerrit:1304173|REST: remove obsolete and unnecessary config entries (T422770 T423058 T422771)]] (duration: 10m 21s)

Marking as resolved to close out sprint.