Page MenuHomePhabricator

CX instrumentation should use the latest schema version
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

CX should use the latest schema version (as of now 1.10) as defined in the cx schema repository ([[ URL https://gitlab.wikimedia.org/repos/data-engineering/schemas-event-secondary/-/blob/master/jsonschema/analytics/mediawiki/content_translation_event/latest.yaml | latest.yaml ]]).

Currently, the version 1.8.0 is used.

How to test:
To test one a browser, one can visit CX in any wiki, and run the following code in the DevTools console:

mw.loader.using( 'mediawiki.api' ).then( function () {
    new mw.Api().saveOption( 'eventlogging-display-console', '1' );
} );

then refresh. After refresh, all the instrumentation events will also be logged in the DevTools console as JSON objects. The $schema property of these objects shows the used schema version.

Derived Requirement

Ensure that Content Translation (CX) instrumentation emits events using the latest schema version (1.10) as defined in the [latest.yaml](https://gitlab.wikimedia.org/repos/data-engineering/schemas-event-secondary/-/blob/master/jsonschema/analytics/mediawiki/content_translation_event/latest.yaml). The currently used version 1.8.0 must be updated, and all emitted events must reflect the correct $schema field in DevTools console logging.

Test Steps

Test Case 1: Ensure CX Emits Events Using Schema Version 1.11

  1. Visit Special:ContentTranslation on any CX-enabled wiki (e.g., https://es.wikipedia.org/wiki/Special:ContentTranslation).
  2. Open DevTools Console.
  3. Run the following code to enable event logging in the console:

    `js mw.loader.using('mediawiki.api').then(function () { new mw.Api().saveOption('eventlogging-display-console', '1'); }); `
  4. Refresh the page.
  5. Interact with the CX editor to trigger event instrumentation (e.g., select languages, article, and start translating).
  6. Look for logged events in the DevTools console.
  7. ✅❓❌⬜ AC1: Confirm that each event logged includes a $schema field that references version 1.11.

QA Results - Test Wiki

ACStatusDetails
1T396711#10948533

Event Timeline

ngkountas set the point value for this task to 1.

Change #1156283 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX: Update instrumentation schema version to 1.10

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

Change #1156283 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Update instrumentation schema version to 1.10

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

Change #1159555 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 1.0.0+20250616

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

Change #1159555 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 1.0.0+20250616

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

Change #1160123 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/ContentTranslation@wmf/1.45.0-wmf.6] CX3 Build 1.0.0+20250616

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

Change #1160123 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@wmf/1.45.0-wmf.6] CX3 Build 1.0.0+20250616

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

Mentioned in SAL (#wikimedia-operations) [2025-06-17T14:24:43Z] <sbisson@deploy1003> sbisson: Backport for [[gerrit:1160123|CX3 Build 1.0.0+20250616 (T374695 T395415 T396628 T396711 T396716 T396836)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-06-17T14:33:53Z] <sbisson@deploy1003> Finished scap sync-world: Backport for [[gerrit:1160123|CX3 Build 1.0.0+20250616 (T374695 T395415 T396628 T396711 T396716 T396836)]] (duration: 11m 21s)

@ngkountas Confirmed that each event logged includes a $schema field that references version 1.11 as seen in the screenshots below. I will move this to Sign-off. Thanks for all your work!

Test Result - TestWiki

Status: ✅ PASS
Environment: TestWiki
OS: macOS Sequoia 15.5
Browser: Chrome 137
Device: MBA
Emulated Device: NA

Test Artifact(s):

https://test.wikipedia.org/w/index.php?title=Special:ContentTranslation&filter-type=automatic&filter-id=previous-edits&active-list=suggestions&from=fr&to=es#/

Test Steps

Test Case 1: Ensure CX Emits Events Using Schema Version 1.11

  1. Visit Special:ContentTranslation on any CX-enabled wiki (e.g., https://es.wikipedia.org/wiki/Special:ContentTranslation).
  2. Open DevTools Console.
  3. Run the following code to enable event logging in the console:
mw.loader.using( 'mediawiki.api' ).then( function () {
    new mw.Api().saveOption( 'eventlogging-display-console', '1' );
} );
  1. Refresh the page.
  2. Interact with the CX editor to trigger event instrumentation (e.g., select languages, article, and start translating).
  3. Look for logged events in the DevTools console.
  4. AC1: Confirm that each event logged includes a $schema field that references version 1.11.
yamlschema result
2025-06-25_12-50-32.png (241×371 px, 26 KB)
2025-06-25_12-49-46.png (1×1 px, 345 KB)
GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF moved this task from Needs QA to Design Signoff on the LPL Hypothesis board.