)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":38864,"name":"Sridhar Kumar Ettkepalli","display_name":"Sridhar","email":"sridharkumar.ettkepalli@windriver.com","username":"settkepa"},"change_message_id":"f8ee721bf2834c94a0b73b50ccb8df22a7a7d33e","unresolved":true,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2026-11-18 12:27:45 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Do not delete image when upload hits a conflict"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"_upload_image_put deletes the image it just created whenever the data"},{"line_number":10,"context_line":"upload (or the stage/import step) fails with any exception. That"},{"line_number":11,"context_line":"cleanup makes sense for a half-created image, but not for a 409"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"b0b3dc52_8b2bf3bd","line":8,"updated":"2026-11-18 17:55:03.000000000","message":"This is a bug fix to user-visible behaviour, so it should come with a release note under releasenotes/notes/ with a fixes: entry.","commit_id":"0ca843fea0b0234b6e85487ac8ddf93715fb5979"},{"author":{"_account_id":38989,"name":"Raghu Sarangapani","email":"Raghu.Sarangapani@windriver.com","username":"rsaranga"},"change_message_id":"90b9d565c38820523965892929db91014d70da85","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2026-11-18 12:27:45 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Do not delete image when upload hits a conflict"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"_upload_image_put deletes the image it just created whenever the data"},{"line_number":10,"context_line":"upload (or the stage/import step) fails with any exception. That"},{"line_number":11,"context_line":"cleanup makes sense for a half-created image, but not for a 409"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"b34e3445_0bc9e332","line":8,"in_reply_to":"b0b3dc52_8b2bf3bd","updated":"2026-11-18 18:03:08.000000000","message":"done","commit_id":"0ca843fea0b0234b6e85487ac8ddf93715fb5979"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"51a990af8115de0091f8b4158c343372057bf61b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"298dfa0b_44ffcc8c","updated":"2026-11-18 21:16:21.000000000","message":"Idea seems fine. Small comment on the tests.","commit_id":"d7418680fc46c7541897d83bfdb9a411db21e2dc"},{"author":{"_account_id":38989,"name":"Raghu Sarangapani","email":"Raghu.Sarangapani@windriver.com","username":"rsaranga"},"change_message_id":"1a7dcfbbe8356d1781e27f0694ef57ff24674969","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"46059a82_ea4c5f8e","updated":"2026-11-24 19:03:21.000000000","message":"recheck","commit_id":"56a9b1becc8f6ee1a1a9a964ffbfbf4337bb3577"},{"author":{"_account_id":38989,"name":"Raghu Sarangapani","email":"Raghu.Sarangapani@windriver.com","username":"rsaranga"},"change_message_id":"be8559883ebffbcc82edc21eaca792840bada53c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"fa9ea67d_54aea476","updated":"2026-11-24 22:04:52.000000000","message":"regate","commit_id":"56a9b1becc8f6ee1a1a9a964ffbfbf4337bb3577"}],"openstack/image/v2/_proxy.py":[{"author":{"_account_id":38864,"name":"Sridhar Kumar Ettkepalli","display_name":"Sridhar","email":"sridharkumar.ettkepalli@windriver.com","username":"settkepa"},"change_message_id":"f8ee721bf2834c94a0b73b50ccb8df22a7a7d33e","unresolved":true,"context_lines":[{"line_number":814,"context_line":"                    valid \u003d checksum \u003d\u003d md5 or checksum \u003d\u003d sha256"},{"line_number":815,"context_line":"                    if not valid:"},{"line_number":816,"context_line":"                        raise Exception(\u0027Image checksum verification failed\u0027)"},{"line_number":817,"context_line":"        except exceptions.ConflictException:"},{"line_number":818,"context_line":"            # A 409 on the data upload means the image is no longer \u0027queued\u0027:"},{"line_number":819,"context_line":"            # another request (for example a replay of this very PUT by a"},{"line_number":820,"context_line":"            # proxy that timed out waiting for the response) is already"}],"source_content_type":"text/x-python","patch_set":1,"id":"1457e57e_062c2d25","line":817,"updated":"2026-11-18 17:55:03.000000000","message":"This also catches a 409 from import_image and the checksum fetch, not only the data upload the comment talks about. A 409 from import_image would now leave the image behind. That\u0027s unlikely since it\u0027s a POST and nginx won\u0027t replay it, but is the wider scope intended? If not, I\u0027d limit it to the upload/stage step.","commit_id":"0ca843fea0b0234b6e85487ac8ddf93715fb5979"},{"author":{"_account_id":38989,"name":"Raghu Sarangapani","email":"Raghu.Sarangapani@windriver.com","username":"rsaranga"},"change_message_id":"90b9d565c38820523965892929db91014d70da85","unresolved":false,"context_lines":[{"line_number":814,"context_line":"                    valid \u003d checksum \u003d\u003d md5 or checksum \u003d\u003d sha256"},{"line_number":815,"context_line":"                    if not valid:"},{"line_number":816,"context_line":"                        raise Exception(\u0027Image checksum verification failed\u0027)"},{"line_number":817,"context_line":"        except exceptions.ConflictException:"},{"line_number":818,"context_line":"            # A 409 on the data upload means the image is no longer \u0027queued\u0027:"},{"line_number":819,"context_line":"            # another request (for example a replay of this very PUT by a"},{"line_number":820,"context_line":"            # proxy that timed out waiting for the response) is already"}],"source_content_type":"text/x-python","patch_set":1,"id":"3e4e9970_da32de92","line":817,"in_reply_to":"1457e57e_062c2d25","updated":"2026-11-18 18:03:08.000000000","message":"Intended. A 409 from import_image also means the image is no longer in the state we expect (another request is importing or writing it), so deleting it would destroy that work as well. Worst case of being wrong is a leftover queued image. Added a test for the import_image path.","commit_id":"0ca843fea0b0234b6e85487ac8ddf93715fb5979"},{"author":{"_account_id":38864,"name":"Sridhar Kumar Ettkepalli","display_name":"Sridhar","email":"sridharkumar.ettkepalli@windriver.com","username":"settkepa"},"change_message_id":"f8ee721bf2834c94a0b73b50ccb8df22a7a7d33e","unresolved":true,"context_lines":[{"line_number":815,"context_line":"                    if not valid:"},{"line_number":816,"context_line":"                        raise Exception(\u0027Image checksum verification failed\u0027)"},{"line_number":817,"context_line":"        except exceptions.ConflictException:"},{"line_number":818,"context_line":"            # A 409 on the data upload means the image is no longer \u0027queued\u0027:"},{"line_number":819,"context_line":"            # another request (for example a replay of this very PUT by a"},{"line_number":820,"context_line":"            # proxy that timed out waiting for the response) is already"},{"line_number":821,"context_line":"            # writing it. Deleting the image here would destroy that upload."}],"source_content_type":"text/x-python","patch_set":1,"id":"b23ffb4b_0e3adc42","line":818,"updated":"2026-11-18 17:55:03.000000000","message":"The comment is a bit long for this spot. Maybe two lines on why a 409 here means someone else is writing the image, and keep the proxy replay story in the commit message where it already is.","commit_id":"0ca843fea0b0234b6e85487ac8ddf93715fb5979"},{"author":{"_account_id":38989,"name":"Raghu Sarangapani","email":"Raghu.Sarangapani@windriver.com","username":"rsaranga"},"change_message_id":"90b9d565c38820523965892929db91014d70da85","unresolved":false,"context_lines":[{"line_number":815,"context_line":"                    if not valid:"},{"line_number":816,"context_line":"                        raise Exception(\u0027Image checksum verification failed\u0027)"},{"line_number":817,"context_line":"        except exceptions.ConflictException:"},{"line_number":818,"context_line":"            # A 409 on the data upload means the image is no longer \u0027queued\u0027:"},{"line_number":819,"context_line":"            # another request (for example a replay of this very PUT by a"},{"line_number":820,"context_line":"            # proxy that timed out waiting for the response) is already"},{"line_number":821,"context_line":"            # writing it. Deleting the image here would destroy that upload."}],"source_content_type":"text/x-python","patch_set":1,"id":"38a0d302_1bb100ad","line":818,"in_reply_to":"b23ffb4b_0e3adc42","updated":"2026-11-18 18:03:08.000000000","message":"fixed","commit_id":"0ca843fea0b0234b6e85487ac8ddf93715fb5979"}],"openstack/tests/unit/image/v2/test_proxy.py":[{"author":{"_account_id":38864,"name":"Sridhar Kumar Ettkepalli","display_name":"Sridhar","email":"sridharkumar.ettkepalli@windriver.com","username":"settkepa"},"change_message_id":"f8ee721bf2834c94a0b73b50ccb8df22a7a7d33e","unresolved":true,"context_lines":[{"line_number":296,"context_line":"        self.assertEqual(fake_image, res)"},{"line_number":297,"context_line":"        mock_upload.assert_not_called()"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _upload_image_put_with_failure(self, failure, **kwargs):"},{"line_number":300,"context_line":"        image \u003d _image.Image(id\u003d\u0027fake\u0027, status\u003d\u0027queued\u0027)"},{"line_number":301,"context_line":"        mock.patch.object(self.proxy, \u0027_create\u0027, return_value\u003dimage).start()"},{"line_number":302,"context_line":"        mock.patch.object(_image.Image, \u0027upload\u0027, side_effect\u003dfailure).start()"}],"source_content_type":"text/x-python","patch_set":1,"id":"12e2f609_39c70531","line":299,"updated":"2026-11-18 17:55:03.000000000","message":"No caller passes **kwargs here, so it can go. The import test below repeats most of this helper, so it could reuse it with use_import\u003dTrue and the stage patch. It would also be good to have a case where import_image itself raises a conflict, since the except covers that path too.","commit_id":"0ca843fea0b0234b6e85487ac8ddf93715fb5979"},{"author":{"_account_id":38989,"name":"Raghu Sarangapani","email":"Raghu.Sarangapani@windriver.com","username":"rsaranga"},"change_message_id":"90b9d565c38820523965892929db91014d70da85","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        self.assertEqual(fake_image, res)"},{"line_number":297,"context_line":"        mock_upload.assert_not_called()"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _upload_image_put_with_failure(self, failure, **kwargs):"},{"line_number":300,"context_line":"        image \u003d _image.Image(id\u003d\u0027fake\u0027, status\u003d\u0027queued\u0027)"},{"line_number":301,"context_line":"        mock.patch.object(self.proxy, \u0027_create\u0027, return_value\u003dimage).start()"},{"line_number":302,"context_line":"        mock.patch.object(_image.Image, \u0027upload\u0027, side_effect\u003dfailure).start()"}],"source_content_type":"text/x-python","patch_set":1,"id":"51942482_193ca70e","line":299,"in_reply_to":"12e2f609_39c70531","updated":"2026-11-18 18:03:08.000000000","message":"fixed","commit_id":"0ca843fea0b0234b6e85487ac8ddf93715fb5979"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"51a990af8115de0091f8b4158c343372057bf61b","unresolved":true,"context_lines":[{"line_number":296,"context_line":"        self.assertEqual(fake_image, res)"},{"line_number":297,"context_line":"        mock_upload.assert_not_called()"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _upload_image_put_with_failure(self, failure, step\u003d\u0027upload\u0027):"},{"line_number":300,"context_line":"        \"\"\"Run _upload_image_put with ``failure`` raised at ``step``."},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        ``step`` is one of \u0027upload\u0027 (plain PUT), \u0027stage\u0027 or \u0027import_image\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5c7edac4_f0c00249","line":299,"updated":"2026-11-18 21:16:21.000000000","message":"I appreciate you trying to de-dupe things here, but it\u0027s best to avoid conditional logic like this in tests. Can you denormalize this and use `mock.patch.object` as a context manager instead?","commit_id":"d7418680fc46c7541897d83bfdb9a411db21e2dc"},{"author":{"_account_id":38989,"name":"Raghu Sarangapani","email":"Raghu.Sarangapani@windriver.com","username":"rsaranga"},"change_message_id":"5393b48daef263eece504f1f3f1d6bbf5990708d","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        self.assertEqual(fake_image, res)"},{"line_number":297,"context_line":"        mock_upload.assert_not_called()"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _upload_image_put_with_failure(self, failure, step\u003d\u0027upload\u0027):"},{"line_number":300,"context_line":"        \"\"\"Run _upload_image_put with ``failure`` raised at ``step``."},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        ``step`` is one of \u0027upload\u0027 (plain PUT), \u0027stage\u0027 or \u0027import_image\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"28b356c6_f27d5e77","line":299,"in_reply_to":"5c7edac4_f0c00249","updated":"2026-11-18 22:23:54.000000000","message":"fixed","commit_id":"d7418680fc46c7541897d83bfdb9a411db21e2dc"}]}
