Page MenuHomePhabricator

[Bug] /feed/featured/ doesn't include featured article
Open, LowPublic

Description

Steps to Reproduce

  1. Get feed content for German Wikipedia on 07/01/2019 - https://de.wikipedia.org/api/rest_v1/feed/featured/2019/07/01
  2. Look for "tfa" in the response

Expected Results

Actual Results

  • "tfa" is not included

Environments Observed

  • Production

Additional notes

Event Timeline

Restricted Application added a project: Wikipedia-iOS-App-Backlog. · View Herald TranscriptJul 5 2019, 2:30 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Mholloway added subscribers: bearND, Mholloway.EditedJul 5 2019, 9:26 PM

I did some testing and confirmed that this is because of some special handling for dewiki. There is a special rule to only go as far back as three days when searching for featured articles for dewiki, apparently because of how it uses days of the week in related templates[1]. The downside (as illustrated here) is that if the feed response stored in RESTBase for a given date needs to be regenerated for one reason or another after more than three days have passed, it'll be missing the tfa property. I guess this is probably a WONTFIX but I'll give @bearND a chance to chime in when he gets back.

[1] https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/services/mobileapps/+/36cb3014b15f9e31df8fc2364a7197624cf9a527

To clarify the problem, without the check, the internal MCS tfa endpoint responses for 6/24, 6/17, 6/10, etc., currently also (inappropriately) return Kerala, the 7/01 featured article.

bearND added a subscriber: Pchelolo.EditedJul 11 2019, 6:19 PM

Yes, @Mholloway is correct. I remember having to work around this issue. Not sure what the latest about storing these kinds of results is but I suspect we don't store featured feed results anymore and just do Varnish caching. Adding @Pchelolo to confirm.

Ideally the dewiki community would have their TFA templates in a way that would make any day of the previous years addressable, like it's done on enwiki.

Could we increase the cutoff from three days to six?

I think I ran into issues with that but I'm not sure anymore. That would require some testing.

LGoto triaged this task as Low priority.Jul 17 2019, 3:49 PM
LGoto moved this task from Needs triage to Backlog on the Product-Infrastructure-Team-Backlog board.
Tgr added a subscriber: Tgr.Jul 17 2019, 3:54 PM

The last revision of the template that's not after the target date could be used to retrieve the contents. Not sure if it's worth the effort.