)]}'
{"nova/image/glance.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5bb80df52dc34861bd1393543dc076759433aeb7","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        except Exception:"},{"line_number":320,"context_line":"            _reraise_translated_image_exception(image_id)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        if image_chunks.wrapped is None:"},{"line_number":323,"context_line":"            # None is a valid return value, but there\u0027s nothing we can do with"},{"line_number":324,"context_line":"            # a image with no associated data"},{"line_number":325,"context_line":"            raise exception.ImageUnacceptable(image_id\u003dimage_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_853c66e1","line":322,"range":{"start_line":322,"start_character":11,"end_line":322,"end_character":31},"updated":"2017-12-11 18:35:25.000000000","message":"Why isn\u0027t the wrapped attribute checked below when dealing with image_chunks? Is this new and if so, can you link to the change to glanceclient in which this is introduced? My point being, if one were to try and backport this fix, would this fail with older versions of glanceclient?","commit_id":"4ce3f58cac56f3d17c1c449bf244bfda13891ac2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d6d8ce8f2c55339fbbbda0d80918d840f555619","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        except Exception:"},{"line_number":320,"context_line":"            _reraise_translated_image_exception(image_id)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        if image_chunks.wrapped is None:"},{"line_number":323,"context_line":"            # None is a valid return value, but there\u0027s nothing we can do with"},{"line_number":324,"context_line":"            # a image with no associated data"},{"line_number":325,"context_line":"            raise exception.ImageUnacceptable(image_id\u003dimage_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_8baa1a6e","line":322,"range":{"start_line":322,"start_character":11,"end_line":322,"end_character":31},"in_reply_to":"df87a7cf_5ccdc7b4","updated":"2017-12-12 17:40:08.000000000","message":"So if we want this to be backportable, why don\u0027t we do a condicitional hasattr check on image_checks.wrapped? Something like:\n\nif image_chunks is None or getattr(image_chunks, \u0027wrapped\u0027, None) is None:\n    fail","commit_id":"4ce3f58cac56f3d17c1c449bf244bfda13891ac2"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5599963e6c37cdabeb3c009c89302634cad89170","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        except Exception:"},{"line_number":320,"context_line":"            _reraise_translated_image_exception(image_id)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        if image_chunks.wrapped is None:"},{"line_number":323,"context_line":"            # None is a valid return value, but there\u0027s nothing we can do with"},{"line_number":324,"context_line":"            # a image with no associated data"},{"line_number":325,"context_line":"            raise exception.ImageUnacceptable(image_id\u003dimage_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_5ccdc7b4","line":322,"range":{"start_line":322,"start_character":11,"end_line":322,"end_character":31},"in_reply_to":"df87a7cf_853c66e1","updated":"2017-12-12 10:13:26.000000000","message":"\u003e Why isn\u0027t the wrapped attribute checked below when dealing with image_chunks?\n\nSee below.\n\n\u003e  Is this new and if so, can you link to the change to glanceclient in which this is introduced? My point being, if one were to try and backport this fix, would this fail with older versions of glanceclient?\n\nThis will work with versions of glanceclient \u003e\u003d 2.6 [1]. If older branches use something different to this, we would need to use the earlier version of the patch. This seems to affect only Newton [2].\n\n[1] https://github.com/openstack/python-glanceclient/commit/610177a779b95f931356c1e90b05a5bffd2616b3\n[2] https://github.com/openstack/requirements/blob/stable/newton/upper-constraints.txt#L287","commit_id":"4ce3f58cac56f3d17c1c449bf244bfda13891ac2"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"42e6dbfb84056e3758a635dcf1e11960d41ec826","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        except Exception:"},{"line_number":320,"context_line":"            _reraise_translated_image_exception(image_id)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        if image_chunks.wrapped is None:"},{"line_number":323,"context_line":"            # None is a valid return value, but there\u0027s nothing we can do with"},{"line_number":324,"context_line":"            # a image with no associated data"},{"line_number":325,"context_line":"            raise exception.ImageUnacceptable(image_id\u003dimage_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_f23388f5","line":322,"range":{"start_line":322,"start_character":11,"end_line":322,"end_character":31},"in_reply_to":"df87a7cf_8baa1a6e","updated":"2017-12-13 09:32:51.000000000","message":"I didn\u0027t because the first assertion is dead code for the two most recent versions of nova and figured removing \u0027wrapped\u0027 as part of the backport process wouldn\u0027t be an issue. I can do this though if you\u0027d rather not modify the backported patch?","commit_id":"4ce3f58cac56f3d17c1c449bf244bfda13891ac2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"10a90601ed153592ab5a33a880dedb842ed6e4ec","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        except Exception:"},{"line_number":320,"context_line":"            _reraise_translated_image_exception(image_id)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        if image_chunks.wrapped is None:"},{"line_number":323,"context_line":"            # None is a valid return value, but there\u0027s nothing we can do with"},{"line_number":324,"context_line":"            # a image with no associated data"},{"line_number":325,"context_line":"            raise exception.ImageUnacceptable(image_id\u003dimage_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_19034d0f","line":322,"range":{"start_line":322,"start_character":11,"end_line":322,"end_character":31},"in_reply_to":"df87a7cf_f23388f5","updated":"2018-01-05 15:56:18.000000000","message":"upper-constraints isn\u0027t what we\u0027d base the glanceclient boundary on, we\u0027d use global-requirements because that defines the minimum required version.\n\nIt looks like \u003e\u003d2.8 is the minimum required version of glanceclient going back to stable/pike. Ocata requires \u003e\u003d2.5 so we couldn\u0027t backport this to ocata without changes, but I\u0027m not sure we need to backport it to ocata anyway given it\u0027s probably very latent anyway.","commit_id":"4ce3f58cac56f3d17c1c449bf244bfda13891ac2"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5599963e6c37cdabeb3c009c89302634cad89170","unresolved":false,"context_lines":[{"line_number":364,"context_line":"            # Perform image signature verification"},{"line_number":365,"context_line":"            if verifier:"},{"line_number":366,"context_line":"                try:"},{"line_number":367,"context_line":"                    for chunk in image_chunks:"},{"line_number":368,"context_line":"                        verifier.update(chunk)"},{"line_number":369,"context_line":"                    verifier.verify()"},{"line_number":370,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_1c95ff86","line":367,"range":{"start_line":367,"start_character":0,"end_line":367,"end_character":46},"updated":"2017-12-12 10:13:26.000000000","message":"You\u0027re referring to this, I assume? If so, it\u0027s probably best to look at what glancelient is doing. I\u0027ve described it in the preceding patch [1] but tl;dr: a \u0027__next__\u0027 function is provided that ensures iterations are through \u0027wrapped\u0027\n\nhttps://review.openstack.org/#/c/527182/1","commit_id":"4ce3f58cac56f3d17c1c449bf244bfda13891ac2"}],"nova/tests/unit/image/test_glance.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9babb9b17affb7318389c0d03f0d0ad9860196a1","unresolved":false,"context_lines":[{"line_number":646,"context_line":"        ctx \u003d mock.sentinel.ctx"},{"line_number":647,"context_line":"        service \u003d glance.GlanceImageServiceV2(client)"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"        with testtools.ExpectedException(exception.ImageUnacceptable):"},{"line_number":650,"context_line":"            service.download(ctx, mock.sentinel.image_id)"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"    @mock.patch(\u0027nova.image.glance.GlanceImageServiceV2._get_transfer_module\u0027)"},{"line_number":653,"context_line":"    @mock.patch(\u0027nova.image.glance.GlanceImageServiceV2.show\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_45989f73","line":650,"range":{"start_line":649,"start_character":7,"end_line":650,"end_character":57},"updated":"2017-12-11 18:26:39.000000000","message":"why do this instad of \n\nself.assertRaises(exception.ImageUnacceptable, service.download, ctx,                         mock.sentinel.image_id)","commit_id":"4ce3f58cac56f3d17c1c449bf244bfda13891ac2"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"ded159f4e1e1e43cd174323c4ffa276d9e002743","unresolved":false,"context_lines":[{"line_number":646,"context_line":"        ctx \u003d mock.sentinel.ctx"},{"line_number":647,"context_line":"        service \u003d glance.GlanceImageServiceV2(client)"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"        with testtools.ExpectedException(exception.ImageUnacceptable):"},{"line_number":650,"context_line":"            service.download(ctx, mock.sentinel.image_id)"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"    @mock.patch(\u0027nova.image.glance.GlanceImageServiceV2._get_transfer_module\u0027)"},{"line_number":653,"context_line":"    @mock.patch(\u0027nova.image.glance.GlanceImageServiceV2.show\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_822d2696","line":650,"range":{"start_line":649,"start_character":7,"end_line":650,"end_character":57},"in_reply_to":"df87a7cf_3cca43a0","updated":"2017-12-12 11:33:25.000000000","message":"agree this is more readable (in terms of what\u0027s being called)","commit_id":"4ce3f58cac56f3d17c1c449bf244bfda13891ac2"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5599963e6c37cdabeb3c009c89302634cad89170","unresolved":false,"context_lines":[{"line_number":646,"context_line":"        ctx \u003d mock.sentinel.ctx"},{"line_number":647,"context_line":"        service \u003d glance.GlanceImageServiceV2(client)"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"        with testtools.ExpectedException(exception.ImageUnacceptable):"},{"line_number":650,"context_line":"            service.download(ctx, mock.sentinel.image_id)"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"    @mock.patch(\u0027nova.image.glance.GlanceImageServiceV2._get_transfer_module\u0027)"},{"line_number":653,"context_line":"    @mock.patch(\u0027nova.image.glance.GlanceImageServiceV2.show\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_3cca43a0","line":650,"range":{"start_line":649,"start_character":7,"end_line":650,"end_character":57},"in_reply_to":"df87a7cf_45741ecf","updated":"2017-12-12 10:13:26.000000000","message":"Exact same thing and I prefer this style. Also, it\u0027s used higher up","commit_id":"4ce3f58cac56f3d17c1c449bf244bfda13891ac2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5bb80df52dc34861bd1393543dc076759433aeb7","unresolved":false,"context_lines":[{"line_number":646,"context_line":"        ctx \u003d mock.sentinel.ctx"},{"line_number":647,"context_line":"        service \u003d glance.GlanceImageServiceV2(client)"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"        with testtools.ExpectedException(exception.ImageUnacceptable):"},{"line_number":650,"context_line":"            service.download(ctx, mock.sentinel.image_id)"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"    @mock.patch(\u0027nova.image.glance.GlanceImageServiceV2._get_transfer_module\u0027)"},{"line_number":653,"context_line":"    @mock.patch(\u0027nova.image.glance.GlanceImageServiceV2.show\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_45741ecf","line":650,"range":{"start_line":649,"start_character":7,"end_line":650,"end_character":57},"in_reply_to":"df87a7cf_45989f73","updated":"2017-12-11 18:35:25.000000000","message":"Not sure, but it\u0027s the same result either way.","commit_id":"4ce3f58cac56f3d17c1c449bf244bfda13891ac2"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"40045fea5de98c67850ceecf460ff5355c66b1b5","unresolved":false,"context_lines":[{"line_number":646,"context_line":"        ctx \u003d mock.sentinel.ctx"},{"line_number":647,"context_line":"        service \u003d glance.GlanceImageServiceV2(client)"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"        with testtools.ExpectedException(exception.ImageUnacceptable):"},{"line_number":650,"context_line":"            service.download(ctx, mock.sentinel.image_id)"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"    @mock.patch(\u0027nova.image.glance.GlanceImageServiceV2._get_transfer_module\u0027)"},{"line_number":653,"context_line":"    @mock.patch(\u0027nova.image.glance.GlanceImageServiceV2.show\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_41500533","line":650,"range":{"start_line":649,"start_character":5,"end_line":650,"end_character":57},"updated":"2018-01-05 12:26:16.000000000","message":"is there a reason your are not uses self.assertRaises here?","commit_id":"c10a614e92d15280f05574d82bbede6df6aaeec6"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"170ca614b8a6268cd9c9510a6b3eac258ea4328c","unresolved":false,"context_lines":[{"line_number":646,"context_line":"        ctx \u003d mock.sentinel.ctx"},{"line_number":647,"context_line":"        service \u003d glance.GlanceImageServiceV2(client)"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"        with testtools.ExpectedException(exception.ImageUnacceptable):"},{"line_number":650,"context_line":"            service.download(ctx, mock.sentinel.image_id)"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"    @mock.patch(\u0027nova.image.glance.GlanceImageServiceV2._get_transfer_module\u0027)"},{"line_number":653,"context_line":"    @mock.patch(\u0027nova.image.glance.GlanceImageServiceV2.show\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_883cedc8","line":650,"range":{"start_line":649,"start_character":5,"end_line":650,"end_character":57},"in_reply_to":"9f91af0f_41500533","updated":"2018-01-05 13:36:40.000000000","message":"It\u0027s the same thing and I prefer this style. Nothing more :)","commit_id":"c10a614e92d15280f05574d82bbede6df6aaeec6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3ebc7b2155dc0aaa025a25f82ed1c8d4bf12d534","unresolved":false,"context_lines":[{"line_number":646,"context_line":"        ctx \u003d mock.sentinel.ctx"},{"line_number":647,"context_line":"        service \u003d glance.GlanceImageServiceV2(client)"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"        with testtools.ExpectedException(exception.ImageUnacceptable):"},{"line_number":650,"context_line":"            service.download(ctx, mock.sentinel.image_id)"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"    @mock.patch(\u0027nova.image.glance.GlanceImageServiceV2._get_transfer_module\u0027)"},{"line_number":653,"context_line":"    @mock.patch(\u0027nova.image.glance.GlanceImageServiceV2.show\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_3492d89f","line":650,"range":{"start_line":649,"start_character":5,"end_line":650,"end_character":57},"in_reply_to":"9f91af0f_883cedc8","updated":"2018-01-05 16:41:46.000000000","message":"oh i know\nits just  self.assertRaises is used other places in the file.\n\nboth work i was just curious if there was an advantage more then anything else.","commit_id":"c10a614e92d15280f05574d82bbede6df6aaeec6"}]}
