Page MenuHomePhabricator

2010 wikitext editor logs init and save events to old schema
Closed, ResolvedPublic

Description

The 2010 wikitext editor has not been emitting init, saveAttempt, saveSuccess, or saveFailure events. It also has not been emitting saveIntent events, but this is intentional since the editor's flow has no step that corresponds to the click to bring up the save dialog in the visual editor.

Event Timeline

Neil_P._Quinn_WMF renamed this task from Desktop wikitext editor does not emit save events to 2010 wikitext editor does not emit save events.Sep 5 2018, 11:35 PM
Neil_P._Quinn_WMF triaged this task as Normal priority.
Neil_P._Quinn_WMF created this task.
DLynch added a comment.Sep 6 2018, 3:17 AM

Same reasoning as it not logging an init event, maybe? Insofar as there's not an in-page equivalent to the saveComplete event that VE emits, because there's a page-navigation in the way.

@Jdforrester-WMF You chimed in on the parent ticket about the reasoning for init -- can you remember if that was our reasoning for this as well?

@Neil_P._Quinn_WMF Is there some server-side logging via the edit session that you can use for an equivalent measure.

Same reasoning as it not logging an init event, maybe? Insofar as there's not an in-page equivalent to the saveComplete event that VE emits, because there's a page-navigation in the way.
@Jdforrester-WMF You chimed in on the parent ticket about the reasoning for init -- can you remember if that was our reasoning for this as well?

It was. I think it's be possible to do this server-side if wanted.

Neil_P._Quinn_WMF added a subscriber: Milimetric.EditedSep 6 2018, 10:27 PM

Same reasoning as it not logging an init event, maybe? Insofar as there's not an in-page equivalent to the saveComplete event that VE emits, because there's a page-navigation in the way.
@Jdforrester-WMF You chimed in on the parent ticket about the reasoning for init -- can you remember if that was our reasoning for this as well?

It was. I think it's be possible to do this server-side if wanted.

Wait, but then how did we ever calculate the edit save rate for the 2010 wikitext editor?

@Neil_P._Quinn_WMF Is there some server-side logging via the edit session that you can use for an equivalent measure.

Well, I was told (I think by @Milimetric, years ago) that init and saveSuccess were logged on the server-side. But I don't entirely understand the question: are you asking whether I can use data from the revision history to infer saveSuccess? That seems pretty difficult and much less desirable than logging it to this schema on the server.

Neil_P._Quinn_WMF updated the task description. (Show Details)EditedSep 6 2018, 11:57 PM

It was. I think it's be possible to do this server-side if wanted.

@Jdforrester-WMF confirmed to me that he was referring to the saveIntent events, which are intentionally not emitted. The other save events should indeed be emitted (some or all on the server side), so that is a real bug.

Hmmmm, the queries / data / graphs / my recollection all seem to point to attempt, success, and failure being saved, for wikitext: https://edit-analysis.wmflabs.org/compare/

But looking at that saves_rates query, it never differentiated by editor, like here: https://phabricator.wikimedia.org/diffusion/ANLD/browse/master/edit/sessions.sql$13

But then, yeah, if sessions.sql *did* differentiate by editor, and it seems to have thought saveAttempt was one of the steps in the wikitext flow, where is that data? Because if I look for saveAttempt now, it's not there in Edit_10676603 in mysql. In fact no event_editor other than 'visualeditor' shows up there. So that doesn't make sense. The hive event.edit table is empty, because of the issue it had with the automatic refine process, so it's not there... And I don't see how only part of the data would've been sanitized...

So it looks like Edit_11319708 and onward have this data, @Neil_P._Quinn_WMF when you have a sec let me know what you're looking for exactly. I think it's weird that the older tables don't have wikitext but I think I remember it wasn't instrumented back then?

So it looks like Edit_11319708 and onward have this data, @Neil_P._Quinn_WMF when you have a sec let me know what you're looking for exactly. I think it's weird that the older tables don't have wikitext but I think I remember it wasn't instrumented back then?

Are you sure? I queried the most recent table (Edit_17541122) for August 13 to August 27, and found no save events of any kind for the 2010 wikitext editor.

My notebook is here—if you go down to the "overall event counts" section, there's a pivot table showing the count of events by editor. Am I missing something?

Neil_P._Quinn_WMF renamed this task from 2010 wikitext editor does not emit save events to 2010 wikitext editor logs init and save events to old schema.Sep 15 2018, 12:22 AM

Change 460618 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/WikiEditor@master] Follow-up 874f9bfb8d: Bump server-side Edit schema version here

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

Neil_P._Quinn_WMF added a comment.EditedSep 15 2018, 12:27 AM

Yup, it was that simple—both init and save events are logged server-side, and were just logging to an old schema version all this time.

Change 460618 merged by jenkins-bot:
[mediawiki/extensions/WikiEditor@master] Follow-up 874f9bfb8d: Bump server-side Edit schema version here

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

Neil_P._Quinn_WMF closed this task as Resolved.Sep 24 2018, 4:47 PM

This is now fixed! Starting on the day of the deploy, these events started flowing into the new table and stopped flowing into the old one.

select
    left(timestamp, 8) as day,
    count(*)
from log.Edit_17541122
where
    event_editor = "wikitext" and
    event_action in ("init", "saveAttempt", "saveSuccess", "saveFailure") and
    timestamp >= "20180911"
group by left(timestamp, 8)

         day  count(*)
0   20180912         2
1   20180913         2
2   20180914        10
3   20180915         1
4   20180917         1
5   20180918        20
6   20180919      4273
7   20180920     73329
8   20180921    144332
9   20180922    133908
10  20180923    144711
11  20180924    104613
select
    left(timestamp, 8) as day,
    count(*)
from log.Edit_13457736
where
    event_editor = "wikitext" and
    event_action in ("init", "saveAttempt", "saveSuccess", "saveFailure") and
    timestamp >= "20180911"
group by left(timestamp, 8)

         day  count(*)
0   20180911    154631
1   20180912    149683
2   20180913    153639
3   20180914    136980
4   20180915    130795
5   20180916    140776
6   20180917    149348
7   20180918    137878
8   20180919    136892
9   20180920     69104
10  20180923         1