Page MenuHomePhabricator

Document the announcement endpoint config parameters
Closed, ResolvedPublic

Description

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.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 29 2018, 1:13 PM
bearND added a subscriber: bearND.May 29 2018, 3:16 PM
Dbrant added a subscriber: Dbrant.May 29 2018, 3:49 PM

possible duplicate/relative: T152160

@Jhernandez I'm inclined to mark this high priority. Maybe that's too high, but it should get done.

Jhernandez triaged this task as High priority.Jun 27 2018, 5:57 PM

Yeah, from what I've heard from other teams I agree. We want to do this soon.

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.

Vvjjkkii renamed this task from Document the announcement endpoint config parameters to d3baaaaaaa.Jul 1 2018, 1:07 AM
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from d3baaaaaaa to Document the announcement endpoint config parameters.Jul 2 2018, 3:27 PM
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.

I see there is swagger definitions for announcement and announcementsResponse there.

Are they up to date? Exercised in the tests?

bearND added a comment.EditedJul 12 2018, 12:53 PM

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

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

bearND added a comment.EditedSep 18 2018, 11:14 PM

@Mholloway Any concerns about moving this to Specs/Announcements/0.2.0?

@Mholloway Any concerns about moving this to Specs/Announcements/0.2.0?

done

Change 460874 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Announcements: Update spec, add docs to etc/feed/announcements.js

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

Stashbot added a subscriber: Stashbot.

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)

bearND closed this task as Resolved.Oct 15 2018, 2:22 PM