)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bf38658e9d2d5ba3577c45db16b08a9c0e6f9680","unresolved":false,"context_lines":[{"line_number":11,"context_line":"going to want to give the virt driver the opportunity to query/update"},{"line_number":12,"context_line":"aggregate associations when we pass it the ProviderTree, so this change"},{"line_number":13,"context_line":"removes the cache from the SchedulerReportClient and uses the aggregate"},{"line_number":14,"context_line":"affordance recently added to ProviderTree instead."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"On the way, this also fixes a couple of memory leaks where we weren\u0027t"},{"line_number":17,"context_line":"cleaning up the \"last updated\" cache."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"df87a7cf_da708e0b","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":10},"updated":"2017-12-15 21:39:25.000000000","message":"ooh, fancy.","commit_id":"8112fb005b49d8e795e93e22594c111162094c85"}],"nova/scheduler/client/report.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"48982549b00e47cbe6eb13ba4ab0b17e6e69341a","unresolved":false,"context_lines":[{"line_number":602,"context_line":""},{"line_number":603,"context_line":"        # If there had been no local resource provider record, force refreshing"},{"line_number":604,"context_line":"        # the aggregate map."},{"line_number":605,"context_line":"        self._refresh_aggregates(uuid, rp[\u0027generation\u0027], force\u003dTrue)"},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"        return ret"},{"line_number":608,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_fbac26ee","line":605,"range":{"start_line":605,"start_character":39,"end_line":605,"end_character":55},"updated":"2017-12-08 15:14:35.000000000","message":"I think this is unnecessary as both above RP creation cases have already updated the generation of the RP to this value in the tree","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3eefc41b163b8bba2cc49bd229bff77c484802bd","unresolved":false,"context_lines":[{"line_number":602,"context_line":""},{"line_number":603,"context_line":"        # If there had been no local resource provider record, force refreshing"},{"line_number":604,"context_line":"        # the aggregate map."},{"line_number":605,"context_line":"        self._refresh_aggregates(uuid, rp[\u0027generation\u0027], force\u003dTrue)"},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"        return ret"},{"line_number":608,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_cc125cb5","line":605,"range":{"start_line":605,"start_character":39,"end_line":605,"end_character":55},"in_reply_to":"df87a7cf_fbac26ee","updated":"2017-12-13 17:46:48.000000000","message":"I left this untouched as I wasn\u0027t able to figure out yay or nay on it","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"48982549b00e47cbe6eb13ba4ab0b17e6e69341a","unresolved":false,"context_lines":[{"line_number":632,"context_line":"            self._provider_tree.update_inventory(rp_uuid, curr_inv, cur_gen)"},{"line_number":633,"context_line":"        return curr"},{"line_number":634,"context_line":""},{"line_number":635,"context_line":"    def _refresh_aggregates(self, rp_uuid, generation\u003dNone, force\u003dFalse):"},{"line_number":636,"context_line":"        \"\"\"Refresh the aggregate map for the provided resource provider uuid."},{"line_number":637,"context_line":""},{"line_number":638,"context_line":"        Only refresh if there has been no refresh during the lifetime of"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_fb950688","line":635,"range":{"start_line":635,"start_character":43,"end_line":635,"end_character":58},"updated":"2017-12-08 15:14:35.000000000","message":"I think this parameter will not be needed. See my comment above","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7f6a5f6f65fe261980fa9dbc353199719928fc3d","unresolved":false,"context_lines":[{"line_number":866,"context_line":"                      \"inventory. Ignoring.\","},{"line_number":867,"context_line":"                      msg_args)"},{"line_number":868,"context_line":"            self._provider_tree.remove(rp_uuid)"},{"line_number":869,"context_line":"            self.aggregate_refresh_time.pop(rp_uuid, None)"},{"line_number":870,"context_line":"            return"},{"line_number":871,"context_line":"        elif r.status_code \u003d\u003d 409:"},{"line_number":872,"context_line":"            rc_str \u003d _extract_inventory_in_use(r.text)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_c0b28f49","line":869,"range":{"start_line":869,"start_character":0,"end_line":869,"end_character":58},"updated":"2017-12-08 14:30:46.000000000","message":"Good spot. We should probably test this though","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0afaeaa574f7f76e5807f134e25f6fc73db8d35f","unresolved":false,"context_lines":[{"line_number":866,"context_line":"                      \"inventory. Ignoring.\","},{"line_number":867,"context_line":"                      msg_args)"},{"line_number":868,"context_line":"            self._provider_tree.remove(rp_uuid)"},{"line_number":869,"context_line":"            self.aggregate_refresh_time.pop(rp_uuid, None)"},{"line_number":870,"context_line":"            return"},{"line_number":871,"context_line":"        elif r.status_code \u003d\u003d 409:"},{"line_number":872,"context_line":"            rc_str \u003d _extract_inventory_in_use(r.text)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_17ba75dd","line":869,"range":{"start_line":869,"start_character":0,"end_line":869,"end_character":58},"in_reply_to":"df87a7cf_1a0dbf36","updated":"2017-12-14 15:49:09.000000000","message":"You\u0027d got the one below this, but not this one. At least, as far as I could tell","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d5de7021f8cfde5d93c1a86c1a5e6ef95f09f4d7","unresolved":false,"context_lines":[{"line_number":866,"context_line":"                      \"inventory. Ignoring.\","},{"line_number":867,"context_line":"                      msg_args)"},{"line_number":868,"context_line":"            self._provider_tree.remove(rp_uuid)"},{"line_number":869,"context_line":"            self.aggregate_refresh_time.pop(rp_uuid, None)"},{"line_number":870,"context_line":"            return"},{"line_number":871,"context_line":"        elif r.status_code \u003d\u003d 409:"},{"line_number":872,"context_line":"            rc_str \u003d _extract_inventory_in_use(r.text)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_1a0dbf36","line":869,"range":{"start_line":869,"start_character":0,"end_line":869,"end_character":58},"in_reply_to":"df87a7cf_42493530","updated":"2017-12-14 13:14:51.000000000","message":"Pretty sure I had already done that.","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3eefc41b163b8bba2cc49bd229bff77c484802bd","unresolved":false,"context_lines":[{"line_number":866,"context_line":"                      \"inventory. Ignoring.\","},{"line_number":867,"context_line":"                      msg_args)"},{"line_number":868,"context_line":"            self._provider_tree.remove(rp_uuid)"},{"line_number":869,"context_line":"            self.aggregate_refresh_time.pop(rp_uuid, None)"},{"line_number":870,"context_line":"            return"},{"line_number":871,"context_line":"        elif r.status_code \u003d\u003d 409:"},{"line_number":872,"context_line":"            rc_str \u003d _extract_inventory_in_use(r.text)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_42493530","line":869,"range":{"start_line":869,"start_character":0,"end_line":869,"end_character":58},"in_reply_to":"df87a7cf_5b38b29e","updated":"2017-12-13 17:46:48.000000000","message":"Done","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"48982549b00e47cbe6eb13ba4ab0b17e6e69341a","unresolved":false,"context_lines":[{"line_number":866,"context_line":"                      \"inventory. Ignoring.\","},{"line_number":867,"context_line":"                      msg_args)"},{"line_number":868,"context_line":"            self._provider_tree.remove(rp_uuid)"},{"line_number":869,"context_line":"            self.aggregate_refresh_time.pop(rp_uuid, None)"},{"line_number":870,"context_line":"            return"},{"line_number":871,"context_line":"        elif r.status_code \u003d\u003d 409:"},{"line_number":872,"context_line":"            rc_str \u003d _extract_inventory_in_use(r.text)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_5b38b29e","line":869,"range":{"start_line":869,"start_character":0,"end_line":869,"end_character":58},"in_reply_to":"df87a7cf_c0b28f49","updated":"2017-12-08 15:14:35.000000000","message":"+1","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bf38658e9d2d5ba3577c45db16b08a9c0e6f9680","unresolved":false,"context_lines":[{"line_number":607,"context_line":""},{"line_number":608,"context_line":"        # If there had been no local resource provider record, force refreshing"},{"line_number":609,"context_line":"        # the aggregate map."},{"line_number":610,"context_line":"        self._refresh_aggregates(uuid, rp[\u0027generation\u0027], force\u003dTrue)"},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"        return ret"},{"line_number":613,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_7aef0287","line":610,"updated":"2017-12-15 21:39:25.000000000","message":"Why are we even bothering to look up aggregate information for the resource provider if it was just created? It doesn\u0027t hurt but it\u0027s kinda wasteful, no?","commit_id":"8112fb005b49d8e795e93e22594c111162094c85"}],"nova/tests/unit/scheduler/client/test_report.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"48982549b00e47cbe6eb13ba4ab0b17e6e69341a","unresolved":false,"context_lines":[{"line_number":1694,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":1695,"context_line":"                \u0027_get_provider_aggregates\u0027)"},{"line_number":1696,"context_line":"    def test_refresh_aggregates_no_last(self, mock_get):"},{"line_number":1697,"context_line":"        \"\"\"Test that refresh aggregate map is called when the map is"},{"line_number":1698,"context_line":"        stale."},{"line_number":1699,"context_line":"        \"\"\""},{"line_number":1700,"context_line":"        uuid \u003d uuids.compute_node"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_7b0b36d5","line":1697,"range":{"start_line":1697,"start_character":21,"end_line":1697,"end_character":42},"updated":"2017-12-08 15:14:35.000000000","message":"nit: there is no refresh_aggregate_map any more","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3eefc41b163b8bba2cc49bd229bff77c484802bd","unresolved":false,"context_lines":[{"line_number":1694,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":1695,"context_line":"                \u0027_get_provider_aggregates\u0027)"},{"line_number":1696,"context_line":"    def test_refresh_aggregates_no_last(self, mock_get):"},{"line_number":1697,"context_line":"        \"\"\"Test that refresh aggregate map is called when the map is"},{"line_number":1698,"context_line":"        stale."},{"line_number":1699,"context_line":"        \"\"\""},{"line_number":1700,"context_line":"        uuid \u003d uuids.compute_node"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_224431b7","line":1697,"range":{"start_line":1697,"start_character":21,"end_line":1697,"end_character":42},"in_reply_to":"df87a7cf_7b0b36d5","updated":"2017-12-13 17:46:48.000000000","message":"Done","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"48982549b00e47cbe6eb13ba4ab0b17e6e69341a","unresolved":false,"context_lines":[{"line_number":1714,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":1715,"context_line":"                \u0027_aggregate_map_stale\u0027)"},{"line_number":1716,"context_line":"    def test_refresh_aggregates_not_stale(self, mock_stale, mock_get):"},{"line_number":1717,"context_line":"        \"\"\"Test that refresh aggregate map is not called when the map is"},{"line_number":1718,"context_line":"        not stale."},{"line_number":1719,"context_line":"        \"\"\""},{"line_number":1720,"context_line":"        mock_stale.return_value \u003d False"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_fbf666d7","line":1717,"range":{"start_line":1717,"start_character":21,"end_line":1717,"end_character":42},"updated":"2017-12-08 15:14:35.000000000","message":"nit","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3eefc41b163b8bba2cc49bd229bff77c484802bd","unresolved":false,"context_lines":[{"line_number":1714,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":1715,"context_line":"                \u0027_aggregate_map_stale\u0027)"},{"line_number":1716,"context_line":"    def test_refresh_aggregates_not_stale(self, mock_stale, mock_get):"},{"line_number":1717,"context_line":"        \"\"\"Test that refresh aggregate map is not called when the map is"},{"line_number":1718,"context_line":"        not stale."},{"line_number":1719,"context_line":"        \"\"\""},{"line_number":1720,"context_line":"        mock_stale.return_value \u003d False"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_c21225b5","line":1717,"range":{"start_line":1717,"start_character":21,"end_line":1717,"end_character":42},"in_reply_to":"df87a7cf_fbf666d7","updated":"2017-12-13 17:46:48.000000000","message":"Done","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"48982549b00e47cbe6eb13ba4ab0b17e6e69341a","unresolved":false,"context_lines":[{"line_number":1727,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":1728,"context_line":"                \u0027_get_provider_aggregates\u0027)"},{"line_number":1729,"context_line":"    def test_refresh_aggregates_time(self, mock_get, log_mock):"},{"line_number":1730,"context_line":"        \"\"\"Test that refresh aggregate map is called when the map is"},{"line_number":1731,"context_line":"        stale."},{"line_number":1732,"context_line":"        \"\"\""},{"line_number":1733,"context_line":"        uuid \u003d uuids.compute_node"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_7b349693","line":1730,"range":{"start_line":1730,"start_character":21,"end_line":1730,"end_character":42},"updated":"2017-12-08 15:14:35.000000000","message":"nit","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3eefc41b163b8bba2cc49bd229bff77c484802bd","unresolved":false,"context_lines":[{"line_number":1727,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":1728,"context_line":"                \u0027_get_provider_aggregates\u0027)"},{"line_number":1729,"context_line":"    def test_refresh_aggregates_time(self, mock_get, log_mock):"},{"line_number":1730,"context_line":"        \"\"\"Test that refresh aggregate map is called when the map is"},{"line_number":1731,"context_line":"        stale."},{"line_number":1732,"context_line":"        \"\"\""},{"line_number":1733,"context_line":"        uuid \u003d uuids.compute_node"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_221d11bd","line":1730,"range":{"start_line":1730,"start_character":21,"end_line":1730,"end_character":42},"in_reply_to":"df87a7cf_7b349693","updated":"2017-12-13 17:46:48.000000000","message":"Done","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7f6a5f6f65fe261980fa9dbc353199719928fc3d","unresolved":false,"context_lines":[{"line_number":2983,"context_line":"        self.client.delete_allocation_for_instance(uuids.rp_uuid)"},{"line_number":2984,"context_line":"        # make sure we didn\u0027t screw up the logic or the mock"},{"line_number":2985,"context_line":"        mock_log.info.assert_not_called()"},{"line_number":2986,"context_line":"        # make sure warning wasn\u0027t called for the 404"},{"line_number":2987,"context_line":"        mock_log.warning.assert_not_called()"},{"line_number":2988,"context_line":""},{"line_number":2989,"context_line":"    @mock.patch(\"nova.scheduler.client.report.SchedulerReportClient.\""},{"line_number":2990,"context_line":"                \"delete\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_c0b92f15","line":2987,"range":{"start_line":2986,"start_character":0,"end_line":2987,"end_character":44},"updated":"2017-12-08 14:30:46.000000000","message":"Could you make sure the offending UUID is popped from \u0027self.client.aggregate_refresh_time\u0027?","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3eefc41b163b8bba2cc49bd229bff77c484802bd","unresolved":false,"context_lines":[{"line_number":2983,"context_line":"        self.client.delete_allocation_for_instance(uuids.rp_uuid)"},{"line_number":2984,"context_line":"        # make sure we didn\u0027t screw up the logic or the mock"},{"line_number":2985,"context_line":"        mock_log.info.assert_not_called()"},{"line_number":2986,"context_line":"        # make sure warning wasn\u0027t called for the 404"},{"line_number":2987,"context_line":"        mock_log.warning.assert_not_called()"},{"line_number":2988,"context_line":""},{"line_number":2989,"context_line":"    @mock.patch(\"nova.scheduler.client.report.SchedulerReportClient.\""},{"line_number":2990,"context_line":"                \"delete\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_2273d14f","line":2987,"range":{"start_line":2986,"start_character":0,"end_line":2987,"end_character":44},"in_reply_to":"df87a7cf_c0b92f15","updated":"2017-12-13 17:46:48.000000000","message":"Done (elsewhere)","commit_id":"cc46cbbfa79d59bdd781976d5e5d0ff57820b939"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bf38658e9d2d5ba3577c45db16b08a9c0e6f9680","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"        # Seed the provider tree so _refresh_aggregates finds the provider"},{"line_number":1703,"context_line":"        self.client._provider_tree.new_root(\u0027compute\u0027, uuid, 1)"},{"line_number":1704,"context_line":"        mock_get.return_value \u003d set([uuids.agg1])"},{"line_number":1705,"context_line":"        self.client._refresh_aggregates(uuid, 1)"},{"line_number":1706,"context_line":"        mock_get.assert_called_once_with(uuid)"},{"line_number":1707,"context_line":"        self.assertIn(uuid, self.client.aggregate_refresh_time)"},{"line_number":1708,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_daa5ee48","line":1705,"range":{"start_line":1705,"start_character":46,"end_line":1705,"end_character":48},"updated":"2017-12-15 21:39:25.000000000","message":"prefer force\u003dTrue instead of having to remember what \"1\" means. here and throughout...","commit_id":"8112fb005b49d8e795e93e22594c111162094c85"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0b9b3ed4dc6900a43e25789184a67d775804bc52","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"        # Seed the provider tree so _refresh_aggregates finds the provider"},{"line_number":1703,"context_line":"        self.client._provider_tree.new_root(\u0027compute\u0027, uuid, 1)"},{"line_number":1704,"context_line":"        mock_get.return_value \u003d set([uuids.agg1])"},{"line_number":1705,"context_line":"        self.client._refresh_aggregates(uuid, 1)"},{"line_number":1706,"context_line":"        mock_get.assert_called_once_with(uuid)"},{"line_number":1707,"context_line":"        self.assertIn(uuid, self.client.aggregate_refresh_time)"},{"line_number":1708,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":7,"id":"bf8cb3f7_5edd6d40","line":1705,"range":{"start_line":1705,"start_character":46,"end_line":1705,"end_character":48},"in_reply_to":"bf8cb3f7_286ad67f","updated":"2017-12-24 02:49:56.000000000","message":"But one of several great reasons to specify the key for kwargs.","commit_id":"8112fb005b49d8e795e93e22594c111162094c85"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4605319d537e5ad64c02b8fdcf596934f49f5121","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"        # Seed the provider tree so _refresh_aggregates finds the provider"},{"line_number":1703,"context_line":"        self.client._provider_tree.new_root(\u0027compute\u0027, uuid, 1)"},{"line_number":1704,"context_line":"        mock_get.return_value \u003d set([uuids.agg1])"},{"line_number":1705,"context_line":"        self.client._refresh_aggregates(uuid, 1)"},{"line_number":1706,"context_line":"        mock_get.assert_called_once_with(uuid)"},{"line_number":1707,"context_line":"        self.assertIn(uuid, self.client.aggregate_refresh_time)"},{"line_number":1708,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":7,"id":"bf8cb3f7_286ad67f","line":1705,"range":{"start_line":1705,"start_character":46,"end_line":1705,"end_character":48},"in_reply_to":"bf8cb3f7_7cf66492","updated":"2017-12-21 13:18:50.000000000","message":"LOL, right you are :) Sorry for the noise...","commit_id":"8112fb005b49d8e795e93e22594c111162094c85"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cc3d0935a884f277a8d5b6f3b1dc72dd3dd02678","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"        # Seed the provider tree so _refresh_aggregates finds the provider"},{"line_number":1703,"context_line":"        self.client._provider_tree.new_root(\u0027compute\u0027, uuid, 1)"},{"line_number":1704,"context_line":"        mock_get.return_value \u003d set([uuids.agg1])"},{"line_number":1705,"context_line":"        self.client._refresh_aggregates(uuid, 1)"},{"line_number":1706,"context_line":"        mock_get.assert_called_once_with(uuid)"},{"line_number":1707,"context_line":"        self.assertIn(uuid, self.client.aggregate_refresh_time)"},{"line_number":1708,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":7,"id":"bf8cb3f7_7cf66492","line":1705,"range":{"start_line":1705,"start_character":46,"end_line":1705,"end_character":48},"in_reply_to":"bf8cb3f7_ac64c8ba","updated":"2017-12-21 10:22:08.000000000","message":"\u003e Stephen, I\u0027m referring only to how the force kwarg is specified in\n \u003e the call to self.client._refresh_aggregates(). This has the force\n \u003e kwarg as just \"1\" whereas I would prefer to specify it as\n \u003e force\u003dTrue so that it is readable and people aren\u0027t wondering when\n \u003e reading the test method \"what the heck is \"1\" as a parameter?\"\n\nUnless I\u0027m missing something, the \u00271\u0027 is for the \u0027generation\u0027 parameter - not \u0027force\u0027:\n\n    def _refresh_aggregates(self, rp_uuid, generation\u003dNone, force\u003dFalse):\n\n(from https://review.openstack.org/#/c/521685/7/nova/scheduler/client/report.py@640).","commit_id":"8112fb005b49d8e795e93e22594c111162094c85"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"1f8441c266d34e594c1804ebd00b39507deb689d","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"        # Seed the provider tree so _refresh_aggregates finds the provider"},{"line_number":1703,"context_line":"        self.client._provider_tree.new_root(\u0027compute\u0027, uuid, 1)"},{"line_number":1704,"context_line":"        mock_get.return_value \u003d set([uuids.agg1])"},{"line_number":1705,"context_line":"        self.client._refresh_aggregates(uuid, 1)"},{"line_number":1706,"context_line":"        mock_get.assert_called_once_with(uuid)"},{"line_number":1707,"context_line":"        self.assertIn(uuid, self.client.aggregate_refresh_time)"},{"line_number":1708,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":7,"id":"bf8cb3f7_8c39bd42","line":1705,"range":{"start_line":1705,"start_character":46,"end_line":1705,"end_character":48},"in_reply_to":"bf8cb3f7_ac64c8ba","updated":"2017-12-21 07:52:31.000000000","message":"In general, I agree that \u00271\u0027 should be \u0027force\u003dTrue\u0027 for clarity. But we can use force\u003dFalse option here (or we `should` use it in some of the following cases), so I\u0027m +1ing this.","commit_id":"8112fb005b49d8e795e93e22594c111162094c85"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aa6254a0d5c1a51a6793b0846bc8252fbdeec11c","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"        # Seed the provider tree so _refresh_aggregates finds the provider"},{"line_number":1703,"context_line":"        self.client._provider_tree.new_root(\u0027compute\u0027, uuid, 1)"},{"line_number":1704,"context_line":"        mock_get.return_value \u003d set([uuids.agg1])"},{"line_number":1705,"context_line":"        self.client._refresh_aggregates(uuid, 1)"},{"line_number":1706,"context_line":"        mock_get.assert_called_once_with(uuid)"},{"line_number":1707,"context_line":"        self.assertIn(uuid, self.client.aggregate_refresh_time)"},{"line_number":1708,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":7,"id":"bf8cb3f7_ac64c8ba","line":1705,"range":{"start_line":1705,"start_character":46,"end_line":1705,"end_character":48},"in_reply_to":"df87a7cf_cfae40e6","updated":"2017-12-20 23:06:18.000000000","message":"Stephen, I\u0027m referring only to how the force kwarg is specified in the call to self.client._refresh_aggregates(). This has the force kwarg as just \"1\" whereas I would prefer to specify it as force\u003dTrue so that it is readable and people aren\u0027t wondering when reading the test method \"what the heck is \"1\" as a parameter?\"","commit_id":"8112fb005b49d8e795e93e22594c111162094c85"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6e53f83ab41af735364a3e4ca6fddfcf6d5c416a","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"        # Seed the provider tree so _refresh_aggregates finds the provider"},{"line_number":1703,"context_line":"        self.client._provider_tree.new_root(\u0027compute\u0027, uuid, 1)"},{"line_number":1704,"context_line":"        mock_get.return_value \u003d set([uuids.agg1])"},{"line_number":1705,"context_line":"        self.client._refresh_aggregates(uuid, 1)"},{"line_number":1706,"context_line":"        mock_get.assert_called_once_with(uuid)"},{"line_number":1707,"context_line":"        self.assertIn(uuid, self.client.aggregate_refresh_time)"},{"line_number":1708,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_cfae40e6","line":1705,"range":{"start_line":1705,"start_character":46,"end_line":1705,"end_character":48},"in_reply_to":"df87a7cf_daa5ee48","updated":"2017-12-20 17:15:11.000000000","message":"We can\u0027t do that. What we\u0027re testing here is that \u0027_refresh_aggregates\u0027 does stuff (asserted by checking calls of \u0027_get_provider_aggregates\u0027) sometimes but not other times. Forcing this doesn\u0027t allow us to test this.\n\n*However*, we don\u0027t actually need this since updating the generation is optional. I\u0027ve just dropped it.","commit_id":"8112fb005b49d8e795e93e22594c111162094c85"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"b9dddcc365a08404fbbb401425d2a7cf8492a370","unresolved":false,"context_lines":[{"line_number":1715,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":1716,"context_line":"                \u0027_aggregate_map_stale\u0027)"},{"line_number":1717,"context_line":"    def test_refresh_aggregates_not_stale(self, mock_stale, mock_get):"},{"line_number":1718,"context_line":"        \"\"\"Test that aggregates are not updated when there are no changes.\"\"\""},{"line_number":1719,"context_line":"        mock_stale.return_value \u003d False"},{"line_number":1720,"context_line":"        uuid \u003d uuids.compute_node"},{"line_number":1721,"context_line":"        self.client._refresh_aggregates(uuid)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf8cb3f7_e176523f","line":1718,"range":{"start_line":1718,"start_character":53,"end_line":1718,"end_character":73},"updated":"2017-12-21 07:43:45.000000000","message":"No changes to what? This case is just testing the case that aggregates are not stale. Nothing to do with what has changed or not?","commit_id":"8611eede5dcb80287d128546e546859f61a9b31f"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"b9dddcc365a08404fbbb401425d2a7cf8492a370","unresolved":false,"context_lines":[{"line_number":2107,"context_line":"        cn \u003d self.compute_node"},{"line_number":2108,"context_line":"        # Make sure the resource provider exists for preventing to call the API"},{"line_number":2109,"context_line":"        self._init_provider_tree()"},{"line_number":2110,"context_line":"        self.client.aggregate_refresh_time[uuids.cn] \u003d mock.Mock()"},{"line_number":2111,"context_line":""},{"line_number":2112,"context_line":"        mock_get.return_value.json.return_value \u003d {"},{"line_number":2113,"context_line":"            \u0027resource_provider_generation\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf8cb3f7_ec496960","line":2110,"range":{"start_line":2110,"start_character":8,"end_line":2110,"end_character":66},"updated":"2017-12-21 07:43:45.000000000","message":"This looks reasonable, because there isn\u0027t that cn on our cache.","commit_id":"8611eede5dcb80287d128546e546859f61a9b31f"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"b9dddcc365a08404fbbb401425d2a7cf8492a370","unresolved":false,"context_lines":[{"line_number":3015,"context_line":"    def test_delete_resource_provider_no_cascade(self, mock_by_host,"},{"line_number":3016,"context_line":"            mock_del_alloc, mock_delete):"},{"line_number":3017,"context_line":"        self.client._provider_tree.new_root(uuids.cn, uuids.cn, 1)"},{"line_number":3018,"context_line":"        self.client.aggregate_refresh_time[uuids.cn] \u003d mock.Mock()"},{"line_number":3019,"context_line":"        cn \u003d objects.ComputeNode(uuid\u003duuids.cn, host\u003d\"fake_host\","},{"line_number":3020,"context_line":"                hypervisor_hostname\u003d\"fake_hostname\", )"},{"line_number":3021,"context_line":"        inst1 \u003d objects.Instance(uuid\u003duuids.inst1)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf8cb3f7_2cdc3173","line":3018,"range":{"start_line":3018,"start_character":8,"end_line":3018,"end_character":66},"updated":"2017-12-21 07:43:45.000000000","message":"But here I prefer calling _ensure_resource_provider(uuids.cn) with get_agg_mock().　This looks a bit superficial to me.","commit_id":"8611eede5dcb80287d128546e546859f61a9b31f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0b9b3ed4dc6900a43e25789184a67d775804bc52","unresolved":false,"context_lines":[{"line_number":3015,"context_line":"    def test_delete_resource_provider_no_cascade(self, mock_by_host,"},{"line_number":3016,"context_line":"            mock_del_alloc, mock_delete):"},{"line_number":3017,"context_line":"        self.client._provider_tree.new_root(uuids.cn, uuids.cn, 1)"},{"line_number":3018,"context_line":"        self.client.aggregate_refresh_time[uuids.cn] \u003d mock.Mock()"},{"line_number":3019,"context_line":"        cn \u003d objects.ComputeNode(uuid\u003duuids.cn, host\u003d\"fake_host\","},{"line_number":3020,"context_line":"                hypervisor_hostname\u003d\"fake_hostname\", )"},{"line_number":3021,"context_line":"        inst1 \u003d objects.Instance(uuid\u003duuids.inst1)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf8cb3f7_1ee7e514","line":3018,"range":{"start_line":3018,"start_character":8,"end_line":3018,"end_character":66},"in_reply_to":"bf8cb3f7_2cdc3173","updated":"2017-12-24 02:49:56.000000000","message":"Good for a followon.  (I deliberately didn\u0027t change the logic; just renamed the method.)","commit_id":"8611eede5dcb80287d128546e546859f61a9b31f"}]}
