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 created this task.Dec 3 2015, 1:31 AM
Catrope updated the task description. (Show Details)
Catrope raised the priority of this task from to Needs Triage.
Catrope added a subscriber: Catrope.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptDec 3 2015, 1:31 AM
Catrope triaged this task as Normal priority.
Catrope set Security to None.
Legoktm claimed this task.Dec 10 2015, 6:02 PM

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 removed Legoktm as the assignee of this task.
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 Normal to High.
Catrope added a subscriber: Mooeypoo.
Mooeypoo claimed this task.Dec 23 2015, 5:51 PM

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    |       |
+------------------------+----------------+------+-----+---------+-------+
Catrope closed this task as Resolved.Feb 13 2016, 12:31 AM