Page MenuHomePhabricator

Migrate "WikiLambda API" instrument to use the Test Kitchen SDK
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

The WikiLambda API instrument is the only instrument that uses EventLogging::getMetricsPlatformClient() and the MetricsClient class. Migrating this instrument to use the Test Kitchen SDK will unblock the deprecation and removal of that method and class.

AC

Event Timeline

Milimetric subscribed.

need DE here? Please re-add if so

Posting here some technical details provided by @DMartin-WMF from Abstract Wikipedia. They will be needed to register the instrument in Test Kitchen UI:

  • A preferred Instrument name + Machine-readable name: "WikiLambda API" and "WikiLambdaApi"
  • Description: API providing access to Wikifunctions, part of the WikiLambda extension
  • A related phabricator task: https://phabricator.wikimedia.org/T356228
  • A contact email: dmartin@wikimedia.org

The initial duration of the instrument will be one year and, once the initial end date have been reached, instruments owners will always be able to extend the duration of the instrument if needed (by updating its end date via Test Kitchen UI).

Change #1275466 had a related patch set uploaded (by Santiago Faci; author: Santiago Faci):

[mediawiki/extensions/WikiLambda@master] WikiLambda API instrument: Migrate to Test Kitchen

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

Change #1275914 had a related patch set uploaded (by Jforrester; author: Jforrester):

[integration/config@master] Zuul: [mediawiki/extensions/WikiLambda] Add TestKitchen phan dep

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

Change #1275914 merged by jenkins-bot:

[integration/config@master] Zuul: [mediawiki/extensions/WikiLambda] Add TestKitchen phan dep

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

Mentioned in SAL (#wikimedia-releng) [2026-04-21T13:34:33Z] <James_F> Zuul: [mediawiki/extensions/WikiLambda] Add TestKitchen phan dep, for T415254

Change #1275466 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] WikiLambda API instrument: Migrate to Test Kitchen

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

Change #1278704 had a related patch set uploaded (by Santiago Faci; author: Santiago Faci):

[operations/mediawiki-config@master] WikiLambdaApi: update stream configuration

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

Change #1278705 had a related patch set uploaded (by Santiago Faci; author: Santiago Faci):

[operations/mediawiki-config@master] WikiLambdaAPI: update stream

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

Change #1278705 abandoned by Santiago Faci:

[operations/mediawiki-config@master] WikiLambdaAPI: update stream

Reason:

duplicated

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

Change #1285330 had a related patch set uploaded (by Santiago Faci; author: Santiago Faci):

[mediawiki/extensions/WikiLambda@master] WikiLambdaApi instrument: Sets the custom schemaID

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

Change #1285330 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] WikiLambdaApi instrument: Sets the custom schemaID

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

Change #1285352 had a related patch set uploaded (by Jforrester; author: Santiago Faci):

[mediawiki/extensions/WikiLambda@wmf/1.47.0-wmf.1] WikiLambdaApi instrument: Sets the custom schemaID

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

WikiLambdaApi instrument was deployed already but there is a fix to set the right schema in the instrument code and it's scheduled to be deployed on May 11th during the morning backport window.

Also at that time, another patch will be deployed to tidy up the related stream to remove the contextual attributes declared there and the sample_rate because they are not needed: contextual attributes are now defined in Test Kitchen UI and sample_rate is not supported by the PHP Test Kitchen SDK

Change #1285352 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@wmf/1.47.0-wmf.1] WikiLambdaApi instrument: Sets the custom schemaID

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

Change #1278704 merged by jenkins-bot:

[operations/mediawiki-config@master] WikiLambdaApi: update stream configuration

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

Mentioned in SAL (#wikimedia-operations) [2026-05-11T14:20:38Z] <lucaswerkmeister-wmde@deploy1003> Started scap sync-world: Backport for [[gerrit:1285448|Grant 'createpreviouslyrenamedaccount' to account creators and sysop-likes (T196386)]], [[gerrit:1278704|WikiLambdaApi: update stream configuration (T415254)]], [[gerrit:1285352|WikiLambdaApi instrument: Sets the custom schemaID (T415254)]], [[gerrit:1285406|editSaves: getExperiment returns a promise now (T425785)]]

Mentioned in SAL (#wikimedia-operations) [2026-05-11T14:26:18Z] <lucaswerkmeister-wmde@deploy1003> lucaswerkmeister-wmde, jforrester, matmarex, sfaci: Backport for [[gerrit:1285448|Grant 'createpreviouslyrenamedaccount' to account creators and sysop-likes (T196386)]], [[gerrit:1278704|WikiLambdaApi: update stream configuration (T415254)]], [[gerrit:1285352|WikiLambdaApi instrument: Sets the custom schemaID (T415254)]], [[gerrit:1285406|editSaves: getExperiment returns a promise now

Mentioned in SAL (#wikimedia-operations) [2026-05-11T14:39:28Z] <lucaswerkmeister-wmde@deploy1003> Finished scap sync-world: Backport for [[gerrit:1285448|Grant 'createpreviouslyrenamedaccount' to account creators and sysop-likes (T196386)]], [[gerrit:1278704|WikiLambdaApi: update stream configuration (T415254)]], [[gerrit:1285352|WikiLambdaApi instrument: Sets the custom schemaID (T415254)]], [[gerrit:1285406|editSaves: getExperiment returns a promise now (T425785)]] (duration: 18

Change #1285857 had a related patch set uploaded (by Santiago Faci; author: Santiago Faci):

[mediawiki/extensions/WikiLambda@master] WikiLambdaApi instrument: update schema

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

Patches above represent some additional work I didn't realize before. The schema that the instrument was using didn't include instrument_name as a field and Test Kitchen is including it since recently. So:

Change #1285857 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] WikiLambdaApi instrument: update schema

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

Change #1285916 had a related patch set uploaded (by Clare Ming; author: Santiago Faci):

[mediawiki/extensions/WikiLambda@wmf/1.47.0-wmf.1] WikiLambdaApi instrument: update schema

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

Change #1285916 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@wmf/1.47.0-wmf.1] WikiLambdaApi instrument: update schema

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

Mentioned in SAL (#wikimedia-operations) [2026-05-11T21:45:14Z] <cjming@deploy1003> Started scap sync-world: Backport for [[gerrit:1285916|WikiLambdaApi instrument: update schema (T415254)]]

Mentioned in SAL (#wikimedia-operations) [2026-05-11T21:47:01Z] <cjming@deploy1003> cjming: Backport for [[gerrit:1285916|WikiLambdaApi instrument: update schema (T415254)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-05-11T21:51:40Z] <cjming@deploy1003> Finished scap sync-world: Backport for [[gerrit:1285916|WikiLambdaApi instrument: update schema (T415254)]] (duration: 06m 26s)