Page MenuHomePhabricator

list=mostviewed returning zero results on enwiki
Open, Needs TriagePublicBUG REPORT

Description

A recently deployed change to Recommendation-API had to be rolled back because list=mostviewed started returning zero results after midnight UTC today, causing an endpoint check to alert on an unexpected 404 response (T216750#5508340).

A zero-result response from list=mostviewed seems like a bug because the PageViewInfo code takes steps to work around the normal AQS pageviews processing delay, and because there's no indication in the API docs that a zero-result response is to be expected.

Steps to Reproduce:

Actual Results: zero-page result

Expected Results: nonzero-page result

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 20 2019, 1:31 AM
Mholloway updated the task description. (Show Details)Sep 20 2019, 1:33 AM
Siznax added a subscriber: Siznax.Nov 8 2019, 5:48 PM
Siznax added a comment.Nov 8 2019, 5:50 PM

Still broken! Can we assign someone to fix this, or is there an alternative?

According to https://www.mediawiki.org/wiki/Developers/Maintainers , PageViewInfo is unfortunately unmaintained software.
https://www.mediawiki.org/wiki/Code_stewardship_reviews covers how you could escalate this problem.

@Tgr do you know if this one is a simple fix or does it look more complicated? I incidentally was trying the API out this morning and happened to come across this task.

I imagine that updating the module to accept a date parameter would help, and hopefully wouldn't require extensive code changes. It would be a pretty useful thing to have in any case.

Tgr added a comment.Feb 13 2020, 8:22 PM

Oops, sorry, I missed this. Presumably we should just walk back an extra day if there's no data yet; AQS is unpredictable. (More annoyingly, it does not make any difference between "0 views" and "no data loaded yet" so prop=pageviews will always be temporarily broken if this happens. But for most viewed it's clear that no data means not loaded yet.) That's conceptually an easy change but the structure of WikimediaPageViewService makes it a bit annyoing.

Alternatively, just change WikimediaPageViewService::lastCompleteDay to be slightly older, that's a trivial change.

Change 582075 had a related patch set uploaded (by Mholloway; owner: Michael Holloway):
[mediawiki/services/recommendation-api@master] Skip flaky endpoint check depending on pageview data

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

Change 582075 merged by jenkins-bot:
[mediawiki/services/recommendation-api@master] Skip flaky endpoint check depending on pageview data

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