Page MenuHomePhabricator

Opensearch JSON output changed in a non-backwards compatible way, if warnings are present
Closed, ResolvedPublic

Description

It used to look like:

{
    "warnings": {
        "main": {
            "*": "Unrecognized parameter: 'ddd'"
        }
    },
    "0": "Berlin",
    "1": [
        "Berlin"
    ],
    "2": [
        ""
    ],
    "3": [
        "http://localhost/mwt/wiki/dewiki/index.php/Berlin"
    ]
}

changed to:

[
    "Berlin",
    {
        "main": {
            "*": "Unrecognized parameter: 'ddd'"
        }
    },
    [
        "Berlin"
    ],
    [
        ""
    ],
    [
        "http://localhost/mwt/wiki/dewiki/index.php/Berlin"
    ]
]

This is only a problems if warnings are shown (like when an unrecognized parameter is present, as above).

Event Timeline

hoo raised the priority of this task from to Needs Triage.
hoo updated the task description. (Show Details)
hoo added a subscriber: hoo.

Change 207693 had a related patch set uploaded (by Hoo man):
Restore B/C for ApiOpenSearch json output if warnings are present

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

hoo set Security to None.

Change 207693 merged by jenkins-bot:
Restore B/C for ApiOpenSearch json output if warnings are present

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

Change 207696 had a related patch set uploaded (by Legoktm):
Restore B/C for ApiOpenSearch json output if warnings are present

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

Change 207697 had a related patch set uploaded (by Legoktm):
Restore B/C for ApiOpenSearch json output if warnings are present

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

Change 207697 merged by jenkins-bot:
Restore B/C for ApiOpenSearch json output if warnings are present

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

Change 207696 merged by jenkins-bot:
Restore B/C for ApiOpenSearch json output if warnings are present

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

hoo claimed this task.
hoo edited projects, added Regression; removed Patch-For-Review.
Anomie reopened this task as Open.EditedApr 30 2015, 1:14 PM
Anomie added a subscriber: Anomie.

While this has been hacked around for formatversion=1, it's not really fixed.

OpenSearch JSON format can't handle warnings, so the "BC" output is also incorrect. It's just less likely to break permissive clients.

hoo renamed this task from Opensearch JSON output changed in a non-backwards compatible way, if warning are present to Opensearch JSON output changed in a non-backwards compatible way, if warnings are present.Apr 30 2015, 1:18 PM
Legoktm triaged this task as High priority.Apr 30 2015, 7:36 PM
Legoktm added a project: MW-1.25-release.

Change 207906 had a related patch set uploaded (by Anomie):
ApiOpenSearch: Don't output warnings in JSON mode

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

Change 207906 merged by jenkins-bot:
ApiOpenSearch: Don't output warnings in JSON mode

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

Change 211281 had a related patch set uploaded (by Legoktm):
ApiOpenSearch: Don't output warnings in JSON mode

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

Change 211281 merged by jenkins-bot:
ApiOpenSearch: Don't output warnings in JSON mode

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