← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1250158] Re: Glance V2 incorrectly implements JSON Patch 'add'

 

** Changed in: glance
       Status: Fix Committed => Fix Released

** Changed in: glance
    Milestone: None => kilo-1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1250158

Title:
  Glance V2 incorrectly implements JSON Patch 'add'

Status in OpenStack Image Registry and Delivery Service (Glance):
  Fix Released

Bug description:
  According to the RFC for JSON Patch
  (http://tools.ietf.org/html/rfc6902) the 'add' operation, in the event
  that the property being added already exists, should replace the
  existing value. However Glance V2 raises a 409 - Conflict error.

  From the RFC. Note the third bullet:

  'The "add" operation performs one of the following functions,
     depending upon what the target location references:

     o  If the target location specifies an array index, a new value is
        inserted into the array at the specified index.

     o  If the target location specifies an object member that does not
        already exist, a new member is added to the object.

     o  If the target location specifies an object member that does exist,
        that member's value is replaced.'

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1250158/+subscriptions