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.

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.

Jdlrobson claimed this task.Feb 8 2017, 8:14 PM

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

Still need to test in production...

Stashbot added a subscriber: Stashbot.

Mentioned in SAL (#wikimedia-operations) [2017-03-08T00:09:27Z] <mobrovac@tin> Started deploy [trending-edits/deploy@88e2f74]: Deploy changes for T156666 T156680 T159486 T156411

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)

mobrovac closed this task as "Resolved".Wed, Mar 8, 12:35 AM

Deployed, resolving

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.

Pchelolo closed this task as "Resolved".Wed, Mar 8, 5:53 PM
Pchelolo edited projects, added Services (done); removed Services (watching).