)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"9f2935e5a8175151ab6b67e3729b78b741b98eda","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     wangxiyuan \u003cwangxiyuan@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-05-18 11:31:30 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ceph: Fix delete backup if no right pool"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If no right pool is specified, Ceph will raise"},{"line_number":10,"context_line":"ObjectNotFound error when delete a backup. Cinder should"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ff0f0b1f_a5144545","line":7,"range":{"start_line":7,"start_character":24,"end_line":7,"end_character":35},"updated":"2017-05-22 16:38:04.000000000","message":"with non-existent","commit_id":"42d57a0f998addc31669f55428fb340e14870d8d"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"18c34601e43aa49353d2ab2bbfde2b0c9e9b32dd","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     wangxiyuan \u003cwangxiyuan@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-05-18 11:31:30 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ceph: Fix delete backup if no right pool"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If no right pool is specified, Ceph will raise"},{"line_number":10,"context_line":"ObjectNotFound error when delete a backup. Cinder should"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ff0f0b1f_58d42448","line":7,"range":{"start_line":7,"start_character":24,"end_line":7,"end_character":35},"in_reply_to":"ff0f0b1f_a5144545","updated":"2017-05-23 02:00:05.000000000","message":"Done","commit_id":"42d57a0f998addc31669f55428fb340e14870d8d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"9f2935e5a8175151ab6b67e3729b78b741b98eda","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ceph: Fix delete backup if no right pool"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If no right pool is specified, Ceph will raise"},{"line_number":10,"context_line":"ObjectNotFound error when delete a backup. Cinder should"},{"line_number":11,"context_line":"catch this error and delete the db record directly."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ff0f0b1f_8a0f1036","line":9,"range":{"start_line":9,"start_character":3,"end_line":9,"end_character":11},"updated":"2017-05-22 16:38:04.000000000","message":"a non-existent pool","commit_id":"42d57a0f998addc31669f55428fb340e14870d8d"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"18c34601e43aa49353d2ab2bbfde2b0c9e9b32dd","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ceph: Fix delete backup if no right pool"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If no right pool is specified, Ceph will raise"},{"line_number":10,"context_line":"ObjectNotFound error when delete a backup. Cinder should"},{"line_number":11,"context_line":"catch this error and delete the db record directly."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ff0f0b1f_38d9707e","line":9,"range":{"start_line":9,"start_character":3,"end_line":9,"end_character":11},"in_reply_to":"ff0f0b1f_8a0f1036","updated":"2017-05-23 02:00:05.000000000","message":"Done","commit_id":"42d57a0f998addc31669f55428fb340e14870d8d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"9f2935e5a8175151ab6b67e3729b78b741b98eda","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Ceph: Fix delete backup if no right pool"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If no right pool is specified, Ceph will raise"},{"line_number":10,"context_line":"ObjectNotFound error when delete a backup. Cinder should"},{"line_number":11,"context_line":"catch this error and delete the db record directly."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I41177b9b1f63c6bd2296a5eff70f0058ce3393e5"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ff0f0b1f_4517a946","line":10,"range":{"start_line":10,"start_character":26,"end_line":10,"end_character":32},"updated":"2017-05-22 16:38:04.000000000","message":"deleting","commit_id":"42d57a0f998addc31669f55428fb340e14870d8d"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"18c34601e43aa49353d2ab2bbfde2b0c9e9b32dd","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Ceph: Fix delete backup if no right pool"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If no right pool is specified, Ceph will raise"},{"line_number":10,"context_line":"ObjectNotFound error when delete a backup. Cinder should"},{"line_number":11,"context_line":"catch this error and delete the db record directly."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I41177b9b1f63c6bd2296a5eff70f0058ce3393e5"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ff0f0b1f_18ca2ca0","line":10,"range":{"start_line":10,"start_character":26,"end_line":10,"end_character":32},"in_reply_to":"ff0f0b1f_4517a946","updated":"2017-05-23 02:00:05.000000000","message":"Done","commit_id":"42d57a0f998addc31669f55428fb340e14870d8d"}],"cinder/backup/drivers/ceph.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"f819947e65e4dc629cbec826836fc39d708a594b","unresolved":false,"context_lines":[{"line_number":1214,"context_line":"        except self.rados.ObjectNotFound:"},{"line_number":1215,"context_line":"            LOG.warning(\"The pool %(pool)s doesn\u0027t exist\","},{"line_number":1216,"context_line":"                        {\u0027pool\u0027: backup.container})"},{"line_number":1217,"context_line":"            has_pool \u003d False"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"        if has_pool:"},{"line_number":1220,"context_line":"            with rbd_driver.RADOSClient(self, backup.container) as client:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5ff73747_7ab7b53b","line":1217,"updated":"2017-04-28 15:40:29.000000000","message":"Shouldn\u0027t this also set delete_failed\u003dTrue?","commit_id":"73a3e90193489821dcca95a6475d3c564d817012"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"cc328f1c5ea4b7003fa76994efa1139ba7c6988a","unresolved":false,"context_lines":[{"line_number":1214,"context_line":"        except self.rados.ObjectNotFound:"},{"line_number":1215,"context_line":"            LOG.warning(\"The pool %(pool)s doesn\u0027t exist\","},{"line_number":1216,"context_line":"                        {\u0027pool\u0027: backup.container})"},{"line_number":1217,"context_line":"            has_pool \u003d False"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"        if has_pool:"},{"line_number":1220,"context_line":"            with rbd_driver.RADOSClient(self, backup.container) as client:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5ff73747_7a4e95c1","line":1217,"in_reply_to":"5ff73747_7ab7b53b","updated":"2017-04-28 15:52:18.000000000","message":"if ObjectNotFound, L1220 will raise error as well. So I used a different flag to make the diffrence with ImageNotFound","commit_id":"73a3e90193489821dcca95a6475d3c564d817012"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"9f2935e5a8175151ab6b67e3729b78b741b98eda","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"                {\u0027backup\u0027: backup.id, \u0027volume\u0027: backup.volume_id})"},{"line_number":1213,"context_line":"            delete_failed \u003d True"},{"line_number":1214,"context_line":"        except self.rados.ObjectNotFound:"},{"line_number":1215,"context_line":"            LOG.warning(\"The pool %(pool)s doesn\u0027t exist\","},{"line_number":1216,"context_line":"                        {\u0027pool\u0027: backup.container})"},{"line_number":1217,"context_line":"            delete_failed \u003d True"},{"line_number":1218,"context_line":"            has_pool \u003d False"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff0f0b1f_8a7830c4","line":1215,"range":{"start_line":1215,"start_character":51,"end_line":1215,"end_character":57},"updated":"2017-05-22 16:38:04.000000000","message":"Please end with \u0027.\u0027","commit_id":"42d57a0f998addc31669f55428fb340e14870d8d"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"18c34601e43aa49353d2ab2bbfde2b0c9e9b32dd","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"                {\u0027backup\u0027: backup.id, \u0027volume\u0027: backup.volume_id})"},{"line_number":1213,"context_line":"            delete_failed \u003d True"},{"line_number":1214,"context_line":"        except self.rados.ObjectNotFound:"},{"line_number":1215,"context_line":"            LOG.warning(\"The pool %(pool)s doesn\u0027t exist\","},{"line_number":1216,"context_line":"                        {\u0027pool\u0027: backup.container})"},{"line_number":1217,"context_line":"            delete_failed \u003d True"},{"line_number":1218,"context_line":"            has_pool \u003d False"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff0f0b1f_18a34c02","line":1215,"range":{"start_line":1215,"start_character":51,"end_line":1215,"end_character":57},"in_reply_to":"ff0f0b1f_8a7830c4","updated":"2017-05-23 02:00:05.000000000","message":"Done","commit_id":"42d57a0f998addc31669f55428fb340e14870d8d"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"c3e81dd3724311e327fda28c09e69f12b3e229c2","unresolved":false,"context_lines":[{"line_number":1217,"context_line":"            delete_failed \u003d True"},{"line_number":1218,"context_line":"            has_pool \u003d False"},{"line_number":1219,"context_line":""},{"line_number":1220,"context_line":"        if has_pool:"},{"line_number":1221,"context_line":"            with rbd_driver.RADOSClient(self, backup.container) as client:"},{"line_number":1222,"context_line":"                VolumeMetadataBackup(client, backup.id).remove_if_exists()"},{"line_number":1223,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df140735_76b37b4e","line":1220,"updated":"2017-06-02 10:36:59.000000000","message":"Please, use try-except-else statement instead of adding additional variable and \u0027if\u0027 statement","commit_id":"675089f86d704d4a968c614d7cf15ea873598150"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"c412bf1cf0e1ac9518ffea26b868cfbdec20dec1","unresolved":false,"context_lines":[{"line_number":1217,"context_line":"            delete_failed \u003d True"},{"line_number":1218,"context_line":"            has_pool \u003d False"},{"line_number":1219,"context_line":""},{"line_number":1220,"context_line":"        if has_pool:"},{"line_number":1221,"context_line":"            with rbd_driver.RADOSClient(self, backup.container) as client:"},{"line_number":1222,"context_line":"                VolumeMetadataBackup(client, backup.id).remove_if_exists()"},{"line_number":1223,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df140735_48fd6b6c","line":1220,"in_reply_to":"df140735_76b37b4e","updated":"2017-06-02 14:27:29.000000000","message":"It\u0027s a little difficulty to use try-except-else here, because if catch ImageNoFound, we should run L1221 as well. If use try-except-else, L1221 will not be ran any more if exception raise. The code will be like: \n\ntry:\n    self._try_delete_base_image(backup)\nexcept self.rbd.ImageNotFound:\n    LOG.warning(\n        \"RBD image for backup %(backup)s of volume %(volume)s \"\n        \"not found. Deleting backup metadata.\",\n        {\u0027backup\u0027: backup.id, \u0027volume\u0027: backup.volume_id})\n    delete_failed \u003d True\n    with rbd_driver.RADOSClient(self, backup.container) as client:\n        VolumeMetadataBackup(client, backup.id).remove_if_exists()\nexcept self.rados.ObjectNotFound:\n    LOG.warning(\"The pool %(pool)s doesn\u0027t exist.\",\n                {\u0027pool\u0027: backup.container})\n    delete_failed \u003d True\nelse:\n    with rbd_driver.RADOSClient(self, backup.container) as client:\n        VolumeMetadataBackup(client, backup.id).remove_if_exists()\n\nAny suggestion?","commit_id":"675089f86d704d4a968c614d7cf15ea873598150"}],"cinder/tests/unit/backup/drivers/test_backup_ceph.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"86000ac2c3dee549174378c1132eec4abdefac38","unresolved":false,"context_lines":[{"line_number":838,"context_line":"            # ObjectNotFound exception is caught so that db entry can be"},{"line_number":839,"context_line":"            # cleared"},{"line_number":840,"context_line":"            self.service.delete(self.backup)"},{"line_number":841,"context_line":"            self.assertEqual([MockObjectNotFoundException], RAISED_EXCEPTIONS)"},{"line_number":842,"context_line":""},{"line_number":843,"context_line":"    @common_mocks"},{"line_number":844,"context_line":"    def test_diff_restore_allowed_with_image_not_exists(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"df140735_69799f91","line":841,"updated":"2017-05-31 14:51:04.000000000","message":"-1: Missing check to confirm that we haven\u0027t called remove_if_exists on VolumeMetadataBackup","commit_id":"a6f2293830428969debbf4f8d47b0b478a1da930"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"432ffeb805cc31135faf2aa7ef8fb3e8c62e5020","unresolved":false,"context_lines":[{"line_number":836,"context_line":"                self.service, \u0027_try_delete_base_image\u0027) as mock_del_base:"},{"line_number":837,"context_line":"            with mock.patch.object("},{"line_number":838,"context_line":"                    ceph.VolumeMetadataBackup,"},{"line_number":839,"context_line":"                    \u0027remove_if_exists\u0027) as mock_remove_if_exists:"},{"line_number":840,"context_line":"                mock_del_base.side_effect \u003d self.mock_rados.ObjectNotFound"},{"line_number":841,"context_line":"                # ObjectNotFound exception is caught so that db entry can be"},{"line_number":842,"context_line":"                # cleared"}],"source_content_type":"text/x-python","patch_set":6,"id":"df140735_9151a265","line":839,"updated":"2017-06-01 10:55:52.000000000","message":"-1: We should not be mocking a mock (we already mocked the class as mock_meta_backup)","commit_id":"253be6938c04dc983d8c8efbac5ab5bbc65debab"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"432ffeb805cc31135faf2aa7ef8fb3e8c62e5020","unresolved":false,"context_lines":[{"line_number":842,"context_line":"                # cleared"},{"line_number":843,"context_line":"                self.service.delete(self.backup)"},{"line_number":844,"context_line":"                self.assertEqual([MockObjectNotFoundException],"},{"line_number":845,"context_line":"                                 RAISED_EXCEPTIONS)"},{"line_number":846,"context_line":"                self.assertEqual(0, mock_remove_if_exists.call_count)"},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"    @common_mocks"}],"source_content_type":"text/x-python","patch_set":6,"id":"df140735_d1bb9a6f","line":845,"updated":"2017-06-01 10:55:52.000000000","message":"nit: I believe we should be checking that the call has been made instead, as this will be implied with that check:\n\n mock_del_base.assert_called_once_with(self.backup)","commit_id":"253be6938c04dc983d8c8efbac5ab5bbc65debab"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"432ffeb805cc31135faf2aa7ef8fb3e8c62e5020","unresolved":false,"context_lines":[{"line_number":843,"context_line":"                self.service.delete(self.backup)"},{"line_number":844,"context_line":"                self.assertEqual([MockObjectNotFoundException],"},{"line_number":845,"context_line":"                                 RAISED_EXCEPTIONS)"},{"line_number":846,"context_line":"                self.assertEqual(0, mock_remove_if_exists.call_count)"},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"    @common_mocks"},{"line_number":849,"context_line":"    def test_diff_restore_allowed_with_image_not_exists(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"df140735_11cb521e","line":846,"updated":"2017-06-01 10:55:52.000000000","message":"-1: We should use the mock_meta_backup mock for this and use mock\u0027s assert_not_called method:\n\n mock_meta_backup.return_value.remove_if_exists.assert_not_called()","commit_id":"253be6938c04dc983d8c8efbac5ab5bbc65debab"}]}
