Page MenuHomePhabricator

Improve error handling in Featured Article widget.
Closed, ResolvedPublic

Description

At the moment, the Featured Article widget is hard-coded to update itself every 12 hours, which is the Nyquist frequency of a daily update. However, if the widget encounters an error while fetching the featured article (e.g. network timeout), it will take another 12 hours before trying again! It needs to update itself much faster than that, in case of an error.

Also, the general update period of 12 hours may be too long altogether, since it means that the widget can potentially be up to 12 hours "behind" the actual update to the featured article. I think we can reduce this to something like 4 hours.

Event Timeline

Dbrant raised the priority of this task from to Medium.
Dbrant updated the task description. (Show Details)
Dbrant moved this task to Needs Triage on the Wikipedia-Android-App-Backlog board.
Dbrant subscribed.

This actually comes into OTRS quite often as "Featured article does not update".

I am thinking about trying the first time upon receiving the AppWidgetManager.ACTION_APPWIDGET_UPDATE broadcast (set to happen every 12 hours and wake up the device) , then starting network re-tries using exponential backoff, in no-wake-if-sleeping mode, via Alarms. For instance, try again after 1 minute, 2 minutes, 4 minutes, 8 minutes, ... 2^n, or similar pattern, until the refresh succeeds or we would be passing the next 12h update.

Maroloccio subscribed.

Removing ownership for the moment, taking a short Easter break..

Hey! I'd like to start contributing to the project and think this is a good place to start. Could i take up this issue?

Kaartic subscribed.

@FleetAdmiral I hope the developers would be happy if you helped them with this because they wouldn't have tagged this with good first task otherwise. That means that you could take up this issue happily. (hope i'm not doing anything wrong, cause i'm new too :) )

Great! I'll get started on it then.

@Kaartic The widget you're referring to here is the Featured Page widget right? (just making sure since you mentioned featured article)

@Kaartic The widget you're referring to here is the Featured Page widget right? (just making sure since you mentioned featured article)

Sorry. You seem to be pinging the wrong person. I didn't mention that it was one of the developers. As stated above, I'm new too :) Pinging the person who mentioned it on your behalf.

@Dbrant Could you please answer to the question in the previous comment, sir ?

@Kaartic Sorry, didn't realise that! Regardless, i've begun work on the bug.

@FleetAdmiral: This issue has been assigned to you a while ago.
Could you please share a status update? Are you still working (or still plan to work) on this issue? Is there anything that others could help with? If you do not plan to work on this issue anymore, please remove yourself as assignee (via Add Action...Assign / Claim in the dropdown menu) so others could work on it. Thanks a lot!

Change 383428 had a related patch set uploaded (by Jcasariego; owner: Jcasariego):
[apps/android/wikipedia@master] Modify time to update Featured Article widget

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

Change 383428 merged by jenkins-bot:
[apps/android/wikipedia@master] Modify time to update Featured Article widget

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