)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2c685670d4a0d91906da436ac10a65e25472dfe6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Brian Rosmaita \u003crosmaita.fossdev@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-10-23 21:52:56 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add test for Bug #1901241"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The function _get_clone_depth wasn\u0027t previously tested."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1f621f24_ee2095b3","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":25},"updated":"2020-10-29 09:01:43.000000000","message":"nit: This is not useful when looking at the git history.  We can have this info as a footer with Related-Bug, and say here we are unit testing the RBD clone depth calculation","commit_id":"4765fdf748f6b7e3ade9b7ad4785d20732bd84e7"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"5ea924057bffd2e594c53984dcae54ed8024c2a9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Brian Rosmaita \u003crosmaita.fossdev@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-10-23 21:52:56 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add test for Bug #1901241"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The function _get_clone_depth wasn\u0027t previously tested."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1f621f24_ba27f364","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":25},"in_reply_to":"1f621f24_ee2095b3","updated":"2020-10-29 11:56:27.000000000","message":"Yeah, this was sloppy, I\u0027ll redo the commit message.","commit_id":"4765fdf748f6b7e3ade9b7ad4785d20732bd84e7"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2c685670d4a0d91906da436ac10a65e25472dfe6","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The function _get_clone_depth wasn\u0027t previously tested."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Depends-on: https://review.opendev.org/#/c/759328/"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: If8d847245e97505f204a4d29a09aed87d1e78cb3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1f621f24_6e35a5f7","line":12,"updated":"2020-10-29 09:01:43.000000000","message":"nit:\n\n  Related-Bug: #1901241","commit_id":"4765fdf748f6b7e3ade9b7ad4785d20732bd84e7"}],"cinder/tests/unit/volume/drivers/test_rbd.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"83d48da202f1a3a01acb8c490df4a24a826d6246","unresolved":false,"context_lines":[{"line_number":1061,"context_line":"        # lowering the configured rbd_max_clone_depth prevented cloning of"},{"line_number":1062,"context_line":"        # volumes that had already (legally) exceeded the new value because"},{"line_number":1063,"context_line":"        # _get_clone_depth would raise an uncaught exception"},{"line_number":1064,"context_line":"        self.cfg.rbd_max_clone_depth \u003d 1"},{"line_number":1065,"context_line":""},{"line_number":1066,"context_line":"        # create a list of fake parents for the expected depth"},{"line_number":1067,"context_line":"        vols \u003d [self.volume_a, self.volume_b, self.volume_c]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_1e37dfb2","line":1064,"range":{"start_line":1064,"start_character":8,"end_line":1064,"end_character":40},"updated":"2020-10-24 00:32:09.000000000","message":"Note that you\u0027d expect 2 failures with a max_depth setting of 1 (for depth 2 and 3), but we only get one.  See rbd.py for why.","commit_id":"23f49373b55eb8bb5c9c3b50987330c0d3f3e401"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2c685670d4a0d91906da436ac10a65e25472dfe6","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"        self.cfg.rbd_max_clone_depth \u003d 1"},{"line_number":1065,"context_line":""},{"line_number":1066,"context_line":"        # create a list of fake parents for the expected depth"},{"line_number":1067,"context_line":"        vols \u003d [self.volume_a, self.volume_b, self.volume_c]"},{"line_number":1068,"context_line":"        volume_list \u003d vols[:expected_depth]"},{"line_number":1069,"context_line":""},{"line_number":1070,"context_line":"        def fake_clone_info(volume, volume_name):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f621f24_8ebda16a","line":1067,"range":{"start_line":1067,"start_character":0,"end_line":1067,"end_character":60},"updated":"2020-10-29 09:01:43.000000000","message":"-1: We cannot use volume_a as the first entry, because we are using volume_a as the one we want to check.  If we do this we are saying that volume_a is a clone of volume_a.\n\nWe can either remove volume_a from the list or pass a fake name to the _get_clone_depth call on L1081, for example \u0027volume-00000000d\u0027","commit_id":"4765fdf748f6b7e3ade9b7ad4785d20732bd84e7"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"5ea924057bffd2e594c53984dcae54ed8024c2a9","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"        self.cfg.rbd_max_clone_depth \u003d 1"},{"line_number":1065,"context_line":""},{"line_number":1066,"context_line":"        # create a list of fake parents for the expected depth"},{"line_number":1067,"context_line":"        vols \u003d [self.volume_a, self.volume_b, self.volume_c]"},{"line_number":1068,"context_line":"        volume_list \u003d vols[:expected_depth]"},{"line_number":1069,"context_line":""},{"line_number":1070,"context_line":"        def fake_clone_info(volume, volume_name):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f621f24_9a5e77e4","line":1067,"range":{"start_line":1067,"start_character":0,"end_line":1067,"end_character":60},"in_reply_to":"1f621f24_8ebda16a","updated":"2020-10-29 11:56:27.000000000","message":"I figured it didn\u0027t matter because these aren\u0027t real parents anyway, but you\u0027re right, it does make the test look suspicious.","commit_id":"4765fdf748f6b7e3ade9b7ad4785d20732bd84e7"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"c8143ddfd28d49dafaca1257c802edab216b9b88","unresolved":true,"context_lines":[{"line_number":1105,"context_line":"        # lowering the configured rbd_max_clone_depth prevented cloning of"},{"line_number":1106,"context_line":"        # volumes that had already (legally) exceeded the new value because"},{"line_number":1107,"context_line":"        # _get_clone_depth would raise an uncaught exception"},{"line_number":1108,"context_line":"        self.cfg.rbd_max_clone_depth \u003d 1"},{"line_number":1109,"context_line":""},{"line_number":1110,"context_line":"        # create a list of fake parents for the expected depth"},{"line_number":1111,"context_line":"        vols \u003d [self.volume_a, self.volume_b, self.volume_c]"}],"source_content_type":"text/x-python","patch_set":4,"id":"75f7b4f1_b3cad802","line":1108,"updated":"2021-04-16 15:19:18.000000000","message":"afaik this is not how it should be done... I believe we should be using self.override_config instead","commit_id":"77d2477986898734ae26e12f91c0c3d10760043b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"b9a90a93dd34ffbcdb3377f52f5154b1222808d5","unresolved":true,"context_lines":[{"line_number":1105,"context_line":"        # lowering the configured rbd_max_clone_depth prevented cloning of"},{"line_number":1106,"context_line":"        # volumes that had already (legally) exceeded the new value because"},{"line_number":1107,"context_line":"        # _get_clone_depth would raise an uncaught exception"},{"line_number":1108,"context_line":"        self.cfg.rbd_max_clone_depth \u003d 1"},{"line_number":1109,"context_line":""},{"line_number":1110,"context_line":"        # create a list of fake parents for the expected depth"},{"line_number":1111,"context_line":"        vols \u003d [self.volume_a, self.volume_b, self.volume_c]"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba1cb49d_42b32331","line":1108,"in_reply_to":"75f7b4f1_b3cad802","updated":"2021-04-16 15:46:01.000000000","message":"+1, this should be self.override_config(\u0027rbd_max_clone_depth\u0027, 1)","commit_id":"77d2477986898734ae26e12f91c0c3d10760043b"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"adc300ebad32552c76f8989f349fe86e6c65e660","unresolved":true,"context_lines":[{"line_number":1105,"context_line":"        # lowering the configured rbd_max_clone_depth prevented cloning of"},{"line_number":1106,"context_line":"        # volumes that had already (legally) exceeded the new value because"},{"line_number":1107,"context_line":"        # _get_clone_depth would raise an uncaught exception"},{"line_number":1108,"context_line":"        self.cfg.rbd_max_clone_depth \u003d 1"},{"line_number":1109,"context_line":""},{"line_number":1110,"context_line":"        # create a list of fake parents for the expected depth"},{"line_number":1111,"context_line":"        vols \u003d [self.volume_a, self.volume_b, self.volume_c]"}],"source_content_type":"text/x-python","patch_set":4,"id":"76f9ff0c_f6802bf6","line":1108,"in_reply_to":"ba1cb49d_42b32331","updated":"2021-04-17 14:30:54.000000000","message":"In general, I would agree, but the pattern used in this file is that self.cfg is created by the setUp method, so it\u0027s reinitialized before each test, and override_config isn\u0027t used anywhere, only the self.cfg.option_name \u003d value pattern.  I think override_config would be better, but using it should probably be part of a larger refactoring of this file.","commit_id":"77d2477986898734ae26e12f91c0c3d10760043b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"b9a90a93dd34ffbcdb3377f52f5154b1222808d5","unresolved":true,"context_lines":[{"line_number":1115,"context_line":"            parent \u003d volume_list.pop() if volume_list else None"},{"line_number":1116,"context_line":"            return (None, parent, None)"},{"line_number":1117,"context_line":""},{"line_number":1118,"context_line":"        with mock.patch.object(self.driver, \u0027_get_clone_info\u0027) as \\"},{"line_number":1119,"context_line":"                mock_get_clone_info:"},{"line_number":1120,"context_line":"            mock_get_clone_info.side_effect \u003d fake_clone_info"},{"line_number":1121,"context_line":"            with mock.patch.object(self.driver.rbd.Image(), \u0027close\u0027) \\"}],"source_content_type":"text/x-python","patch_set":4,"id":"6d98b1ec_181284be","line":1118,"range":{"start_line":1118,"start_character":66,"end_line":1118,"end_character":67},"updated":"2021-04-16 15:46:01.000000000","message":"I don\u0027t feel very good about using backslashes unless it is the last option and pep8 guidelines agree as well[1]. We can use the current paranthesis too, just a newline after \"object(\"\n[1] https://www.python.org/dev/peps/pep-0008/#maximum-line-length","commit_id":"77d2477986898734ae26e12f91c0c3d10760043b"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"adc300ebad32552c76f8989f349fe86e6c65e660","unresolved":true,"context_lines":[{"line_number":1115,"context_line":"            parent \u003d volume_list.pop() if volume_list else None"},{"line_number":1116,"context_line":"            return (None, parent, None)"},{"line_number":1117,"context_line":""},{"line_number":1118,"context_line":"        with mock.patch.object(self.driver, \u0027_get_clone_info\u0027) as \\"},{"line_number":1119,"context_line":"                mock_get_clone_info:"},{"line_number":1120,"context_line":"            mock_get_clone_info.side_effect \u003d fake_clone_info"},{"line_number":1121,"context_line":"            with mock.patch.object(self.driver.rbd.Image(), \u0027close\u0027) \\"}],"source_content_type":"text/x-python","patch_set":4,"id":"27004e15_cf60426d","line":1118,"range":{"start_line":1118,"start_character":66,"end_line":1118,"end_character":67},"in_reply_to":"6d98b1ec_181284be","updated":"2021-04-17 14:30:54.000000000","message":"Thanks, I wasn\u0027t being sufficiently creative about using the existing parentheses.","commit_id":"77d2477986898734ae26e12f91c0c3d10760043b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"b9a90a93dd34ffbcdb3377f52f5154b1222808d5","unresolved":true,"context_lines":[{"line_number":1118,"context_line":"        with mock.patch.object(self.driver, \u0027_get_clone_info\u0027) as \\"},{"line_number":1119,"context_line":"                mock_get_clone_info:"},{"line_number":1120,"context_line":"            mock_get_clone_info.side_effect \u003d fake_clone_info"},{"line_number":1121,"context_line":"            with mock.patch.object(self.driver.rbd.Image(), \u0027close\u0027) \\"},{"line_number":1122,"context_line":"                    as mock_rbd_image_close:"},{"line_number":1123,"context_line":""},{"line_number":1124,"context_line":"                depth \u003d self.driver._get_clone_depth(self.mock_client,"}],"source_content_type":"text/x-python","patch_set":4,"id":"0c321884_33dc4a03","line":1121,"range":{"start_line":1121,"start_character":69,"end_line":1121,"end_character":70},"updated":"2021-04-16 15:46:01.000000000","message":"same","commit_id":"77d2477986898734ae26e12f91c0c3d10760043b"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"adc300ebad32552c76f8989f349fe86e6c65e660","unresolved":false,"context_lines":[{"line_number":1118,"context_line":"        with mock.patch.object(self.driver, \u0027_get_clone_info\u0027) as \\"},{"line_number":1119,"context_line":"                mock_get_clone_info:"},{"line_number":1120,"context_line":"            mock_get_clone_info.side_effect \u003d fake_clone_info"},{"line_number":1121,"context_line":"            with mock.patch.object(self.driver.rbd.Image(), \u0027close\u0027) \\"},{"line_number":1122,"context_line":"                    as mock_rbd_image_close:"},{"line_number":1123,"context_line":""},{"line_number":1124,"context_line":"                depth \u003d self.driver._get_clone_depth(self.mock_client,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ec5cb69c_f65224f3","line":1121,"range":{"start_line":1121,"start_character":69,"end_line":1121,"end_character":70},"in_reply_to":"0c321884_33dc4a03","updated":"2021-04-17 14:30:54.000000000","message":"Ack","commit_id":"77d2477986898734ae26e12f91c0c3d10760043b"}],"cinder/volume/drivers/rbd.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"83d48da202f1a3a01acb8c490df4a24a826d6246","unresolved":false,"context_lines":[{"line_number":658,"context_line":""},{"line_number":659,"context_line":"        # If clone depth was reached, flatten should have occurred so if it has"},{"line_number":660,"context_line":"        # been exceeded then something has gone wrong."},{"line_number":661,"context_line":"        if depth \u003e self.configuration.rbd_max_clone_depth:"},{"line_number":662,"context_line":"            raise Exception(_(\"clone depth exceeds limit of %s\") %"},{"line_number":663,"context_line":"                            (self.configuration.rbd_max_clone_depth))"},{"line_number":664,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f65232a_7e47f31e","line":661,"range":{"start_line":661,"start_character":8,"end_line":661,"end_character":58},"updated":"2020-10-24 00:32:09.000000000","message":"This check is off by one because the strictly greater doesn\u0027t raise when depth \u003d\u003d max_depth -- if there\u0027s only one more parent, we\u0027ll make the recursive call at line 665, find that the parent is none and will return max_depth+1 at line 657.","commit_id":"23f49373b55eb8bb5c9c3b50987330c0d3f3e401"}]}
