Page MenuHomePhabricator

Migrate MediaModeration Extension to statslib
Closed, ResolvedPublic2 Estimated Story Points

Description

Follow the migration process as outlined below.

Secure/Conduct code review(s).
Deploy the changes to production via the train (https://wikitech.wikimedia.org/wiki/Deployments/Train).
Verify that the changes have been successfully implemented.
Update the relevant dashboard(s) by replacing the old Graphite metric(s) with the new Prometheus metric(s).
Please follow the guidelines and standards outlined in the provided documentation:

https://www.mediawiki.org/wiki/Manual:Stats for detailed guidance on the conversion process.
https://drive.google.com/file/d/12yQEuOapkML1vb9MgCaX1QzbLBdXE6X2/view for a video tutorial on the conversion process.
https://docs.google.com/presentation/d/1SZWf_D3mWNX-XHN8PHYI84LDZr6GUQC2AMhZ9mQXCI0/edit#slide=id.g2795460c956_0_23 for slides on the best practices for converting metrics to statslib.

  • MediaWiki.$wiki.MediaModeration.PhotoDNAServiceProvider.Execute.Error.count
  • MediaWiki.$wiki.MediaModeration.PhotoDNAServiceProvider.Execute.Error.rate
  • MediaWiki.$wiki.MediaModeration.PhotoDNAServiceProvider.Execute.OK.count
  • MediaWiki.$wiki.MediaModeration.PhotoDNAServiceProvider.Execute.OK.rate
  • MediaWiki.$wiki.MediaModeration.PhotoDNAServiceProvider.Execute.RuntimeException.count
  • MediaWiki.$wiki.MediaModeration.PhotoDNAServiceProvider.Execute.SourceFileUsedForFileObject.count
  • MediaWiki.$wiki.MediaModeration.PhotoDNAServiceProvider.Execute.StatusCode*.count
  • MediaWiki.$wiki.MediaModeration.PhotoDNAServiceProviderRequestTime.p75
  • MediaWiki.$wiki.MediaModeration.PhotoDNAServiceProviderRequestTime.p95
  • MediaWiki.$wiki.MediaModeration.PhotoDNAServiceProviderThumbnailTransform.p75
  • MediaWiki.$wiki.MediaModeration.PhotoDNAServiceProviderThumbnailTransform.p95
  • MediaWiki.$wiki.MediaModeration.ScanTable.Scanned
  • MediaWiki.$wiki.MediaModeration.ScanTable.TotalCount
  • MediaWiki.$wiki.MediaModeration.ScanTable.Unscanned
  • MediaWiki.$wiki.MediaModeration.ScanTable.UnscannedWithLastCheckedDefined

source code

Alerts

Event Timeline

lmata renamed this task from Migrate <metric(s)> to statslib to Migrate MediaWiki.$wiki.MediaModeration.* to statslib.Mar 6 2024, 1:48 PM
colewhite renamed this task from Migrate MediaWiki.$wiki.MediaModeration.* to statslib to Migrate MediaModeration Extension to statslib.Apr 26 2024, 5:08 PM
colewhite updated the task description. (Show Details)

If it's OK, @lmata, could we defer this migration until December or January? The one-off scan of all images on Commons should be done by then (graph). Once that's done, we could do this work and replace the old metrics with new ones.

Hi @kostajh, sure, this can wait until then if it makes the migration more convenient for you and the team; I am also adding it to our board for tracking; please reach out if you need assistance; thanks!

kostajh changed the task status from Open to Stalled.Sep 20 2024, 8:51 AM

Hi @kostajh, sure, this can wait until then if it makes the migration more convenient for you and the team; I am also adding it to our board for tracking; please reach out if you need assistance; thanks!

OK, cool. Marking this as stalled on T375260: Process backlog of images on Commons.

Dreamy_Jazz changed the task status from Stalled to Open.Dec 11 2024, 5:38 PM
Dreamy_Jazz subscribed.

The subtask (T380609) seems mostly resolved now.

Dreamy_Jazz set the point value for this task to 2.Dec 11 2024, 5:46 PM

Change #1102371 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/MediaModeration@master] [WIP] Update metrics to use StatsFactory

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

Change #1103319 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/MediaModeration@master] Refactor MediaModerationFileScannerTest into an integration test

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

Change #1103320 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/MediaModeration@master] Refactor MediaModerationImageContentsLookup::getThumbnailForFile

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

Change #1103320 abandoned by Dreamy Jazz:

[mediawiki/extensions/MediaModeration@master] Refactor MediaModerationImageContentsLookup::getThumbnailForFile

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

Change #1103320 restored by Dreamy Jazz:

[mediawiki/extensions/MediaModeration@master] Refactor MediaModerationImageContentsLookup::getThumbnailForFile

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

Change #1103325 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/MediaModeration@master] [WIP] Update maintenance script metrics to use StatsFactory

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

Change #1103319 merged by jenkins-bot:

[mediawiki/extensions/MediaModeration@master] Refactor MediaModerationFileScannerTest into an integration test

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

Change #1103320 merged by jenkins-bot:

[mediawiki/extensions/MediaModeration@master] Refactor MediaModerationImageContentsLookup::getThumbnailForFile

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

Change #1102371 merged by jenkins-bot:

[mediawiki/extensions/MediaModeration@master] Update metrics to use StatsFactory

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

Change #1103325 merged by jenkins-bot:

[mediawiki/extensions/MediaModeration@master] Update maintenance script metrics to use StatsFactory

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

I've created https://grafana-rw.wikimedia.org/d/ab43c410-afca-4777-8244-53cea7ce2a2c/mediamoderation-photodna-stats?orgId=1&refresh=5m which uses the Prometheus data. One issue I've found is that the data isn't being displayed when all wikis are selected, and only displays when a subset of these are selected.

I think further work on it is needed, but I'll need to ask to see how we can fix this issue.

... data isn't being displayed when all wikis are selected, and only displays when a subset of these are selected.

I added a regex string associated with the "all" option - did this resolve the issue you were seeing?

... data isn't being displayed when all wikis are selected, and only displays when a subset of these are selected.

I added a regex string associated with the "all" option - did this resolve the issue you were seeing?

That seems to work (using "allValue": ".+",), thanks @colewhite!

... data isn't being displayed when all wikis are selected, and only displays when a subset of these are selected.

I added a regex string associated with the "all" option - did this resolve the issue you were seeing?

That seems to work (using "allValue": ".+",), thanks @colewhite!

That also works for me. Thanks!

The dashboard using the Prometheus metrics has been created and is at https://grafana.wikimedia.org/d/ab43c410-afca-4777-8244-53cea7ce2a2c/mediamoderation-photodna-stats?orgId=1&refresh=5m. Review of that can now be performed. The requests per month graph will not display any data until 30 days have past since we were collecting data via Prometheus, so does not display anything for now. This graph displaying data isn't as important now that we have processed the backlog and are no longer concerned about exceeding the monthly request limit.

The dashboard using the Prometheus metrics has been created and is at https://grafana.wikimedia.org/d/ab43c410-afca-4777-8244-53cea7ce2a2c/mediamoderation-photodna-stats?orgId=1&refresh=5m. Review of that can now be performed. The requests per month graph will not display any data until 30 days have past since we were collecting data via Prometheus, so does not display anything for now. This graph displaying data isn't as important now that we have processed the backlog and are no longer concerned about exceeding the monthly request limit.

LGTM, thank you for your work on this!