Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
BBC RussianHomePhabricator
Log In
Maniphest T351719

When virtual domains mapping config uses 'db' as false, update.php does not create the table
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

When the virtual domains mapping config indicates that the local DB should be used using the config value [ 'db' => false ], the SchemaChangesHandler.php file does not recognise that the local DB should be used. When this config is undefined, the update handler works as intended.

This was found by @Djackson-ctr as part of QA'ing other tickets. This fix is needed to QA those tickets.

Steps to replicate the issue
  1. Define $wgVirtualDomainsMapping['virtual-mediamoderation'] = [ 'db' => false ]; in your LocalSettings.php
  2. Add MediaModeration to the wiki
  3. Run update.php

What happens?:
The output of the maintenance script has the text Unable to perform DB updates for MediaModeration as the table is on an virtual database domain.

What should have happened instead?:
No such text should appear and the database table mediamoderation_scan should be added to the local wiki's DB.

Software version

MediaWiki 1.42.0-alpha (5a624a4) 07:56, 14 November 2023. MediaModeration 0.1.0 (78a3f62) 18:45, 19 November 2023.

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
Resolvedkostajh
ResolvedNone
ResolvedBUG REPORTDreamy_Jazz
OpenNone
ResolvedBUG REPORTDreamy_Jazz
ResolvedDreamy_Jazz
Resolvedkostajh
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz

Event Timeline

Dreamy_Jazz renamed this task from When virtual domains mapping config is set to use the local DB, update.php does not create the table to When virtual domains mapping config uses 'db' as 'false', update.php does not create the table.Nov 21 2023, 2:29 PM
Dreamy_Jazz claimed this task.
Dreamy_Jazz updated the task description. (Show Details)
Dreamy_Jazz updated the task description. (Show Details)
Dreamy_Jazz set the point value for this task to 1.

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

[mediawiki/extensions/MediaModeration@master] Perform updates to DB when 'db' is false with no cluster

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

Dreamy_Jazz renamed this task from When virtual domains mapping config uses 'db' as 'false', update.php does not create the table to When virtual domains mapping config uses 'db' as false, update.php does not create the table.Nov 21 2023, 3:54 PM

Change 976244 merged by jenkins-bot:

[mediawiki/extensions/MediaModeration@master] Perform updates to DB when 'db' is false with no cluster

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

Suggested QA steps for betawikis:

  1. Open the DB for a betawiki
  2. Check that the mediamoderation_scan table now exists

Betawikis have update.php run automatically, so the table should now exist.

I have verified the MediaModeration_Scan table now exists on the English beta wiki.
Thank you @Dreamy_Jazz!!!

image.png (132×596 px, 7 KB)