API named operations that modify an object don't always return the modified object

Bug #369293 reported by Deryck Hodge on 2009-04-29
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Low
Unassigned
lazr.restful
Low
Unassigned
lazr.restfulclient
Low
Unassigned

Bug Description

I ran into an issue with the JavaScript client where a named operation that modified a bugtask object didn't return the modified object; then subsequent calls to lp_save would generate a 412 Precondition failed error (like bug #336866).

In talking about this with leonardr on IRC, it seems named operations really should return the modified object with a 209 response code. The Python and JavaScript clients should handle this correctly then.

affects: launchpad → lazr.restful
Curtis Hovey (sinzui) on 2009-10-09
tags: added: tech-debt
Changed in lazr.restful:
status: New → Triaged
Changed in lazr.restfulclient:
status: New → Triaged
Changed in lazr.restful:
importance: Undecided → Medium
Changed in lazr.restfulclient:
importance: Undecided → Medium
Ian Booth (wallyworld) on 2011-04-01
Changed in launchpad:
importance: Undecided → Medium
status: New → Triaged
Robert Collins (lifeless) wrote :

How would we tell a-priori whether a given named operation mutates the object or not?

Changed in launchpad:
importance: Medium → High
Changed in lazr.restfulclient:
importance: Medium → High
Changed in lazr.restful:
importance: Medium → High
Aaron Bentley (abentley) wrote :

@lifeless: ObjectModifiedEvents? :-)

Gary Poster (gary) wrote :

unfortunately we do not fire events reliably at all.

I don't know of an a priori way with Launchpad named operations.

I suspect Leonard would have wanted the proposed generic collection-based REST api to normalize these sorts of questions, drastically reducing the number of named operations needed, and thus the amount of analysis we would need to determine whether a given named operation were a modifier. That sounds good to me. I'm sure we could come with other conventions/constraints. None of these solutions are trivial, afaik.

summary: - API named operations that modify an object should return the modified
- object
+ API named operations that modify an object don't always return the
+ modified object
Changed in lazr.restfulclient:
importance: High → Low
Changed in lazr.restful:
importance: High → Low
Changed in launchpad:
importance: High → Low
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers