Page MenuHomePhabricator

Run the maintenance script linter extension migrateTagTemplate.php on all wikis
Closed, ResolvedPublic

Description

The linter table has been enhanced with two new columns to the linter table, linter_tag and linter_template which will allow the user to filter linter reports on tag and template information as well as other criteria. For several weeks new linter errors have been writing the linter_tag and linter_template info into this table, but older linter records have this field set to '' and need the tag and template information stored in linter_params column, parsed and migrated to these two new columns.

This maintenance script updates the new columns using batching and waiting on replication to avoid causing performance problems while updating the linter table.

This script has gone through extensive review and full testing on Beta cluster and writes log entries as it executes to allow monitoring.

Event Timeline

Run it on testwiki:

ladsgroup@mwmaint1002:/srv/mediawiki/php-1.40.0-wmf.22$ time mwscript extensions/Linter/maintenance/migrateTagTemplate.php --wiki=testwiki --sleep 1

*******************************************************************************
NOTE: Do not run maintenance scripts directly, use maintenance/run.php instead!
      Running scripts directly has been deprecated in MediaWiki 1.40.
      It may not work for some (or any) scripts in the future.
*******************************************************************************

Running linter migrate linter_params to tag and template function, this may take a while
Migrating the linter_params field to the linter_tag and linter_template fields...
Completed migration of linter_params data in the linter table, 15439 rows updated.

real	0m34.356s
user	0m1.595s
sys	0m0.273s

No major issue seen.

Mentioned in SAL (#wikimedia-operations) [2023-02-20T07:27:40Z] <Amir1> running migrateTagTemplate.php on all wikis (T329766)

at zhwiki, would finish really soon.

Ladsgroup claimed this task.

This is done, I'm seeing empty linter_tag fields though, is that intentional?

Each linter_cat category defines what linter_params content is relevant and many categories do not have tag or template data. I did some quick checks using Quarry and all looks good for categories that should and should not have content in those fields. Some of the checks are listed below:

I checked enwiki for linter_tags != '' and found current count(*) = 5942358 and for linter_template != '' the current count(*) = 409685 and also ran checks like SELECT count(*) FROM linter WHERE linter_cat = 8 and linter_tag != ''; and got back count(*) = 239909 which are category 8 = misnested tags, and that is reasonable.

But always good to double check and verify.
Thanks for running these long running maintenance scripts.