Page MenuHomePhabricator

Migrate wikifeeds backend calls away from rest-gateway
Closed, ResolvedPublic

Description

rest-gateway is meant for centralized routing of external API calls and should not be called by services running inside production.

Wikifeeds calls it for a couple of functions in pageviews.js:

and maybe in other places.

Would it be possible to change that to calling the page-analytics service via the service mesh?

Event Timeline

Doesn't it use these values in production? I think that would be the service mesh?

Yes but it calls restGatewayGet which routes through the rest-gateway instead of using the mesh for page-analytics to reach AQS

Change #1220621 had a related patch set uploaded (by Jgiannelos; author: Jgiannelos):

[mediawiki/services/wikifeeds@master] Replace calls to rest gateway with direct Analytics API calls

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

Change #1220629 had a related patch set uploaded (by Jgiannelos; author: Jgiannelos):

[operations/deployment-charts@master] wikifeeds: Add request definition for page analytics

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

I submitted a few patches to switchover from rest-gateway calls to page-analytics but i am not sure whether page-analytics is exposed in service mesh.
From a quick look here it looks like it isn't:
https://gerrit.wikimedia.org/g/operations/puppet/+/ce60f68445c5e474fc12257f9c131e1231b5d985/hieradata/common/profile/services_proxy/envoy.yaml#386

@Clement_Goubert Can you help me figure out which endpoint wikifeeds should be pointed to, so we stop using rest-gateway directly ?

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

Yup, will take a look soon, sorry I dropped the ball on this.

Change #1240888 had a related patch set uploaded (by Clément Goubert; author: Clément Goubert):

[operations/puppet@production] service mesh: Add page-analytics listener

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

Change #1240888 merged by Clément Goubert:

[operations/puppet@production] service mesh: Add page-analytics listener

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

I've applied the fix with the correct port to https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/1220629 so everything should be good for you to proceed once it's been +1'd and deployed.

Change #1220629 merged by jenkins-bot:

[operations/deployment-charts@master] wikifeeds: Add request definition for page analytics

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

Change #1220621 merged by jenkins-bot:

[mediawiki/services/wikifeeds@master] Replace calls to rest-gateway with direct Analytics API calls

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