Page MenuHomePhabricator

Deploy the latest version of the PHP Metrics Platform client library
Closed, ResolvedPublic5 Estimated Story Points

Description

Epic: T350495: [EPIC] Deploy latest version of Metrics Platform client libraries

Background

In T346287, T346288, and T346286, we updated the JS, Java, and PHP client libraries to produce core interaction events. Before they can be used by us and, eventually, by third-parties, they must be deployed.

AC

Event Timeline

phuedx set the point value for this task to 5.Nov 16 2023, 1:45 PM

Change 976940 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/EventLogging@master] Use wikimedia/metrics-platform 3.0.0

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

Change 976942 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/vendor@master] Update wikimedia/metrics-platform to 3.0.0

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

Change 977064 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/EventLogging@master] tests: Update EventLoggingTest::testDispatch()

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

This was… interesting…

Firstly, the ideal scenario is:

  1. Update composer.json in EventLogging
  2. Submit patch
  3. Update composer.json in mediawiki/vendor
$composer self-update 2.6.4
composer update --no-dev
  1. Submit patch
  2. $$$

Now, there are a couple of minor issues that required a change to the EventLogging:

  1. EventLoggingTest::testDispatch() and ::testDispatchAddsContextAttributes() both use the MetricsClient::SCHEMA constant. That constant was removed in 049ea5725c6e
  2. Those same test cases make assertions about the output of MetricsClient::dispatch(), which has changed between 2.0.0 and 3.0.0

Unfortunately, there's a curious circular dependency between the build environments of EventLogging and mediawiki/vendor that complicates fixing these issues cleanly. One of the build pipelines for EventLogging pulls down dependencies from mediawiki/vendor and one of the the pipelines for mediawiki/vendor runs the tests in EventLogging. Updating one breaks a pipeline in the other. The solution is to first update the EventLogging tests in an isolated patch, then update mediawiki/vendor, then update EventLogging, i.e. see https://gerrit.wikimedia.org/r/c/mediawiki/vendor/+/976942 and its dependency.

Change 977064 merged by jenkins-bot:

[mediawiki/extensions/EventLogging@master] tests: Update EventLoggingTest::testDispatch()

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

Change 976942 merged by jenkins-bot:

[mediawiki/vendor@master] Update wikimedia/metrics-platform to 3.1.0

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

Change 976940 merged by jenkins-bot:

[mediawiki/extensions/EventLogging@master] Use wikimedia/metrics-platform 3.1.0

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