Page MenuHomePhabricator

Missing SCHEMA_NEXT_VERSION in migration schemas
Closed, ResolvedPublicBUG REPORT

Description

The migration schemas for versions 2.0.0 and 2.0.1 where missing to inform its next version, making it impossible for the migration script to figure out what to run.

Steps to replicate the issue (include links if applicable):

sgimeno@deployment-mwmaint03:~$ foreachwiki extensions/CommunityConfiguration/maintenance/migrateConfig.php --dry-run CommunityUpdates
-----------------------------------------------------------------
arwiki
-----------------------------------------------------------------
LogicException from line 86 of /srv/mediawiki/php-master/extensions/CommunityConfiguration/src/Schema/SchemaMigrator.php: GrowthExperiments/Config/Schemas/CommunityUpdatesSchema/2.0.2 does not have a next/previous version linked.
#0 /srv/mediawiki/php-master/extensions/CommunityConfiguration/src/Schema/SchemaMigrator.php(46): MediaWiki\Extension\CommunityConfiguration\Schema\SchemaMigrator->doConvertDataToVersion(Object(MediaWiki\Extension\CommunityConfiguration\Validation\JsonSchemaValidator), Object(stdClass), '2.0.0', '2.0.2')
#1 /srv/mediawiki/php-master/extensions/CommunityConfiguration/maintenance/migrateConfig.php(83): MediaWiki\Extension\CommunityConfiguration\Schema\SchemaMigrator->convertDataToVersion(Object(MediaWiki\Extension\CommunityConfiguration\Provider\DataProvider), '2.0.2')
#2 /srv/mediawiki/php-master/maintenance/includes/MaintenanceRunner.php(696): MediaWiki\Extension\CommunityConfiguration\Maintenance\MigrateConfig->execute()
#3 /srv/mediawiki/php-master/maintenance/run.php(51): MediaWiki\Maintenance\MaintenanceRunner->run()
#4 /srv/mediawiki/multiversion/MWScript.php(158): require_once('/srv/mediawiki/...')
#5 {main}

What happens?:

The migration(s) fail to run.

What should have happened instead?:
The config data should be migrated to the target (latest) version.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Only in Beta
Other information (browser name/version, screenshots, etc.):
The error is actually miss-leading because it points to the wrong schema version 2.0.2, while the schemas missing to inform the next version are 2.0.0 and 2.0.1, see T370859

Event Timeline

Change #1056465 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] CommunityUpdates: add missing next version in migration schemas

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

Sgs triaged this task as High priority.Jul 24 2024, 10:48 AM
Sgs moved this task from Inbox to FY2024-25 Q1 Sprint 2 on the Growth-Team board.
Sgs edited projects, added Growth-Team (FY2024-25 Q1 Sprint 2); removed Growth-Team.
Sgs moved this task from Incoming to Code Review on the Growth-Team (FY2024-25 Q1 Sprint 2) board.

Change #1056465 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] CommunityUpdates: add missing next version in migration schemas

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

Resolving as the migration was already run in Beta.