Description
Observed in LogStash, a frequent occurrence of errors of type
MediaWiki\Extension\WikiLambda\ZObjectStore::findZTesterResult threw from ZObjectFactory: Key value not wellformed
These errors occur while the ZObjectFactory tries to create ZResponseEnvelope from the returned value of a test which has failed.
See example log: https://logstash.wikimedia.org/app/discover#/doc/logstash-*/logstash-mediawiki-1-7.0.0-1-2024.11.20?id=HnJzSZMBh8RuxXYkwBPH
Observed behavior
The Z22 object that causes Wikilambda::ZObjectStore to crash is this:
{
"Z1K1": "Z22",
"Z22K1": {
"Z1K1": "Z40",
"Z40K1": "Z42"
},
"Z22K2": {
"Z1K1": {
"Z1K1": "Z7",
"Z7K1": "Z883",
"Z883K1": "Z6",
"Z883K2": "Z1"
},
"K1": [
{
"Z1K1": "Z7",
"Z7K1": "Z882",
"Z882K1": "Z6",
"Z882K2": "Z1"
},
{
"Z1K1": {
"Z1K1": "Z7",
"Z7K1": "Z882",
"Z882K1": "Z6",
"Z882K2": "Z1"
},
"K1": "errors",
"K2": {
"Z1K1": "Z5",
"Z5K1": "Z507",
"Z5K2": {
"Z1K1": {
"Z1K1": "Z7",
"Z7K1": "Z885",
"Z885K1": "Z507"
},
"Z507K1": {
"Z1K1": "Z99",
"Z99K1": {} <-------------------------------------- INVALID VALUE
},
"Z507K2": {
"Z1K1": "Z5",
"Z5K1": "Z500",
"Z5K2": {
"Z1K1": {
"Z1K1": "Z7",
"Z7K1": "Z885",
"Z885K1": "Z500"
},
"Z500K1": "Call tuples failed in returnOnFirstError. Error: TypeError: responseEnvelope.Z22K1.asJSON is not a function."
}
}
}
}
},
...
]
}
}- The object returned in the error key is not wellformed because Z99K1 contains an invalid value {}
- Additionally this response points at another error in the orchestrator Call tuples failed in returnOnFirstError. Error: TypeError: responseEnvelope.Z22K1.asJSON is not a function.
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Back-end_Task/Bug_completion_checklist