jsonpatch 1.20 breaks glanceclient

Bug #1736005 reported by Brian Rosmaita
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Critical
Brian Rosmaita
OpenStack Global Requirements
Fix Released
Undecided
Brian Rosmaita

Bug Description

jsonpatch 1.20 was released 25 Nov 2017 and added to upper-constraints by Change-Id: Ib49b7644cba86e2147176921356489a0d3729fee

When I set the upper constraint to 1.16 (the previous release), the tests pass locally.

Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

I wasn't sure what the right way to fix this is, so I've put up two patches to requirements:

https://review.openstack.org/524987 - only lowers jsonpatch back to 1.16

https://review.openstack.org/524988 - reverts Change-Id: Ib49b7644cba86e2147176921356489a0d3729fee (which included changes to versions of some other libraries)

Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

Oh yeah, to see an example of this: https://review.openstack.org/#/c/524821/

Revision history for this message
Matthew Thode (prometheanfire) wrote :

Has this issue been reported upstream or is glance going to need to change it's behaviour?

Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

Haven't reported it upstream yet as I don't know exactly what the problem is. Also not sure if it's confined to the glanceclient or if it will impact glance (I don't think it's caused any test failures for glance, but that might be a test coverage problem).

Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

Here's what's breaking glanceclient tests:

(py27) [bug/1736005] devVM! cat has-friend.json
{ "name": "fred", "friend": "barney", "spouse": "betty" }
(py27) [bug/1736005] devVM! cat no-friend.json
{ "name": "fred", "spouse": "betty" }

(py27) [bug/1736005] devVM! jsondiff --version
jsondiff 1.20
(py27) [bug/1736005] devVM! jsondiff has-friend.json no-friend.json
[{"path": "/friend", "value": "barney", "op": "remove"}]

(py27) [bug/1736005] devVM! /usr/local/bin/jsondiff --version
jsondiff 1.16
(py27) [bug/1736005] devVM! /usr/local/bin/jsondiff has-friend.json no-friend.json
[{"path": "/friend", "op": "remove"}]
(py27) [bug/1736005] devVM!

There's an extraneous 'value' field included on the remove operation in 1.20 that the glanceclient tests don't like.

Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

My reading of https://tools.ietf.org/html/rfc6902#section-4.2 is that the extraneous 'value' field should not be there. Opened upstream issue https://github.com/stefankoegl/python-json-patch/issues/76 .

Changed in openstack-requirements:
status: New → In Progress
assignee: nobody → Brian Rosmaita (brian-rosmaita)
Changed in python-glanceclient:
assignee: nobody → Brian Rosmaita (brian-rosmaita)
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

Made a pull request upstream to fix this issue: https://github.com/stefankoegl/python-json-patch/pull/77

Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

To summarize:

For the Requirements bug, https://review.openstack.org/524987

For the Glance bug: fixed temporarily by the Requirements fix. I'm pretty sure this should be fixed upstream, so I've filed an issue and a pull request fixing it:

* https://github.com/stefankoegl/python-json-patch/issues/76
* https://github.com/stefankoegl/python-json-patch/pull/77

Changed in python-glanceclient:
status: Triaged → In Progress
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

The requirements change has merged.

Revision history for this message
Matthew Thode (prometheanfire) wrote :

fixed and consuming the update now, closing

Changed in openstack-requirements:
status: In Progress → Fix Released
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

jsonpatch 1.21 was released on 2017-12-30 and includes the fix for this bug.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/requirements 1.2.0

This issue was fixed in the openstack/requirements 1.2.0 release.

Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

Problem was upstream, not with glanceclient. Fix is:

* !=1.20 in openstack/requirements/global-requirements.txt (Change-Id: I13c8f4e71841c4765bd0fff80858a2683602d1db)

* fix for jsonpatch issue https://github.com/stefankoegl/python-json-patch/issues/76 included in jsonpatch 1.21 release

Changed in python-glanceclient:
status: In Progress → Fix Released
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.