- Remove restbase for anything but maths API
- Default routing to the rest-gateway
Description
Details
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Clement_Goubert | T413438 [Hypothesis] 5.2.2c: Reroute API Portal Endpoints | |||
| Resolved | Clement_Goubert | T422937 Cleanup ATS configuration for API paths |
Event Timeline
Change #1290019 had a related patch set uploaded (by Clément Goubert; author: Clément Goubert):
[operations/puppet@production] gateway-check: inference post-migration cleanup
Change #1290019 merged by Clément Goubert:
[operations/puppet@production] gateway-check: inference post-migration cleanup
Change #1293699 had a related patch set uploaded (by Clément Goubert; author: Clément Goubert):
[operations/puppet@production] trafficserver: Default most APIs to rest-gateway
Change #1293703 had a related patch set uploaded (by Clément Goubert; author: Clément Goubert):
[operations/puppet@production] trafficserver: Route /media/math directly to restbase
Change #1293704 had a related patch set uploaded (by Clément Goubert; author: Clément Goubert):
[operations/puppet@production] trafficserver: Remove all gateway-check config
Stop me if I'm wrong, but:
- All API paths under /w/rest.php, /w/api.php and api.wikimedia.org have been migrated to go through the rest-gateway
- The only path under /api/rest_v1 still going to RESTBase is /api/rest_v1/media/math
Which means:
- We can default everything in 1 but the api.wikimedia.org wiki to go through the rest-gateway in ATS
- We can catch /api/rest_v1/media/math early and send it to RESTBase, and default everything else to the rest-gateway
With the first two patches above, we completely remove the need for gateway-check.lua from the ATS plugin stack.
The third patch removes all route-specific configuration from gateway-check.lua.conf. I'm keeping the files in puppet so that (when|if) we start moving /api/rest_v1/media/math away from RESTBase we don't have to hunt for the fractional routing logic in old git commits.
Mentioned in SAL (#wikimedia-operations) [2026-06-02T09:34:23Z] <claime> Disabling puppet on A:cp-text for ATS rest-gateway cleanup - T422937
Change #1293699 merged by Clément Goubert:
[operations/puppet@production] trafficserver: Default most APIs to rest-gateway
Mentioned in SAL (#wikimedia-operations) [2026-06-02T09:37:40Z] <claime> Running puppet on cp6010 and cp6011 - T422937
Mentioned in SAL (#wikimedia-operations) [2026-06-02T09:56:11Z] <claime> Enabling puppet on A:cp-text for ATS rest-gateway cleanup - T422937
Mentioned in SAL (#wikimedia-operations) [2026-06-02T10:27:14Z] <claime> Disabling puppet on A:cp-text for ATS rest-gateway cleanup - T422937
Change #1293703 merged by Clément Goubert:
[operations/puppet@production] trafficserver: Route /media/math directly to restbase
Mentioned in SAL (#wikimedia-operations) [2026-06-02T10:42:12Z] <claime> Enabling puppet on A:cp-text for ATS rest-gateway cleanup - T422937
ATS config is now clean:
- Maths is the only API path still going to restbase, and is now in its own configuration stanza.
- Everything else is routed to the rest-gateway.
Future steps:
Once apiportalwiki is shut down as part of T415293, we can think about catching api.wikimedia.org/wiki/ early at the edge and do the redirect there instead of down the stack. This means we can then refactor the 3 stanzas for /core, /feed, and /service into one single stanza.
I haven't seen any issues in graphs or logs, but please feel free to reopen or attach
Change #1293704 merged by Clément Goubert:
[operations/puppet@production] trafficserver: Remove all gateway-check config