Page MenuHomePhabricator

Create MW Docker configuration recipe for xLab
Closed, ResolvedPublic3 Estimated Story Points

Description

@phuedx to provide details :)

Details

Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
ci: Publish the latest build to Dockerrepos/data-engineering/mpic!209phuedxwork/phuedx/T396761main
Customize query in GitLab

Event Timeline

Milimetric set the point value for this task to 3.Jun 12 2025, 3:19 PM

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

[mediawiki/extensions/MetricsPlatform@master] devserver: Add xLab devserver

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

@Sfaci @cjming: https://gerrit.wikimedia.org/r/1161504 is what I came up with to get xLab working inside of MediaWiki Docker. You'll see from the notes I've made inline that there are a few minor wrinkles, which could/should be ironed out. Fortunately though, Docker Compose allows for reuse so we can keep those wrinkles under our control: https://www.mediawiki.org/wiki/MediaWiki-Docker/Configuration_recipes/MetricsPlatform#Applications. I'll create a couple follow-on tasks

hi @phuedx took your patch for a spin - it worked great! i followed your instructions and got a local instance of MW, xLab, and EventGate up and running smoothly and swiftly.

Ran mw.eventLog.submitInteraction('product_metrics.web_base', '/analytics/product_metrics/web/base/1.4.2', 'action', {instrument_name: 'testJune26'}); in the console and saw a validated event!

testing Metrics Platform 1161504 (1×2 px, 387 KB)

I'll let others chime in - I think this will vastly improve the developer experience for new experimenters

oh the other thing - i did not test a full experiment from xLab because of the validation that we have in place about needing the start date to be 24 hrs ahead - I guess I could have tested by changing the start date directly in the db ... anyway, I also tested by doing the following in the console:

mw.xLab.overrideExperimentGroup( 'sds2-4-11-synth-aa-test', 'control-2' );

mw.xLab.getExperiment( 'sds2-4-11-synth-aa-test' ).send('page-visited',{instrument_name: 'PageVisitFromTestJune27'});

The above generated the following in my local EventGate:

Screenshot 2025-06-27 at 9.09.16 AM.png (1×2 px, 374 KB)

Hi @phuedx

Looks and works great! I have tested the full docker compose following the instructions you have updated and everything work as expected.

Just one thing I have been thinking about: not sure if it should be part of this work, but I was wondering if we could do the necessary to be able to use mpic:latest here. At this time it's not doable because we are not tagging images that way. I think we should modify the gitlab pìpeline to tag xlab's images as the latest specific version (as we are already doing) and also as "latest" to refer always to the last generated one. That way the service will always use the last release and we wouldn't change anything for that purpose.

@phuedx After merging https://gitlab.wikimedia.org/repos/data-engineering/mpic/-/merge_requests/209 (ci change to publish the latest image to docker) I have created a new tag (v0.7.7) to test it and also have the first latest image already published. It worked great so we can already use it as the image version in the Dockerfile in the main change.

@phuedx After merging https://gitlab.wikimedia.org/repos/data-engineering/mpic/-/merge_requests/209 (ci change to publish the latest image to docker) I have created a new tag (v0.7.7) to test it and also have the first latest image already published. It worked great so we can already use it as the image version in the Dockerfile in the main change.

Nice! Done!

Change #1161504 merged by jenkins-bot:

[mediawiki/extensions/MetricsPlatform@master] devserver: Add xLab devserver

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

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

[operations/deployment-charts@master] xLab: Deploy v0.7.8 release to staging

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

Change #1167322 merged by jenkins-bot:

[operations/deployment-charts@master] xLab: Deploy v0.7.8 release to staging

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