Page MenuHomePhabricator

Allow API consumer to express a timeframe in hours
Closed, ResolvedPublic

Description

/rest_v1/feed/trending/edits/3
should only show pages that have we began to see edits for in the last 3 hours.
For example it shouldn't show pages that started being edited 18 hours ago.

This is important as otherwise the trending API will always show the most interesting articles in a 24 hour period which isn't great for use cases such as push notifications and more real-time updates.

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptJan 30 2017, 8:51 PM

Change 335370 had a related patch set uploaded (by Jdlrobson):
Trending takes optional period parameter

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

New patch takes into account limiting storage requirements.

New patch takes into account limiting storage requirements.

We're not storing the trending responses in Cassandra, only caching in Varnish for a bit. I think allowing any number from 1 to 24 is OK.

Change 335370 merged by jenkins-bot:
Trending takes optional filter parameter

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

Ping me once it's deployed, I'll modify the RESTBase part

Ping me once it's deployed, I'll modify the RESTBase part

Sure, FYI, deployment is at this time blocked by T156687: Delay repooling trending service after a restart.

Jdlrobson added a subscriber: MBinder_WMF.

Going to keep this open until deployment. @MBinder_WMF please don't carry over to sprint 92.

Change 341361 had a related patch set uploaded (by jdlrobson):
[mediawiki/services/trending-edits] Decay based on period parameter

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

Change 341361 merged by jenkins-bot:
[mediawiki/services/trending-edits] Decay based on period parameter

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

Mentioned in SAL (#wikimedia-operations) [2017-03-08T00:16:25Z] <mobrovac@tin> Finished deploy [trending-edits/deploy@88e2f74]: Deploy changes for T156666 T156680 T159486 T156411 (duration: 06m 58s)

And here's the PR for public part: https://github.com/wikimedia/restbase/pull/770

See https://phabricator.wikimedia.org/T156411#3082622 which blocks testing.

You can't see it inlet obviously, but all's good in prod, checked.