Page MenuHomePhabricator

Migrate onthisday feed from restbase to wikifeeds
Closed, ResolvedPublic

Description

In order to migrate the onthisday feed endpoint we need to:

  • /feed/onthisday/{type}/{mm}/{dd}
    • Reimplement the logic under onthisday.js to wikifeeds as a standalone endpoint
    • Ensure that config on wikifeeds serves the same headers

Event Timeline

While working on remapping the restbase /feed/onthisday URLs to wikifeeds backend URLs it looks there is a relatively similar mapping existing:

  • RESTBase URLs
    • /api/rest_v1/feed/onthisday/{type}/{mm}/{dd}
    • {domain}/v1/feed/onthisday/{type}/{mm}/{dd}

Also it looks like there is handling for type=all that aggregates all the subrequests.
I need to run the same smoke tests we did for T336759 to double check that matching responses give the exact same output.

From diffs in smoketests:

  • No diffs found betweens restbases onthisfeed and wikifeeds native responses
  • For type=all
    • there shows up a latency increase
    • the implementation of type=all in restbase and wikifeeds is a bit different. Wikifeeds waits for a few requests before returning the responses.

We might need to migrate only the type=all from restbase to wikifeeds which is very similar with what we've already done for featured feeds.

From a quick look for all requests except for type=all this is the latency metrics:

Via RESTBase:

In [68]: df["restbaseElapsedMs"].dropna().quantile([0.5, 0.75, 0.95, 0.99])
Out[68]:
0.50    1623.88400
0.75    2344.16500
0.95    3366.63270
0.99    4234.72392
Name: restbaseElapsedMs, dtype: float64

Wikifeeds directly

In [67]: df["wikifeedsElapsedMs"].dropna().quantile([0.5, 0.75, 0.95, 0.99])
Out[67]:
0.50    1460.61100
0.75    2099.72100
0.95    2928.22350
0.99    3895.99956
Name: wikifeedsElapsedMs, dtype: float64

So it looks like there is no latency problem (we even see performance improvement).

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

[mediawiki/services/wikifeeds@master] Implement aggregate endpoint for /onthisday/all

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

Change 929683 merged by jenkins-bot:

[mediawiki/services/wikifeeds@master] Implement aggregate endpoint for /onthisday/all

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