Page MenuHomePhabricator

Move feeds from behind RESTBase to the API Gateway
Closed, ResolvedPublic1 Estimated Story Points

Description

As a part of T262315 we need to transfer the wikifeeds service from behind RESTBase. T263133 has dramatically simplified the RESTBase portion of the feed assembly, so there's not much left for RESTBase to do.

Here's the plan:

  1. Review the wikifeeds service API compared to feed exposed by RESTBase. The wikifeeds service is currently lacking the aggregate endpoint (the /feed/featured in RESTBase), it should be added. In general, we will be capable of remapping parameters in the gateway slightly, but it's better to make the service expose the API as close to the gateway API. The whole service will be exposed under a single prefix, e.g. `/feed/.
  2. Implement any modifications to the wikifeeds API, together with modifying RESTBase backend requests
  3. Expose wikifeeds over API Gateway, deprecate RESTBase feeds API
  4. Eventually, drop RESTBase feeds API.

Event Timeline

Just confirming that Platform Engineering will be handling this, is that correct?

Just confirming that Platform Engineering will be handling this, is that correct?

Might need some code review or get your opinions on something from time to time, but generally yes.

@WDoranWMF, would it make sense to create a vision table for this initiative, so we're documenting our work consistently on MediaWiki?

Naike set the point value for this task to 1.Oct 2 2020, 9:42 AM

After checking the codebase on how wikifeeds is defined on restbase these are the findings:

  • wikifeeds endpoint are defined in feed.js
  • it is built in a way to combine multiple requests to wikifeeds endpoints (/page/featured, /page/most-read, /media/image/featured, /page/news, /feed/onthisday) to a single response
  • On the backend service side the outgoing requests to restbase are
    • /page/html (parsoid)
    • /page/summary (mobileapps)
    • aqs metrics

In order to migrate the feeds endpoint outside of RESTBase we need to point the backend service to the alternative services:

  • Parsoid on MW REST Api
  • Sumarry on mobileapps
  • TBD for AQS

On top of that, the custom response defined on feed.js needs to be re-implemented in the wikifeeds service level.

daniel triaged this task as Medium priority.Jun 5 2023, 6:14 PM