Page MenuHomePhabricator

MetricsPlatform: Filter inactive instrument and experiment configs
Closed, ResolvedPublic3 Estimated Story Points

Description

Background

This is a companion task to T386659: xLab: Ensure start and end dates for experiments and instruments apply.

Previously, instrument and experiment configs were fetched from xLab and cached synchronously. We chose a short cache lifetime so that the configs were always fresh. However, synchronously fetching configs from xLab is expensive if the application servers are not in eqiad, where xLab is currently deployed, and so we made updating the configs asynchronous in T398422: MetricsPlatform: InstrumentConfigFetcher: Make fetching asynchronous.

Since the configs are not guaranteed to be fresh, there is a chance that a config for a now-inactive experiment could be fetched from the backing store. Therefore, MetricsPlatform needs to be updated to filter inactive configs.

AC

  • Add dates to xLab output so MW can see them (merged and deployed on production)
  • MW MetricsPlatform extension checks that current day falls between start and end dates of the experiment (merged, deployment on 2025-09-02/04)
    • This should only be done once the change for (1) has been deployed
  • xLab includes also future experiments in the API response when mediawiki is the authority (/api/v1/experiments?format=config&authority=mediawiki) (review)
    • This must be deployed only once the change for (2) has been deployed
  • Ensure start and end dates for experiments and instruments apply (pulling in from T386659)

Deployment plan

https://phabricator.wikimedia.org/T399292#11106159

Event Timeline

Milimetric moved this task from Incoming to Backlog on the Test Kitchen board.
Milimetric moved this task from Backlog to READY TO GROOM on the Test Kitchen board.
Milimetric set the point value for this task to 2.Aug 7 2025, 3:41 PM
Milimetric updated the task description. (Show Details)

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

[mediawiki/extensions/MetricsPlatform@master] InstrumentConfigFetcher: Filter inactive instrument and experiment configs

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

sfaci updated https://gitlab.wikimedia.org/repos/data-engineering/mpic/-/merge_requests/224

Draft: Added utc_start_dt and utc_end_dt as start and date, respectively, to the API response

Posting here for documentation purpose:

Per discussion in Slack, we agreed on the following deployment plan for this task:

cjming merged https://gitlab.wikimedia.org/repos/data-engineering/mpic/-/merge_requests/224

Added utc_start_dt and utc_end_dt as start and date, respectively, to the API response

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

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

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

Change #1181773 merged by jenkins-bot:

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

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

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

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

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

Change #1182112 merged by jenkins-bot:

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

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

The first part of this task has been deployed to production and it's working as expected:

Merge and deploy the change with which xLab will include dates as start and end in their responses for instruments and experiments where mediawiki is the authority (/api/v1/instruments and /api/v1/experiments?format=config&authority=mediawiki, respectively)
https://gitlab.wikimedia.org/repos/data-engineering/mpic/-/merge_requests/224

Change #1177961 merged by jenkins-bot:

[mediawiki/extensions/MetricsPlatform@master] InstrumentConfigFetcher: Filter inactive instrument and experiment configs

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

The related MR that includes future instruments/experiments in the API response is already for review: https://gitlab.wikimedia.org/repos/data-engineering/mpic/-/merge_requests/225

This work has been done along with T386659: xLab: Ensure start and end dates for experiments and instruments apply by adding a new set of test cases to test comprehensively the API endpoints related to instruments and logged-in/out experiments.

Sfaci updated the task description. (Show Details)
mpopov updated the task description. (Show Details)
mpopov changed the point value for this task from 2 to 3.

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

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

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

Change #1185172 merged by jenkins-bot:

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

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

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

[operations/deployment-charts@master] xLab: Deploy v1.0.2 release to production

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

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

[operations/deployment-charts@master] xLab: Deploy v1.0.3 release to production

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

Change #1186616 abandoned by Clare Ming:

[operations/deployment-charts@master] xLab: Deploy v1.0.2 release to production

Reason:

in lieu of Ia43f3317fee8fff6e90bcbbc5875e9861d3cae09

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

Change #1187027 merged by jenkins-bot:

[operations/deployment-charts@master] xLab: Deploy v1.0.3 release to production

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