Page MenuHomePhabricator

ReadingDepth: Add some new fields to the schema
Closed, DeclinedPublic3 Estimated Story Points

Description

We want to add some new optional fields to the ReadingDepth schema to support several things:

  • page_id for identifying red links (original report: T208478)
  • revision_id linking revisions cheaply in the database (original report: T208275)

Precursor

Acceptance criteria

  • pageID field is being sent for all pages where page_id is available (this excludes Special: pages, i.e. namespace -1)
  • revisionID field is being sent for all pages where rev_id is available (this excludes Special: pages, i.e. namespace -1)
  • The schema should be bumped to 18559669 in WikimediaEvents
  • The two new fields should be added where available from mw.config

Developer notes

All information needed is available:

mw.config.get('wgArticleId')
mw.config.get('wgRevisionId')

= QA steps
ReadingDepth is enabled for 100% of users on Reading web staging
[] Verify reading depth events continue to be loaded on https://reading-web-staging.wmflabs.org/wiki/Main_Page
[] Verify the new fields show up in reading depth events on https://reading-web-staging.wmflabs.org/wiki/Main_Page
[] Verify the events are sent on special pages and the new fields do not show up in reading depth events on https://reading-web-staging.wmflabs.org/wiki/Special:Watchlist

Event Timeline

Jdlrobson added a subscriber: ovasileva.

@Groceryheist and @Tbayer the sooner we make the schema edits, the sooner I can schedule this task for an estimation and get it implemented. Happy to help with the edits, but figured probably best if you add those to ensure they have the names, documentation you'd expect.

ovasileva triaged this task as Medium priority.Nov 2 2018, 5:36 PM

@Groceryheist and @Tbayer the sooner we make the schema edits, the sooner I can schedule this task for an estimation and get it implemented. Happy to help with the edits, but figured probably best if you add those to ensure they have the names, documentation you'd expect.

I took at stab at it (@Groceryheist , feel free to check): https://meta.wikimedia.org/w/index.php?title=Schema:ReadingDepth&diff=18549348&oldid=18353520

Both fields are marked as required for now, although we may need to revisit that depending on whether we remove special pages as part of T207899 (where those IDs are not available).

If both fields are required you might as well merge the task T207899 into this one as we will need to make all these changes in one go.

If both fields are required you might as well merge the task T207899 into this one as we will need to make all these changes in one go.

OK, we would actually prefer to keep Special: pages now, so T207899 remains separate and I have marked the fields as not required accordingly. Let us know if anything else is missing.

Over to the devs ;)

ovasileva set the point value for this task to 3.Nov 7 2018, 5:54 PM
Jdlrobson renamed this task from Add some new fields to the ReadingDepth schema to ReadingDepth: Add some new fields to the schema.Nov 15 2018, 7:07 PM

Change 531290 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[operations/mediawiki-config@master] Disable Wikimedia ReadingDepth

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