Page MenuHomePhabricator

Fix EventLogging for cross-wiki notifications
Closed, ResolvedPublic

Description

We need to add a wiki field to the EchoInteraction schema and have the front-end code populate it. Otherwise, interactions with foreign notifications will be mis-logged because the notification ID will be from a different wiki.

Event Timeline

Catrope raised the priority of this task from to Needs Triage.
Catrope updated the task description. (Show Details)
Catrope subscribed.
Catrope triaged this task as Medium priority.Dec 8 2015, 7:07 PM
Catrope set Security to None.

Change 258178 had a related patch set uploaded (by Legoktm):
Add support for cross-wiki notifications to Schema:EchoInteraction

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

Change 258178 merged by jenkins-bot:
Add support for cross-wiki notifications to Schema:EchoInteraction

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

Catrope added a subscriber: Legoktm.

Schema modification is done (thanks legoktm) but the notification UI code still needs to actually put the wiki name in this field.

Catrope raised the priority of this task from Medium to High.Dec 19 2015, 12:17 AM
Catrope added a subscriber: Mooeypoo.

The only thing I have is the "source" name, which the API sends for cross-wiki bundles. This should be the wiki's dbname, so it should work.

Change 260776 had a related patch set uploaded (by Mooeypoo):
Log cross-wiki & bundle items impressions and add their source wiki

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

Change 260776 merged by jenkins-bot:
Log cross-wiki & bundle items impressions and add their source wiki

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

Checked s3-analytics-slave [log] - wiki field is added - and it seems to be populated correctly.

mysql:research@s3-analytics-slave [log]> describe EchoInteraction_15180901;

+------------------------+----------------+------+-----+---------+-------+
| Field                  | Type           | Null | Key | Default | Extra |
+------------------------+----------------+------+-----+---------+-------+
| uuid                   | binary(32)     | NO   | PRI | NULL    |       |
| clientIp               | varbinary(191) | YES  |     | NULL    |       |
| timestamp              | varbinary(14)  | NO   | MUL | NULL    |       |
| userAgent              | varbinary(191) | YES  |     | NULL    |       |
| webHost                | varbinary(191) | YES  |     | NULL    |       |
| wiki                   | varbinary(191) | NO   | MUL | NULL    |       |
| event_action           | varbinary(191) | NO   |     | NULL    |       |
| event_context          | varbinary(191) | YES  |     | NULL    |       |
| event_editCount        | bigint(20)     | YES  |     | NULL    |       |
| event_eventId          | bigint(20)     | YES  |     | NULL    |       |
| event_mobile           | tinyint(1)     | YES  |     | NULL    |       |
| event_notifWiki        | varbinary(191) | YES  |     | NULL    |       |
| event_notificationType | varbinary(191) | YES  |     | NULL    |       |
| event_userId           | bigint(20)     | NO   |     | NULL    |       |
| event_version          | varbinary(191) | NO   |     | NULL    |       |
+------------------------+----------------+------+-----+---------+-------+