To prevent mistaken assumptions, we should document the various configuration parameters available in the announcement endpoint in an on-wiki schema akin to https://www.mediawiki.org/wiki/Specs/Summary/1.3.0.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Announcements: Update spec, add docs to etc/feed/announcements.js | mediawiki/services/mobileapps | master | +58 -7 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Dbrant | T140012 Add announcement cards to feed | |||
Resolved | • Fjalapeno | T145830 Add announcements feed service to support donations and surveys | |||
Resolved | • bearND | T152572 Big English 2016 donation request for Wikimedia Foundation in the Explore feed | |||
Declined | None | T152160 Add beta announcement capabilities to apps | |||
Resolved | LGoto | T191917 Add beta and version targeting announcement capabilities to the iOS app | |||
Resolved | JoeWalsh | T153224 Consistent consumption of announcements feed endpoint | |||
Resolved | • Mholloway | T195838 Document the announcement endpoint config parameters |
Event Timeline
@Jhernandez I'm inclined to mark this high priority. Maybe that's too high, but it should get done.
Also, if we could have schema validation so that it is impossible for us to deploy incompatible responses that would be great. Given the nature of this endpoint I'm guessing it could even be a test that runs on the patch for now.
I see there is swagger definitions for announcement and announcementsResponse there.
Are they up to date? Exercised in the tests?
Are they up to date?
Some of the newer (optional) values (most are from T152160) are missing:
- beta: boolean,
- logged_in: boolean,
- reading_list_sync_enabled: boolean,
- negative_text: string
- min_version: (Android: number), (iOS: string)
- max_version: (Android: number), (iOS: string)
- image_height: (Android only: number in dp)
Another issue is that we have inconsistent fields between the two apps. In the past the two apps teams designed the responses how they saw fit but didn't always check with the other teams.
More examples are:
- image URL: Android calls it image, iOS image_url.
- body text: Android allows/requires HTML tags for formatting; iOS requires plain text and \n for newlines.
Exercised in the tests?
Currently we don't have any announcements running. So, the announcement x-amples response is just an empty array. Also the tests are adjusted when we start/stop announcements. In the long run, once we have announcements which are configurable without code change/deploy, the latter part should change.
@bearND Thanks for the info. Lets document usage from both platforms, and as an outcome of this task it would be good to have a followup task with a proposal to unify the format across platforms, or definitely split it, whatever we need. We need to formalize this endpoint though so that we don't repeat the problems we've had in the past.
it would be good to have a followup task with a proposal to unify the format across platforms
@Jhernandez T153224 is a start of that.
There is information about the android format in the task that @Dbrant mentioned T152160: Add beta announcement capabilities to apps
Change 460874 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] Announcements: Update spec, add docs to etc/feed/announcements.js
Change 460874 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Announcements: Update spec, add docs to etc/feed/announcements.js
Mentioned in SAL (#wikimedia-operations) [2018-09-24T20:23:46Z] <bsitzmann@deploy1001> Started deploy [mobileapps/deploy@4be131b]: Update mobileapps to badb463 (T187098 T195838)
Mentioned in SAL (#wikimedia-operations) [2018-09-24T20:28:17Z] <bsitzmann@deploy1001> Finished deploy [mobileapps/deploy@4be131b]: Update mobileapps to badb463 (T187098 T195838) (duration: 04m 31s)