Stack Update API doesn't return an useful response.

Bug #1336729 reported by Masahito Muroi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Triaged
Low
Shashwat Srivastava

Bug Description

Stack update API return a response which just means "the request is accepted".

<html>
 <head>
  <title>202 Accepted</title>
 </head>
 <body>
  <h1>202 Accepted</h1>
  The request is accepted for processing.<br /><br />

 </body>
</html>

So stack-update api should return a json response like stack create API.

Changed in heat:
assignee: nobody → Masahito Muroi (muroi-masahito)
Revision history for this message
Thomas Herve (therve) wrote :

It's not clear why. What are you expecting it to return?

Changed in heat:
status: New → Incomplete
Revision history for this message
Masahito Muroi (muroi-masahito) wrote :

At least I expect a json style response when I call stack update API with json body.

Revision history for this message
Steve Baker (steve-stevebaker) wrote :

A 202 status code with no response body seems appropriate for this API call. I can think of nothing the body needs to return which isn't already known.

It is quite legitimate for REST API calls to only return a status code.

Revision history for this message
Masahito Muroi (muroi-masahito) wrote :

I agree no response body is better than HTML response too.

How about changing this response body to nothing?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: Incomplete → In Progress
Revision history for this message
Zane Bitter (zaneb) wrote :

The content encoding is determined by the "Accept" header of the request, not the "Content-Type". Although we're not actually looking at that, I'm not sure how returning no data is better than returning data that the caller doesn't have to look at but which can make e.g. debugging in a browser easier/possible.

Revision history for this message
Steve Baker (steve-stevebaker) wrote : Re: [Bug 1336729] Re: Stack Update API doesn't return an useful response.

On 23/07/14 10:30, Zane Bitter wrote:
> The content encoding is determined by the "Accept" header of the
> request, not the "Content-Type". Although we're not actually looking at
> that, I'm not sure how returning no data is better than returning data
> that the caller doesn't have to look at but which can make e.g.
> debugging in a browser easier/possible.
>
I'm not against returning body content if it is actually useful to
someone, I was just saying that returning only a status code is valid REST.

Angus Salkeld (asalkeld)
Changed in heat:
importance: Undecided → Low
Changed in heat:
status: In Progress → Triaged
Revision history for this message
Shashwat Srivastava (shashwat-srivastava) wrote :

Will try to fix to unit case for this.
Taking over

Changed in heat:
assignee: Masahito Muroi (muroi-masahito) → Shashwat Srivastava (shashwat-srivastava)
Zane Bitter (zaneb)
Changed in heat:
assignee: Shashwat Srivastava (shashwat-srivastava) → nobody
assignee: nobody → Shashwat Srivastava (shashwat-srivastava)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (master)

Change abandoned by Masahito Muroi (<email address hidden>) on branch: master
Review: https://review.openstack.org/108975

Rico Lin (rico-lin)
Changed in heat:
milestone: none → no-priority-tag-bugs
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.