)]}'
{"nova/compute/api.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9c7f4c7d18bd1570151f7a66c61f4ab3d4498bb7","unresolved":false,"context_lines":[{"line_number":5174,"context_line":""},{"line_number":5175,"context_line":""},{"line_number":5176,"context_line":"def _get_service_in_cell_by_host(context, host_name):"},{"line_number":5177,"context_line":"    # validates the host; HostMappingNotFound or ComputeHostNotFound"},{"line_number":5178,"context_line":"    # is raised if invalid"},{"line_number":5179,"context_line":"    try:"},{"line_number":5180,"context_line":"        mapping \u003d objects.HostMapping.get_by_host(context, host_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_321809cc","line":5177,"range":{"start_line":5177,"start_character":26,"end_line":5177,"end_character":45},"updated":"2020-01-14 20:57:54.000000000","message":"Digging through the code (though I certainly could have missed something) I don\u0027t see how this is possible. I see it\u0027s just a cut/paste of the comment that was there before; but I don\u0027t think it was true there either.","commit_id":"244fc8e5453f8addf4e3bfadf09d96230e5f7611"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"2fc29be4e5e92f4e102e20b0cb75ce54958ce4d5","unresolved":false,"context_lines":[{"line_number":5174,"context_line":""},{"line_number":5175,"context_line":""},{"line_number":5176,"context_line":"def _get_service_in_cell_by_host(context, host_name):"},{"line_number":5177,"context_line":"    # validates the host; HostMappingNotFound or ComputeHostNotFound"},{"line_number":5178,"context_line":"    # is raised if invalid"},{"line_number":5179,"context_line":"    try:"},{"line_number":5180,"context_line":"        mapping \u003d objects.HostMapping.get_by_host(context, host_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_f8c30e57","line":5177,"range":{"start_line":5177,"start_character":26,"end_line":5177,"end_character":45},"in_reply_to":"3fa7e38b_321809cc","updated":"2020-01-16 17:34:58.000000000","message":"Done","commit_id":"244fc8e5453f8addf4e3bfadf09d96230e5f7611"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c5a85e7569bac98f15a5fa781abc78fefaef33c4","unresolved":false,"context_lines":[{"line_number":5867,"context_line":"        compute_utils.notify_about_aggregate_update(context,"},{"line_number":5868,"context_line":"                                                    \"removehost.start\","},{"line_number":5869,"context_line":"                                                    aggregate_payload)"},{"line_number":5870,"context_line":"        _get_service_in_cell_by_host(context, host_name)"},{"line_number":5871,"context_line":"        aggregate \u003d objects.Aggregate.get_by_id(context, aggregate_id)"},{"line_number":5872,"context_line":""},{"line_number":5873,"context_line":"        compute_utils.notify_about_aggregate_action("}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_7e49478b","line":5870,"updated":"2020-01-16 19:21:09.000000000","message":"So this can no longer raise HostMappingNotFound correct? Seems like you should remove that handler from the caller of this code, no?\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/compute/aggregates.py#L182","commit_id":"63d2b9b9ddd5209b5f9c2f06a026f6662a2d3cb7"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"9ea4f05578fc89c2c48492725c6a34bd8e15de42","unresolved":false,"context_lines":[{"line_number":5867,"context_line":"        compute_utils.notify_about_aggregate_update(context,"},{"line_number":5868,"context_line":"                                                    \"removehost.start\","},{"line_number":5869,"context_line":"                                                    aggregate_payload)"},{"line_number":5870,"context_line":"        _get_service_in_cell_by_host(context, host_name)"},{"line_number":5871,"context_line":"        aggregate \u003d objects.Aggregate.get_by_id(context, aggregate_id)"},{"line_number":5872,"context_line":""},{"line_number":5873,"context_line":"        compute_utils.notify_about_aggregate_action("}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_debe30cd","line":5870,"in_reply_to":"3fa7e38b_7e49478b","updated":"2020-01-17 12:09:32.000000000","message":"yeah need to remove that","commit_id":"63d2b9b9ddd5209b5f9c2f06a026f6662a2d3cb7"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9c7f4c7d18bd1570151f7a66c61f4ab3d4498bb7","unresolved":false,"context_lines":[{"line_number":12223,"context_line":"                \u0027aggregate_remove_host\u0027)"},{"line_number":12224,"context_line":"    def test_remove_host_from_aggregate_raise_not_found("},{"line_number":12225,"context_line":"            self, mock_remove_host):"},{"line_number":12226,"context_line":"        # Ensure HostMappingNotFound is raised when removing invalid host."},{"line_number":12227,"context_line":"        _create_service_entries(self.context, [[\u0027fake_zone\u0027, [\u0027fake_host\u0027]]])"},{"line_number":12228,"context_line":"        aggr \u003d self.api.create_aggregate(self.context, \u0027fake_aggregate\u0027,"},{"line_number":12229,"context_line":"                                         \u0027fake_zone\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_92553d55","line":12226,"range":{"start_line":12226,"start_character":17,"end_line":12226,"end_character":36},"updated":"2020-01-14 20:57:54.000000000","message":"ComputeHostNotFound","commit_id":"244fc8e5453f8addf4e3bfadf09d96230e5f7611"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"2fc29be4e5e92f4e102e20b0cb75ce54958ce4d5","unresolved":false,"context_lines":[{"line_number":12223,"context_line":"                \u0027aggregate_remove_host\u0027)"},{"line_number":12224,"context_line":"    def test_remove_host_from_aggregate_raise_not_found("},{"line_number":12225,"context_line":"            self, mock_remove_host):"},{"line_number":12226,"context_line":"        # Ensure HostMappingNotFound is raised when removing invalid host."},{"line_number":12227,"context_line":"        _create_service_entries(self.context, [[\u0027fake_zone\u0027, [\u0027fake_host\u0027]]])"},{"line_number":12228,"context_line":"        aggr \u003d self.api.create_aggregate(self.context, \u0027fake_aggregate\u0027,"},{"line_number":12229,"context_line":"                                         \u0027fake_zone\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_588a621e","line":12226,"range":{"start_line":12226,"start_character":17,"end_line":12226,"end_character":36},"in_reply_to":"3fa7e38b_92553d55","updated":"2020-01-16 17:34:58.000000000","message":"Done","commit_id":"244fc8e5453f8addf4e3bfadf09d96230e5f7611"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c5a85e7569bac98f15a5fa781abc78fefaef33c4","unresolved":false,"context_lines":[{"line_number":12249,"context_line":"        # This is called 4 times, during addition to aggregate for cell0 and"},{"line_number":12250,"context_line":"        # cell1, and during deletion for cell0 and cell1 as well"},{"line_number":12251,"context_line":"        mock_get_service.side_effect \u003d ["},{"line_number":12252,"context_line":"            exception.NotFound(), objects.Service(host\u003dfake_host)] * 2"},{"line_number":12253,"context_line":""},{"line_number":12254,"context_line":"        aggr \u003d self.api.create_aggregate(self.context, \u0027fake_aggregate\u0027,"},{"line_number":12255,"context_line":"                                         \u0027fake_zone\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_1e35b3f6","line":12252,"range":{"start_line":12252,"start_character":66,"end_line":12252,"end_character":70},"updated":"2020-01-16 19:21:09.000000000","message":"This is obscure and I didn\u0027t even notice it until I started to wonder why the notfound was first, expecting that the second call would be for the remove...\n\nI guess you don\u0027t have to change it, but my preference would be to just list all the side effects so it\u0027s easier to see, even though it\u0027s repetitive.","commit_id":"63d2b9b9ddd5209b5f9c2f06a026f6662a2d3cb7"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"9ea4f05578fc89c2c48492725c6a34bd8e15de42","unresolved":false,"context_lines":[{"line_number":12249,"context_line":"        # This is called 4 times, during addition to aggregate for cell0 and"},{"line_number":12250,"context_line":"        # cell1, and during deletion for cell0 and cell1 as well"},{"line_number":12251,"context_line":"        mock_get_service.side_effect \u003d ["},{"line_number":12252,"context_line":"            exception.NotFound(), objects.Service(host\u003dfake_host)] * 2"},{"line_number":12253,"context_line":""},{"line_number":12254,"context_line":"        aggr \u003d self.api.create_aggregate(self.context, \u0027fake_aggregate\u0027,"},{"line_number":12255,"context_line":"                                         \u0027fake_zone\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_1ec5a85d","line":12252,"range":{"start_line":12252,"start_character":66,"end_line":12252,"end_character":70},"in_reply_to":"3fa7e38b_1e35b3f6","updated":"2020-01-17 12:09:32.000000000","message":"yup will do","commit_id":"63d2b9b9ddd5209b5f9c2f06a026f6662a2d3cb7"}]}
