queue's return 204 and no body when there are no queues

Bug #1379220 reported by Flavio Percoco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Fix Released
Critical
Flavio Percoco

Bug Description

Currently, Zaqar is returning 204 when there are no queues with an empty body. This is not consistent with the rest of the API and it does not respect the spec[0].

        # Buffer list of queues
        queues = list(next(results))

        # Check for an empty list
        if len(queues) == 0:
            resp.status = falcon.HTTP_204
            return

[0] https://wiki.openstack.org/wiki/Zaqar/specs/api/v1.1#List_Queues

Changed in zaqar:
assignee: nobody → Flavio Percoco (flaper87)
importance: Undecided → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zaqar (master)

Fix proposed to branch: master
Review: https://review.openstack.org/127175

Changed in zaqar:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zaqar (proposed/juno)

Fix proposed to branch: proposed/juno
Review: https://review.openstack.org/127264

Changed in zaqar:
milestone: none → juno-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zaqar (master)

Reviewed: https://review.openstack.org/127175
Committed: https://git.openstack.org/cgit/openstack/zaqar/commit/?id=bf79fb3cfe0762bb642895823556afc3b12b18c0
Submitter: Jenkins
Branch: master

commit bf79fb3cfe0762bb642895823556afc3b12b18c0
Author: Flavio Percoco <email address hidden>
Date: Thu Oct 9 11:16:30 2014 +0200

    Queue's empty list should return 200 and an object

    The queue's endpoint is not consistent with the rest of the API nor with
    the API specs. It currently returns 204 and no response when there are
    no queue's in the system. Instead, it should return 200 OK and an object
    with an empty `queues` list.

    Closes-bug: #1379220
    Change-Id: Ib3af5ef3829cc82f3e96bb5401f71b7599f5c5c8

Changed in zaqar:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on zaqar (proposed/juno)

Change abandoned by Flavio Percoco (<email address hidden>) on branch: proposed/juno
Review: https://review.openstack.org/127264

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zaqar (proposed/juno)

Reviewed: https://review.openstack.org/127264
Committed: https://git.openstack.org/cgit/openstack/zaqar/commit/?id=18b6090145fe9460a0c59698677f9fde04a93d25
Submitter: Jenkins
Branch: proposed/juno

commit 18b6090145fe9460a0c59698677f9fde04a93d25
Author: Flavio Percoco <email address hidden>
Date: Thu Oct 9 11:16:30 2014 +0200

    Queue's empty list should return 200 and an object

    The queue's endpoint is not consistent with the rest of the API nor with
    the API specs. It currently returns 204 and no response when there are
    no queue's in the system. Instead, it should return 200 OK and an object
    with an empty `queues` list.

    Closes-bug: #1379220
    Change-Id: Ib3af5ef3829cc82f3e96bb5401f71b7599f5c5c8

Changed in zaqar:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in zaqar:
milestone: juno-rc2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.