Page MenuHomePhabricator

The cirrus config dump API may produce unexpected json output
Open, Needs TriagePublic3 Estimated Story Points

Description

On loginwiki the configdump may produce a plain string array instead of a map with namespace ids as keys: https://login.wikimedia.org/w/api.php?action=cirrus-config-dump&prop=replicagroup|namespacemap&format=json&formatversion=2

This is causing the search update to fail with:

java.lang.IllegalArgumentException: Cannot deserialize value of type `java.util.LinkedHashMap<java.lang.Long,java.lang.String>` from Array value (token `JsonToken.START_ARRAY`)
 at [Source: UNKNOWN; byte offset: #UNKNOWN]
	at com.fasterxml.jackson.databind.ObjectMapper._convert(ObjectMapper.java:4544)
	at com.fasterxml.jackson.databind.ObjectMapper.convertValue(ObjectMapper.java:4485)
	at org.wikimedia.discovery.cirrus.updater.producer.graph.CirrusNamespaceIndexMap.lambda$load$3(CirrusNamespaceIndexMap.java:144)

The reason we discover this issue just now is that loginwiki events got enabled just recently (T408701).

The pipeline has been unblocked by temporarily excluding loginwiki (https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/1200294).

AC:

  • the cirrus config dump with namespacemap should produce a value map of namespace ids -> index_name

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
dcausse renamed this task from The cirrus config dump API may produce unexpected json ouput to The cirrus config dump API may produce unexpected json output.Oct 31 2025, 10:13 AM
dcausse updated the task description. (Show Details)
pfischer set the point value for this task to 3.Nov 3 2025, 4:44 PM

Change #1201186 had a related patch set uploaded (by Ebernhardson; author: Ebernhardson):

[mediawiki/extensions/CirrusSearch@master] configdump: Ensure namespaces are associative array

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

Change #1201186 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@master] configdump: Ensure namespaces are associative array

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