Reviewed: https://review.openstack.org/535166 Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=6e397345b1b4f5dc9e67cebde817155693f5cf51 Submitter: Zuul Branch: master
commit 6e397345b1b4f5dc9e67cebde817155693f5cf51 Author: John L. Villalovos <[email protected]> Date: Wed Jan 17 21:01:29 2018 -0800 Resolve unit test failures with going to oslo.serialization 2.3.0 openstack/oslo.serialization made a change in commit c1a7079c26d27a2e46cca26963d3d9aa040bdbe8 which changed how jsonutils.to_primitive() handles Exception objects. Previously the actual Exception object would be returned but now it returns a 'repr' of the object. This was done because CircularReferences were occuring in some use cases with Exceptions and also in version 3.0 of oslo.serialization they were going to raise a ValueError() for unhandled types and this change caused Exceptions to now be handled. The code previously would call the serialization function and if any unknown Exception occurred it would just return action_result. With the change to oslo.serialization an exception was no longer being raised and thus no Exception would be raised and caught. Now check if action_result is an Exception and if so return it. Closes-Bug: #1728368 Change-Id: Ic374ec891a65f603433091cdae27b0d4aac8362f ** Changed in: glance Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to Glance. https://bugs.launchpad.net/bugs/1728368 Title: oslo.serialization 2.21.2 breaks glance Status in Glance: Fix Released Status in oslo.serialization: Invalid Bug description: glance unittests break with 2.21.2, work fine with 2.21.1: ====================================================================== FAIL: glance.tests.unit.v1.test_registry_api.TestRegistryAPI.test_update_all_image_members ---------------------------------------------------------------------- Traceback (most recent call last): File "glance/tests/unit/v1/test_registry_api.py", line 1629, in test_update_all_image_members content_type='json') File "glance/tests/utils.py", line 564, in get_api_response_ext self.assertEqual(res.status_int, http_resp) File "/data/dmueller/src/Cloud/glance/.tox/venv/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual self.assertThat(observed, matcher, message) File "/data/dmueller/src/Cloud/glance/.tox/venv/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat raise mismatch_error testtools.matchers._impl.MismatchError: 200 != 204 To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1728368/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

