Page MenuHomePhabricator

Cleanup ATS configuration for API paths
Closed, ResolvedPublic

Description

  • Remove restbase for anything but maths API
  • Default routing to the rest-gateway

Event Timeline

Clement_Goubert triaged this task as Medium priority.
Clement_Goubert moved this task from Inbox to Scheduled (this Q) on the ServiceOps new board.

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

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

Change #1290019 merged by Clément Goubert:

[operations/puppet@production] gateway-check: inference post-migration cleanup

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

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

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

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

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

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

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

@HCoplin-WMF @hnowlan

Stop me if I'm wrong, but:

  1. All API paths under /w/rest.php, /w/api.php and api.wikimedia.org have been migrated to go through the rest-gateway
  2. The only path under /api/rest_v1 still going to RESTBase is /api/rest_v1/media/math

Which means:

  1. We can default everything in 1 but the api.wikimedia.org wiki to go through the rest-gateway in ATS
  2. 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

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

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

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

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

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