Page MenuHomePhabricator

TypeError: Argument 1 passed to MediaWiki\Extension\Translate\MessageGroupProcessing\MessageGroups::groupLabelSort() must implement interface MessageGroup, array given
Closed, ResolvedPublic2 Estimated Story PointsPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   TypeError: Argument 1 passed to MediaWiki\Extension\Translate\MessageGroupProcessing\MessageGroups::groupLabelSort() must implement interface MessageGroup, array given
error.stack_trace
from /srv/mediawiki/php-1.41.0-wmf.17/extensions/Translate/src/MessageGroupProcessing/MessageGroups.php(693)
#0 [internal function]: MediaWiki\Extension\Translate\MessageGroupProcessing\MessageGroups::groupLabelSort(array, WikiPageMessageGroup)
#1 /srv/mediawiki/php-1.41.0-wmf.17/extensions/Translate/src/MessageGroupProcessing/QueryMessageGroupsActionApi.php(117): usort(array, array)
#2 /srv/mediawiki/php-1.41.0-wmf.17/includes/api/ApiQuery.php(699): MediaWiki\Extension\Translate\MessageGroupProcessing\QueryMessageGroupsActionApi->execute()
#3 /srv/mediawiki/php-1.41.0-wmf.17/includes/api/ApiMain.php(1915): ApiQuery->execute()
#4 /srv/mediawiki/php-1.41.0-wmf.17/includes/api/ApiMain.php(892): ApiMain->executeAction()
#5 /srv/mediawiki/php-1.41.0-wmf.17/includes/api/ApiMain.php(863): ApiMain->executeActionWithErrorHandling()
#6 /srv/mediawiki/php-1.41.0-wmf.17/api.php(95): ApiMain->execute()
#7 /srv/mediawiki/php-1.41.0-wmf.17/api.php(48): wfApiMain()
#8 /srv/mediawiki/w/api.php(3): require(string)
#9 {main}
Impact

12 errors in a 3 hour span following group0 promotion of 1.41.0-wmf.17.

Notes

Details

MediaWiki Version
1.41.0-wmf.17
Request URL
https://www.mediawiki.org/w/api.php?action=query&format=*&meta=*&mgformat=*&mgiconsize=*&mglanguageFilter=*&mgprop=*

Event Timeline

dduvall triaged this task as Unbreak Now! priority.Jul 11 2023, 9:11 PM
dduvall created this task.

Naively cross referencing the stack trace with git blame brought me to https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Translate/+/935740

@Nikerabbit or @abi_ do you think that change may have surfaced this bug?

Change 937215 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] QueryMessageGroupActionApi: Apply sorting to groups only

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

Change 937215 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] QueryMessageGroupActionApi: Apply sorting to groups only

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

Naively cross referencing the stack trace with git blame brought me to https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Translate/+/935740

@Nikerabbit or @abi_ do you think that change may have surfaced this bug?

Yes, it is. The patch to fix this is merged. I'll backport it.

Change 937117 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@wmf/1.41.0-wmf.17] QueryMessageGroupActionApi: Apply sorting to groups only

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

Naively cross referencing the stack trace with git blame brought me to https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Translate/+/935740

@Nikerabbit or @abi_ do you think that change may have surfaced this bug?

Yes, it is. The patch to fix this is merged. I'll backport it.

Thank you!

Change 937117 merged by jenkins-bot:

[mediawiki/extensions/Translate@wmf/1.41.0-wmf.17] QueryMessageGroupActionApi: Apply sorting to groups only

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

Mentioned in SAL (#wikimedia-operations) [2023-07-12T18:16:24Z] <dduvall@deploy1002> Started scap: Backport for [[gerrit:937117|QueryMessageGroupActionApi: Apply sorting to groups only (T341627)]]

Mentioned in SAL (#wikimedia-operations) [2023-07-12T18:17:55Z] <dduvall@deploy1002> abi and dduvall: Backport for [[gerrit:937117|QueryMessageGroupActionApi: Apply sorting to groups only (T341627)]] synced to the testservers: mwdebug1002.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug2001.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-07-12T18:24:46Z] <dduvall@deploy1002> Finished scap: Backport for [[gerrit:937117|QueryMessageGroupActionApi: Apply sorting to groups only (T341627)]] (duration: 08m 22s)