Page MenuHomePhabricator

[subtask] Edits via the main edit icon are not triggering Schema:Edit or Schema:PageIssues events
Closed, ResolvedPublic

Description

While working on T191532 I noticed that edits via the page action (the main edit icon at the top of the page) were not triggering events in the new Schema:PageIssues. It turns out the same bug was impacting Schema:Edit, so many edit clicks there were not being recorded.

The fix is straightforward but capturing as a separate bug as fixing this is likely to have a noticeable impact on Schema:Edit data which has likely been broken for a long long time.

QA steps

Reading web staging has been setup so all edits are routed via the Schema:Edit
Visit https://reading-web-staging.wmflabs.org/w/index.php?title=Pharmacovigilance
Make sure that the wiki is not in readonly mode (per other tasks) before attempting to QA this one.
Clicking an edit icon should trigger an event to Schema:Edit that contains "action=init"

e.g.

{"event":{"page.id":1243554,"page.revid":69,"page.title":"Pharmacovigilance","page.ns":0,"user.id":6,"user.editCount":43,"mediawiki.version":"1.32.0-alpha","platform":"phone","integration":"page","version":1,"action":"init","editor":"wikitext","editingSessionId":"X","action.init.type":"section","action.init.mechanism":"click"},"revision":17541122,"schema":"Edit","webHost":"reading-web-staging.wmflabs.org","wiki":"wiki"};:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 24 2018, 11:37 PM

Change 455272 had a related patch set uploaded (by Jdrewniak; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] Make edit click handling consistent

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

Change 455272 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Make edit click handling consistent

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

Jdlrobson reassigned this task from Jdlrobson to Ryasmeen.Aug 27 2018, 9:57 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson edited projects, added Product-QA; removed Patch-For-Review.

Let me know Rumana if you need any help with this one!

Verified that clicking an edit icon should trigger an event to Schema:Edit and it contains "action=init".

@Jdlrobson Thank you for finding and fixing this. We're just now trying to fix the quality problems in this data, so you have good timing!

Did this bug prevent all events from being logged, or just init events? We haven't seen any mobile events in the logs for the past month, so if it was all events, you've solved the whole problem.

ovasileva added a subscriber: Ryasmeen.
ovasileva closed this task as Resolved.Aug 30 2018, 8:11 AM

All done here!

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptAug 30 2018, 8:11 AM

@Jdlrobson Thank you for finding and fixing this. We're just now trying to fix the quality problems in this data, so you have good timing!
Did this bug prevent all events from being logged, or just init events? We haven't seen any mobile events in the logs for the past month, so if it was all events, you've solved the whole problem.

For posterity, @Tbayer confirmed to me that all events were affected by this. Thanks again for the fix!

Hey @Neil_P._Quinn_WMF sorry missed your comment! This was just impacting clicks on the edit icons (e.g. action=editClicked) - not all events. I don't know enough about the Edit schema logging to know if the absence of this event prevents other events from being sent, but I'd be surprised if it did.
I'm guessing this accounts of a significant amount of your events though..

I'm not seeing any spike in traffic to the Edit schema and this should be deployed everywhere but that might be because editing on mobile is a small % of all your edits. I'd recommend checking the database to confirm entries of editClicked are showing up.

I'd also recommend checking EventLogging errors as maybe bad data is being passed?

Are you seeing data now?

@Jdlrobson Thank you for finding and fixing this. We're just now trying to fix the quality problems in this data, so you have good timing!
Did this bug prevent all events from being logged, or just init events? We haven't seen any mobile events in the logs for the past month, so if it was all events, you've solved the whole problem.

For posterity, @Tbayer confirmed to me that all events were affected by this. Thanks again for the fix!

I don't quite recall a conversation about the meaning of "all events" specifically - I was going by the task description and Jon's comments, without having vetted Schema:Edit events myself so far.

Thanks for the response, @Jdlrobson!

This was just impacting clicks on the edit icons (e.g. action=editClicked) - not all events. I don't know enough about the Edit schema logging to know if the absence of this event prevents other events from being sent, but I'd be surprised if it did.

It looks like editClicked is part of the PageIssues schema; are you thinking about the init event in the Edit schema? At any rate, I take your point that this should not have affected all events.

I'd also recommend checking EventLogging errors as maybe bad data is being passed?

I'm not sure where to find the error logs, but the event.eventerror table in the Data Lake seems to be a good place. I queried that and didn't see any at all for the Edit schema.

Are you seeing data now?

Yeah, after I posted that comment, I checked the recent inflow of mobile events and we're still not getting any at all, so it doesn't seem like it's related to this bug. I'm finishing up my vetting right now, so I'll file a separate task.

Thanks for the response, @Jdlrobson!

This was just impacting clicks on the edit icons (e.g. action=editClicked) - not all events. I don't know enough about the Edit schema logging to know if the absence of this event prevents other events from being sent, but I'd be surprised if it did.

It looks like editClicked is part of the PageIssues schema; are you thinking about the init event in the Edit schema? At any rate, I take your point that this should not have affected all events.

Sorry up I meant init.

I'd also recommend checking EventLogging errors as maybe bad data is being passed?

I'm not sure where to find the error logs, but the event.eventerror table in the Data Lake seems to be a good place. I queried that and didn't see any at all for the Edit schema.

Are you seeing data now?

Yeah, after I posted that comment, I checked the recent inflow of mobile events and we're still not getting any at all, so it doesn't seem like it's related to this bug. I'm finishing up my vetting right now, so I'll file a separate task.

I did successfully send an Edit schema esvent earlier, so it might be worth checking in with analytics on that ticket e.g. @Ottomata to see if any events are being processed and dropped. It's possible validation is failing somewhere.

I've moved the discussion of missing Edit edits to T203615.