Page MenuHomePhabricator

WikiLambda metrics: Fix counting of edit-existing-object events
Closed, ResolvedPublic

Description

Description

Currently, the total number of publish events is higher than the number of attempts started for both edits of existing implementation and edits of existing tests. The difference is especially high for edit existing test events.

This seems unexpected if every attempt can only have one associated publish event and not what we found for any of the creation workflow events or function edit events.

See queries and totals below. This has been copied from T348285.

Edits to an existing test

  • 145 test-edit attempts started
  • 260 test-edits attempts ending in publish
-- number of test-edit attempts started
SELECT
name,
COUNT(1) AS n_events
FROM event.wikifunctions_ui
WHERE
name = 'wf.ui.defaultView.load' 
AND element_at(custom_data, 'edit').value = 'true'  
AND element_at(custom_data, 'zobjecttype').value = 'Z20' 
AND  element_at(custom_data, 'isnewzobject').value = 'false'
AND Year >= 2023
GROUP BY 
name
-- number of test-edit attempts published
SELECT
name,
COUNT(1) AS n_events
FROM event.wikifunctions_ui
WHERE
name = 'wf.ui.editTester.publish' 
AND  element_at(custom_data, 'isnewzobject').value = 'false'
AND Year >= 2023
GROUP BY 
name

Edits to an existing implementation

  • 421 implementation edit attempts started
  • 436 implementation edits attempts published
-- number of implementation edit attempts started
SELECT
name,
COUNT(1) AS n_events
FROM event.wikifunctions_ui
WHERE
name = 'wf.ui.defaultView.load' 
AND element_at(custom_data, 'edit').value = 'true'  
AND element_at(custom_data, 'zobjecttype').value = 'Z14' 
AND  element_at(custom_data, 'isnewzobject').value = 'false'
AND Year >= 2023
GROUP BY 
name
-- number of implementation edit attempts published
SELECT
name,
COUNT(1) AS n_events
FROM event.wikifunctions_ui
WHERE
name = 'wf.ui.editImplementation.publish' 
AND  element_at(custom_data, 'isnewzobject').value = 'false'
AND Year >= 2023
GROUP BY 
name

Event Timeline

Diagnosis: in the default view, clicking on the Edit tab does generate a wf.ui.defaultView.load event, but clicking on the pencil icon (for editing the About info) does not. In either case, one can eventually click on Publish (or Cancel), which always does generate the appropriate ...publish (or ...cancel) event.

(Note: this differs from the current function view. In that view, clicking on the word Edit (which corresponds to the pencil icon) does generate a load event.)

Simple fix under consideration: Add a new instrument in openEditLanguageDialog (About.vue). The instrument would create a wf.ui.defaultView.load event that's the same as is currently created in DefaultView.vue.

Jdforrester-WMF moved this task from To Triage to Backlog on the Abstract Wikipedia team board.

Change 977318 had a related patch set uploaded (by David Martin; author: David Martin):

[mediawiki/extensions/WikiLambda@master] DefaultView: Ensure that editing About info dispatches an event

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

Change 977318 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] DefaultView: Ensure that editing "About info" dispatches an event

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