Page MenuHomePhabricator

CommunityUpdates: Array value found, but an object is required when running migrateConfig
Closed, ResolvedPublicBUG REPORT

Description

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

sgimeno@deployment-mwmaint03:~$ mwscript extensions/CommunityConfiguration/maintenance/migrateConfig.php --wiki=enwiki CommunityUpdates
Failed to update the store with new config.

== Error details ==
<ul>
<li>
DRAFT: Array value found, but an object is required. Key: GEHomepageCommunityUpdatesThumbnailFile
</li>
<li>
DRAFT: Array value found, but an object is required. Key: GEHomepageCommunityUpdatesCallToAction
</li>
</ul>

What happens?:

The script fails to migrate the schema to the new version. It yields a validation error. The types for both GEHomepageCommunityUpdatesThumbnailFile and GEHomepageCommunityUpdatesCallToAction is object but the version converter sets them as PHP arrays.

What should have happened instead?:

The migration should be applied correctly, creating objects for both keys.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Beta

Other information (browser name/version, screenshots, etc.):
The script did not yield any error when using dry-run flag, maybe the blob update should be validated in that mode as well.

Event Timeline

Sgs triaged this task as Medium priority.

I haven't determined the impact, probably nothing user-facing. The interesting part would be to build some generic test for exercising migrations since many things can go off, eg T370860, T370782.

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

[mediawiki/extensions/GrowthExperiments@master] CommunityUpdates: use appropriate type object in schema converter

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

Sgs renamed this task from CommunityUpdates: Array value found, but an object is required to CommunityUpdates: Array value found, but an object is required when running migrateConfig.Jul 29 2024, 3:38 PM
Sgs moved this task from Incoming to Code Review on the Growth-Team (FY2024-25 Q1 Sprint 2) board.

Change #1057909 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] CommunityUpdates: use appropriate type object in schema converter

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

Resolving as the migration was already run in Beta.