Page MenuHomePhabricator

Deprecate and remove EventLogging::getMetricsPlatformClient()
Closed, ResolvedPublic2 Estimated Story Points

Description

Ronseal.

Background

EventLogging::getMetricsPlatformClient() is the gateway to the Metrics Platform SDK. The Experiment Platform team are deprecating the Metrics Platform MediaWiki extension and SDKs in favour of the Test Kitchen SDK. EventLogging::getMetricsPlatformClient() should be deprecated and removed.

AC

Event Timeline

Milimetric subscribed.

watching, please add us if you need review / brainbouncing

@phuedx are usages like this ($this->metricsClientFactory->newMetricsClient( $context )) implicitly included here? Mentioning just in case. I have found this while looking for others regarding the JS client library

@phuedx are usages like this ($this->metricsClientFactory->newMetricsClient( $context )) implicitly included here? Mentioning just in case. I have found this while looking for others regarding the JS client library

Good question, @Sfaci. I would say no – let's keep this task tightly scoped. All instances of MetricsClientFactory#newMetricsClient() (Codesearch) are using the EventLogging.MetricsClientFactory service, which should have its own deprecation task.

@phuedx are usages like this ($this->metricsClientFactory->newMetricsClient( $context )) implicitly included here? Mentioning just in case. I have found this while looking for others regarding the JS client library

Good question, @Sfaci. I would say no – let's keep this task tightly scoped. All instances of MetricsClientFactory#newMetricsClient() (Codesearch) are using the EventLogging.MetricsClientFactory service, which should have its own deprecation task.

ok! Fully agree!
I started already with this by filing a couple of tasks to migrate specific instruments that are using that way (T415650: Migrate ReportIncident PHP instrument to use Test Kitchen SDK and T415654: Migrate CheckUser PHP instrument to use Test Kitchen SDK, for example) so I'll create the pending ones and also the specific task to deprecate that EventLogging.MetricsClientFactory service. And I will link all of them accordingly

I started already with this by filing a couple of tasks to migrate specific instruments that are using that way (T415650: Migrate ReportIncident PHP instrument to use Test Kitchen SDK and T415654: Migrate CheckUser PHP instrument to use Test Kitchen SDK, for example) so I'll create the pending ones and also the specific task to deprecate that EventLogging.MetricsClientFactory service. And I will link all of them accordingly

Done. I have filed T416020: Deprecate and remove EventLogging.MetricsClientFactory service and the needed related ticket to migrate the instruments that are using it at this time

JVanderhoop-WMF removed a project: Data-Engineering.
JVanderhoop-WMF updated the task description. (Show Details)
JVanderhoop-WMF set the point value for this task to 2.
JVanderhoop-WMF moved this task from Tidy up EventLogging to Backlog on the Test Kitchen board.

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

[mediawiki/extensions/EventLogging@master] Remove EventLogging::getMetricsPlatformClient()

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

Change #1287496 abandoned by Santiago Faci:

[mediawiki/extensions/EventLogging@master] Remove EventLogging::getMetricsPlatformClient()

Reason:

wrong approach

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

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

[mediawiki/extensions/EventLogging@master] Remove EventLogging::getMetricsPlatformClient()

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

Change #1287499 merged by jenkins-bot:

[mediawiki/extensions/EventLogging@master] Remove EventLogging::getMetricsPlatformClient()

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

Hi! I think this is breaking Quibble when I try to run the tests in CI for the job integration-quibble-fullrun-extensions-phpunit-php83 - I tested with https://gerrit.wikimedia.org/r/c/integration/quibble/+/1293718

See:
https://integration.wikimedia.org/ci/job/integration-quibble-fullrun-extensions-phpunit-php83/265/console

00:01:13.876 1) MediaWiki\Extension\EventStreamConfig\ApiStreamConfigsTest::testResultArrayFormat
00:01:13.877 Error: Call to undefined method MediaWiki\Extension\EventLogging\EventLogging::getMetricsPlatformClient()
00:01:13.877 
00:01:13.877 /workspace/src/extensions/MetricsPlatform/ServiceWiring.php:66
....
00:01:13.878 1) MediaWiki\Extension\MetricsPlatform\Tests\Integration\XLab\HooksTest::testOnlyEveryoneExperiments
00:01:13.878 Error: Call to undefined method MediaWiki\Extension\EventLogging\EventLogging::getMetricsPlatformClient()
00:01:13.878 
00:01:13.878 /workspace/src/extensions/MetricsPlatform/ServiceWiring.php:66
00:01:13.878 /workspace/src/vendor/wikimedia/services/src/ServiceContainer.php:440
00:01:13.878 /workspace/src/vendor/wikimedia/services/src/ServiceContainer.php:406

EventStreamConfig is running the MetricsPlatform extension's tests despite MetricsPlatform being archived…