Page MenuHomePhabricator

Migrate flaggedrevs jobs to mw-cron
Closed, ResolvedPublic

Description

Migrate FlaggedRevs periodic mediawiki jobs from mwmaint to mw-cron on kubernetes.

Job nameCriticalityDone?
mediawiki_job_update_flaggedrev_stats.timerMX

Doc on the new platform

ServiceOps new will handle migrating the jobs, but would appreciate input from FlaggedRevs on:

  • jobs that should be watched more
  • jobs that are low criticality and could be migrated first
  • outdated jobs that can be removed
  • any potential gotchas in the way these jobs use MediaWiki

Event Timeline

Change #1135753 had a related patch set uploaded (by Clément Goubert; author: Clément Goubert):

[operations/puppet@production] alertmanager: Add team/project receivers for Phab

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

Change #1135754 had a related patch set uploaded (by Clément Goubert; author: Clément Goubert):

[operations/puppet@production] alertmanager: Add routing for task alerts

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

Change #1135753 merged by Clément Goubert:

[operations/puppet@production] alertmanager: Add team/project receivers for Phab

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

Change #1135754 merged by Clément Goubert:

[operations/puppet@production] alertmanager: Add routing for task alerts

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

From a quick read of [0] and (more importantly) [1], this looks relatively low-risk to migrate.

Although there's a lot going on there, the logic in FlaggedRevsStats does not appear to persist (with one caveat, see below) intermediate data or reuse its own outputs written to the flaggedrevs_statistics table - i.e., in the unlikely event that the script produces bad data on k8s / PHP 8.1, we should be able to revert and re-run to fix.

There is one spot in getEditReviewTimes where total edit counts for the respective user type are cached. However, the risk of that query callback suddenly returning incorrect values in this environment seems low.

[0] https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/FlaggedRevs/+/refs/heads/master/maintenance/updateStats.php

[1] https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/FlaggedRevs/+/refs/heads/master/includes/backend/FlaggedRevsStats.php

Change #1144692 had a related patch set uploaded (by Scott French; author: Scott French):

[operations/puppet@production] P:mw:maint:update_flaggedrev_stats: migrate to mw-cron

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

Change #1144692 merged by Scott French:

[operations/puppet@production] P:mw:maint:update_flaggedrev_stats: migrate to mw-cron

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

Scott_French updated the task description. (Show Details)

The update-flaggedrev-stats job has been migrated. I'll hold onto this until I'm able to confirm the first run is successful later today.

The first run at 00:08 today (May 14th) completed without issue, and with very similar total elapsed time to the bare-metal case (a bit more than 6m). I've also spot-checked Special:ValidationStatistics on a handful of wikis, and the new stats values look reasonable relative to the prior ones (generated by the update-special-pages runs earlier today).