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 created this task.Apr 30 2015, 12:39 AM
hoo updated the task description. (Show Details)
hoo raised the priority of this task from to Needs Triage.
hoo added a subscriber: hoo.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 30 2015, 12:39 AM

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 updated the task description. (Show Details)Apr 30 2015, 12:43 AM
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 closed this task as Resolved.Apr 30 2015, 2:27 AM
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.

Anomie claimed this task.Apr 30 2015, 1:14 PM
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

Legoktm closed this task as Resolved.May 15 2015, 8:32 PM