Page MenuHomePhabricator

[BUG] On this day occasionally duplicates events
Closed, ResolvedPublic

Description

How many times were you able to reproduce it?

Always

Steps to reproduce

  1. Scroll down to On this day for Thursday, September 14
  2. Look at the last two events for 19 years ago, 1998

Expected results

That same event shouldn’t be duplicated

Actual results

There are 2 cards for the same event

Screenshots

Environments observed

App version: 5.6.0 (1195)
OS versions: 11
Device model: iPhone 7 Plus
Device language: EN

Regression?

Tag task with Regression

Details

Related Gerrit Patches:
mediawiki/services/restbase : masterFix duplicate pages in some on-this-day results.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 15 2017, 2:38 AM
JMinor triaged this task as Low priority.Oct 30 2017, 6:29 PM
Mhurd claimed this task.Nov 15 2017, 8:02 PM
bearND added a subscriber: bearND.EditedNov 15 2017, 8:25 PM

https://en.wikipedia.org/api/rest_v1/feed/onthisday/events/09/14 has two instances of 'MCI_Inc.' because WorldCom redirects to MCI_Inc. (This event data comes from https://en.wikipedia.org/wiki/September_14#Events.)

To solve this we could look to suppress duplicate titles in an onthisday entry.

Mhurd added a comment.Nov 17 2017, 8:40 PM

Per conversation with @bearND :

Look at https://github.com/wikimedia/restbase/blob/master/v1/onthisday.js#L29 as place to try post title-hydration de-dupe.

Look at https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/RESTBase_services_for_apps#Setting_up_a_local_Parsoid_instance for getting local instance to do hydration for testing.

Mhurd added a comment.Nov 17 2017, 8:42 PM

@bearND ah oops thanks!!

Change 402155 had a related patch set uploaded (by Mhurd; owner: montehurd):
[mediawiki/services/restbase@master] Fix duplicate pages in some on-this-day results.

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

Mhurd added a comment.Jan 5 2018, 1:20 AM

@bearND Heya! I push a patch for this... finally got local restbase to play nice :)

Mhurd added a comment.Jan 5 2018, 1:24 AM

@bearND There may be a simpler way to dip into the promisified response to access the pages...

Change 402155 abandoned by Mhurd:
Fix duplicate pages in some on-this-day results.

Reason:
Per Mholloway's reminder, I need to use a PR for this proj.

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

Mhurd added a subscriber: Mholloway.Jan 5 2018, 1:49 AM

@Mholloway Here's the PR on github:
https://github.com/wikimedia/mediawiki-services-restbase/pull/1

Is this the right place? Odd that it would be PR 1...

bearND added a comment.EditedJan 5 2018, 2:08 AM

@Mhurd It's https://github.com/wikimedia/restbase.
You can remove the Change-Id in the PRs. That's a Gerrit thing.

Mhurd added a comment.Jan 5 2018, 2:32 AM

@Mholloway @bearND
Ok this should be correct finally :)
https://github.com/wikimedia/restbase/pull/937

Should https://github.com/wikimedia/mediawiki-services-restbase mirror be removed to avoid future confusion?

Not sure. That's really up to the Services team.

Stashbot added a subscriber: Stashbot.

Mentioned in SAL (#wikimedia-operations) [2018-01-10T12:55:37Z] <mobrovac@tin> Started deploy [restbase/deploy@a2aabfb]: API: add top-by-country, change recommendation route, fix duplicates in onthisday - T181520 T170877 T175974

Mentioned in SAL (#wikimedia-operations) [2018-01-10T13:03:37Z] <mobrovac@tin> Finished deploy [restbase/deploy@a2aabfb]: API: add top-by-country, change recommendation route, fix duplicates in onthisday - T181520 T170877 T175974 (duration: 08m 00s)

mobrovac added a subscriber: mobrovac.

The fix for RESTBase has been deployed.