GET messages on a non existing queue returns 204

Bug #1243752 reported by Malini Kamalambal on 2013-10-23
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
zaqar
Low
Unassigned

Bug Description

USER FEEDBACK:

GET messages on a non existing queue returns a 204.
The API should return a 404 in this case, to reflect resource not found

GET /v1/queues/affffrafafafa/messages?echo=True
Expected Response : 404
Actual Response: 204

NOTE: Claim messages on a non existing queue also returns 204. This also needs to be updated to return a 404

Kurt Griffiths (kgriffs) wrote :

let's try to get it done without sacrificing performance.

Changed in marconi:
status: New → Triaged
importance: Undecided → High
milestone: none → icehouse-1
Zhihao Yuan (zyuan) on 2013-10-23
Changed in marconi:
assignee: nobody → Zhihao Yuan (zyuan)
description: updated
description: updated
description: updated
Zhihao Yuan (zyuan) wrote :

This will be an important API change; I suggest to wait for Flavio back and we vote on this.

description: updated
description: updated
Kurt Griffiths (kgriffs) wrote :

If we do it, use oslo.cache to check queue exists.

Kurt Griffiths (kgriffs) wrote :

Wait to see if we get more complaints from users before we decide whether to fix this.

Changed in marconi:
importance: High → Low
Kurt Griffiths (kgriffs) wrote :

On second thought, take a look at tests/functional/wsgi/v1/test_queues.py - the 204's do seem a bit odd when viewed next to all those 404's.

Kurt Griffiths (kgriffs) wrote :

One more thought - if we are going to be lazy, we should be lazy all the way. Let's choose which way to go and be consistent.

Reviewed: https://review.openstack.org/53691
Committed: http://github.com/openstack/marconi/commit/e515053dd16219babda80de21e49320821f8885f
Submitter: Jenkins
Branch: master

commit e515053dd16219babda80de21e49320821f8885f
Author: Malini Kamalambal <email address hidden>
Date: Thu Oct 24 12:57:19 2013 -0400

    Add Tests for non-existing resources

    This patch adds tests for action on non-existing queues, messages & claims.

    Change-Id: I68517b1b98f668eff86a0bcad19dc9ed8d01267c
    Tests-Bug: #1243752

Thierry Carrez (ttx) on 2013-12-19
Changed in marconi:
milestone: icehouse-1 → icehouse-2
Kurt Griffiths (kgriffs) wrote :

Let's do this as part of the v1.1 API...

Changed in marconi:
assignee: Zhihao Yuan (zyuan) → nobody
Seif Lotfy (seif) wrote :

Hey guys, I am also getting 204s on GET messages on non-existing queues. I am not sure this makes sense. Any objections if I hack a fix?

Kurt Griffiths (kgriffs) wrote :

I was thinking of only changing that behavior in the v1.1 API - if you would like to tackle it there, and leave 1.0 as-is, that would be cool. Thanks!

Changed in marconi:
assignee: nobody → Victoria Martínez de la Cruz (vkmc)
Changed in marconi:
assignee: Victoria Martínez de la Cruz (vkmc) → nobody

This bug will be no longer relevant when the support for lazy queues creation gets merged in v1.1. Following the lazy creation criteria, if it is possible to send messages to a queue that doesn't exist, then it's also possible to retrieve messages for a queue that doesn't exist.

It is still valid, though, for v1.0.

Changed in marconi:
assignee: nobody → Victoria Martínez de la Cruz (vkmc)

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

Changed in marconi:
status: Triaged → In Progress
Kurt Griffiths (kgriffs) on 2014-06-10
no longer affects: marconi/icehouse
Kurt Griffiths (kgriffs) wrote :

Do to lack of complaints from customers, and the fact that this behavior is actually "correct" in v1.1, we decided as a team that fixing this bug would be more trouble than it is worth.

Thierry Carrez (ttx) on 2014-06-12
no longer affects: marconi/juno
Kurt Griffiths (kgriffs) on 2014-06-12
Changed in marconi:
status: In Progress → Won't Fix
Changed in marconi:
assignee: Victoria Martínez de la Cruz (vkmc) → nobody

Change abandoned by Victoria Martínez de la Cruz (<email address hidden>) on branch: master
Review: https://review.openstack.org/95593
Reason: Won't fix - https://launchpad.net/bugs/1243752

Thierry Carrez (ttx) on 2014-07-10
Changed in marconi:
milestone: juno-2 → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers