Page MenuHomePhabricator

Update announcements endpoint with new article list and percentage of experiment users
Closed, ResolvedPublic

Description

We need to update the announcements endpoint to have the new article list for the experiment round of the exposure survey.

We also want to add a new field that will contain a 0 - 100 percentage value to represent which percentage of users would fall into the experiment bucket. This will give us the ability to configure this value server-side, should we want to traffic control things based on survey response rate and/or the server load.

We should also increase the version number of the survey announcement both server-side and client-side, AND we should update the google survey doc link to this (note we are capturing a couple of new fields): https://phabricator.wikimedia.org/T264057#6569804

Article list: https://phabricator.wikimedia.org/T267149 (any tickets that refer to other article lists should be updated to this one)

Event Timeline

LGoto triaged this task as Medium priority.Oct 26 2020, 6:46 PM
LGoto moved this task from Needs Triage to Engineering Backlog on the Wikipedia-iOS-App-Backlog board.

Following up from a DM convo with @Tsevener:

An existing remote configuration mechanism for this kind of thing exists as part of MediaWiki-extensions-MobileApp. It's structured as a static JSON file (https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/MobileApp/+/refs/heads/wmf/1.36.0-wmf.15/config/config.json) which is symlinked as android.json and ios.json and exposed through Apache.

The drawback of this approach is that, from a MediaWiki perspective, changes to the config file are technically extension code changes rather than configuration changes, and are therefore subject to the weekly MediaWiki deploy cadence. MediaWiki config changes, on the other hand, can be deployed in a more agile fashion.

I propose updating this so that app remote configuration is set in MediaWiki configuration which can in turn be exposed through a MediaWiki API endpoint (something like action=appconfig). The response would include both existing config keys as well as new values such as the kill switch proposed in this task. Implementing these as MediaWiki configuration values would improve our ability to freely make changes as needed.

Does that sound like a good approach?

Another thought that came up in our engineering sync is to add the value to the wikifeeds announcements endpoint for the survey announcement that is a part of this experiment. It already provides a bit of a configuration purpose in that it contains an allow list of articles that this experiment will lean on.

I will need to make a patch soon anyways to update the article list and display dates, so I'm happy to try this method if that sounds good. That being said if this brings up something that is sorely-missing we can keep discussing. I don't think the announcements system was meant for this sort of data.

@Tsevener It sounds fine to me to include that value as part of the announcement config if it's related.

By the way, "significant-events" sounds a lot like what the current Wikifeeds "onthisday" is trying to do. Is the plan to replace it?

@Mholloway cool sounds good, I'll make a patch for wikifeeds and update this task description.

The endpoint is basically a jazzed up article history endpoint. It shows the revisions (plus interspersed new article talk page topics) with some extra details about each one deemed "large" - how many characters changed, new references that were added, and snippets of the content that was added. Basic idea is to surface the larger edits and details about it more than regular article history.

https://mobileapps-ios-experiments.wmflabs.org/en.wikipedia.org/v1/page/significant-events/United_States

That's where to hit it if you're curious ^ you can replace the title or append a query item ?rvstartid=nnnnnn for paging.

Tsevener renamed this task from Create kill switch to ease the traffic off of significant-events labs instance to Update announcements endpoint with new article list and percentage of experiment users.Nov 2 2020, 8:06 PM
Tsevener updated the task description. (Show Details)

Here's a previous Gerrit patch to reference for where to update this article list and add the new field:

https://gerrit.wikimedia.org/r/c/mediawiki/services/wikifeeds/+/609221

Change 639409 had a related patch set uploaded (by Tsevener; owner: Tsevener):
[mediawiki/services/wikifeeds@master] Update iOS announcement survey object for next iteration

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

@Mholloway I want to do a little bit more testing, then I will take off the WIP flag (before EOD today). Do you think it would be possible for this to be merged and in production on Monday morning? That'll give us a couple of days to monitor things before the WMF days off next week.

Mholloway added a subscriber: sdkim.

Yep, I think I or someone on the team should be able to get that done. +@sdkim for visibility/triaging.

Change 639409 merged by jenkins-bot:
[mediawiki/services/wikifeeds@master] Update iOS announcement survey object for next iteration

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

This is done and QA can be a part of the overall experiment testing tickets. Moving to PM Signoff. Thanks all!