)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4496bc7d7e61ce65bf89ec5a0413a70b118c545c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"fc34ed06_b0b87b8e","updated":"2025-11-18 09:37:46.000000000","message":"Thanks, good to update that comment, this seems good now.","commit_id":"55bc59b46d93ffd60cb7e7441cdd893eb0749263"}],"nova/tests/unit/virt/ironic/test_driver.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6a60c7c02d73cdd517abc5af13e1c37c76cc2537","unresolved":true,"context_lines":[{"line_number":3633,"context_line":"        result \u003d self.driver.get_num_instances()"},{"line_number":3634,"context_line":""},{"line_number":3635,"context_line":"        self.assertEqual(result, 3)"},{"line_number":3636,"context_line":"        mock_list_instance_uuids.assert_called_once_with()"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7cfc70_41ede7db","line":3636,"updated":"2026-04-22 15:17:26.000000000","message":"https://review.opendev.org/c/openstack/nova/+/985785/1/nova/tests/unit/virt/ironic/test_driver.py#606 has slightly better testing","commit_id":"55bc59b46d93ffd60cb7e7441cdd893eb0749263"}],"nova/virt/ironic/driver.py":[{"author":{"_account_id":20733,"name":"Rajesh Tailor","email":"ratailor@redhat.com","username":"rajesht"},"change_message_id":"c9a083953817e15fff064306db05fe1f478ca4bb","unresolved":true,"context_lines":[{"line_number":628,"context_line":"        else:"},{"line_number":629,"context_line":"            return list(node_generator)"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":"    def get_num_instances(self):"},{"line_number":632,"context_line":"      \"\"\"Return the total number of machines."},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"         Return the number of machines that the hypervisor knows"},{"line_number":635,"context_line":"         about"},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"         .. note::"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"            This implementation works for all drivers, but it is"},{"line_number":640,"context_line":"            not particularly efficient. Maintainers of the virt drivers are"},{"line_number":641,"context_line":"            encouraged to override this method with something more"},{"line_number":642,"context_line":"            efficient."},{"line_number":643,"context_line":"      \"\"\""},{"line_number":644,"context_line":"      return len(self.list_instance_uuids())"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"    def list_instances(self):"},{"line_number":647,"context_line":"        \"\"\"Return the names of all the instances provisioned."}],"source_content_type":"text/x-python","patch_set":3,"id":"25e5a3e5_424ecb8f","line":644,"range":{"start_line":631,"start_character":0,"end_line":644,"end_character":44},"updated":"2025-07-24 05:34:21.000000000","message":"Please correct the indentation for the function. Also add test coverage for the same.","commit_id":"752a02d9af6f04ed3f839452f6a4bebe51fe5bc7"},{"author":{"_account_id":38234,"name":"Ian Watson","display_name":"Ian Watson","email":"ianwatson92@hotmail.co.uk","username":"ianwatsonit"},"change_message_id":"6e09487b63c9dcc0522bacafc58263125c7996ad","unresolved":false,"context_lines":[{"line_number":628,"context_line":"        else:"},{"line_number":629,"context_line":"            return list(node_generator)"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":"    def get_num_instances(self):"},{"line_number":632,"context_line":"      \"\"\"Return the total number of machines."},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"         Return the number of machines that the hypervisor knows"},{"line_number":635,"context_line":"         about"},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"         .. note::"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"            This implementation works for all drivers, but it is"},{"line_number":640,"context_line":"            not particularly efficient. Maintainers of the virt drivers are"},{"line_number":641,"context_line":"            encouraged to override this method with something more"},{"line_number":642,"context_line":"            efficient."},{"line_number":643,"context_line":"      \"\"\""},{"line_number":644,"context_line":"      return len(self.list_instance_uuids())"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"    def list_instances(self):"},{"line_number":647,"context_line":"        \"\"\"Return the names of all the instances provisioned."}],"source_content_type":"text/x-python","patch_set":3,"id":"fc9e2644_680c4620","line":644,"range":{"start_line":631,"start_character":0,"end_line":644,"end_character":44},"in_reply_to":"25e5a3e5_424ecb8f","updated":"2025-07-30 09:35:20.000000000","message":"Done","commit_id":"752a02d9af6f04ed3f839452f6a4bebe51fe5bc7"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8a93c702b42e162bf6c699f012991a7b8c84b4df","unresolved":true,"context_lines":[{"line_number":671,"context_line":"        \"\"\""},{"line_number":672,"context_line":"        if not self.node_cache:"},{"line_number":673,"context_line":"            # Empty cache, try to populate it. If we cannot populate it, this"},{"line_number":674,"context_line":"            # is OK. This information is only used to cleanup deleted nodes;"},{"line_number":675,"context_line":"            # if Ironic has no deleted nodes; we\u0027re good."},{"line_number":676,"context_line":"            self._refresh_cache()"},{"line_number":677,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a976a14_ebd3a3e6","line":674,"updated":"2025-09-22 10:11:59.000000000","message":"This is no longer true? Can you update this, assuming the comment makes no sense now.","commit_id":"8252711d2b299036e4e8029d2ad937f2eb3ab339"},{"author":{"_account_id":28329,"name":"yangjianfeng","display_name":"JeffYang","email":"yjf1970231893@gmail.com","username":"yangjianfeng"},"change_message_id":"875f3c7035ca13ba9c32961f6388a83bff7eb877","unresolved":true,"context_lines":[{"line_number":670,"context_line":""},{"line_number":671,"context_line":"        \"\"\""},{"line_number":672,"context_line":"        if not self.node_cache:"},{"line_number":673,"context_line":"            # Empty cache, try to populate it. If we cannot populate it, this"},{"line_number":674,"context_line":"            # is OK. This information is used to cleanup deleted nodes and"},{"line_number":675,"context_line":"            # to log a warning in the sync_power_states periodic task;"},{"line_number":676,"context_line":"            # if Ironic has no deleted nodes; we\u0027re good."},{"line_number":677,"context_line":"            self._refresh_cache()"}],"source_content_type":"text/x-python","patch_set":6,"id":"9b194062_0e0741ba","line":674,"range":{"start_line":673,"start_character":47,"end_line":674,"end_character":19},"updated":"2025-09-22 11:51:33.000000000","message":"Because the information is now used for more than just cleaning up deleted nodes, is it still acceptable if we cannot populate self.node_cache?","commit_id":"691d4e6507fd6c883479e4b04051e8316efab3d5"},{"author":{"_account_id":38234,"name":"Ian Watson","display_name":"Ian Watson","email":"ianwatson92@hotmail.co.uk","username":"ianwatsonit"},"change_message_id":"34bc0dc49dd381c99f3e6135aa963eeb6e42e019","unresolved":true,"context_lines":[{"line_number":670,"context_line":""},{"line_number":671,"context_line":"        \"\"\""},{"line_number":672,"context_line":"        if not self.node_cache:"},{"line_number":673,"context_line":"            # Empty cache, try to populate it. If we cannot populate it, this"},{"line_number":674,"context_line":"            # is OK. This information is used to cleanup deleted nodes and"},{"line_number":675,"context_line":"            # to log a warning in the sync_power_states periodic task;"},{"line_number":676,"context_line":"            # if Ironic has no deleted nodes; we\u0027re good."},{"line_number":677,"context_line":"            self._refresh_cache()"}],"source_content_type":"text/x-python","patch_set":6,"id":"4274f7b0_a8d85498","line":674,"range":{"start_line":673,"start_character":47,"end_line":674,"end_character":19},"in_reply_to":"9b194062_0e0741ba","updated":"2025-09-22 12:30:32.000000000","message":"It is acceptable. The callee code only uses this to log an warning. \n\nhttps://opendev.org/openstack/nova/src/branch/master/nova/compute/manager.py#L10979\nhttps://opendev.org/openstack/nova/src/branch/master/nova/compute/manager.py#L10988-L10994","commit_id":"691d4e6507fd6c883479e4b04051e8316efab3d5"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6a60c7c02d73cdd517abc5af13e1c37c76cc2537","unresolved":true,"context_lines":[{"line_number":637,"context_line":"        :returns: a count of instances"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"        \"\"\""},{"line_number":640,"context_line":"        return len(self.list_instance_uuids())"},{"line_number":641,"context_line":""},{"line_number":642,"context_line":"    def list_instances(self):"},{"line_number":643,"context_line":"        \"\"\"Return the names of all the instances provisioned."}],"source_content_type":"text/x-python","patch_set":7,"id":"7cf136f3_76118640","line":640,"range":{"start_line":640,"start_character":15,"end_line":640,"end_character":46},"updated":"2026-04-22 15:17:26.000000000","message":"this is a clen approch","commit_id":"55bc59b46d93ffd60cb7e7441cdd893eb0749263"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d1f74e923d3c30c00c8aaa4672bd1121eea7242e","unresolved":true,"context_lines":[{"line_number":652,"context_line":"        #             this is effectively dead code in the Ironic driver."},{"line_number":653,"context_line":"        if not self.node_cache:"},{"line_number":654,"context_line":"            # Empty cache, try to populate it. If we cannot populate it, this"},{"line_number":655,"context_line":"            # is OK. This information is only used to cleanup deleted nodes;"},{"line_number":656,"context_line":"            # if Ironic has no deleted nodes; we\u0027re good."},{"line_number":657,"context_line":"            self._refresh_cache()"},{"line_number":658,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"be36bc40_11b25ed7","line":655,"updated":"2026-05-04 16:46:04.000000000","message":"I guess this is not true any more either as the cache is used for all places that needs num_instances","commit_id":"55bc59b46d93ffd60cb7e7441cdd893eb0749263"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d1f74e923d3c30c00c8aaa4672bd1121eea7242e","unresolved":true,"context_lines":[{"line_number":670,"context_line":""},{"line_number":671,"context_line":"        \"\"\""},{"line_number":672,"context_line":"        if not self.node_cache:"},{"line_number":673,"context_line":"            # Empty cache, try to populate it. If we cannot populate it, this"},{"line_number":674,"context_line":"            # is OK. This information is used to cleanup deleted nodes and"},{"line_number":675,"context_line":"            # to log a warning in the sync_power_states periodic task;"},{"line_number":676,"context_line":"            # if Ironic has no deleted nodes; we\u0027re good."}],"source_content_type":"text/x-python","patch_set":7,"id":"3b7b8426_712a4be0","line":673,"updated":"2026-05-04 16:46:04.000000000","message":"OK so this will not be stale for a long time as the periodic get_available_nodes() calls _refresh_cache() unconditionally.","commit_id":"55bc59b46d93ffd60cb7e7441cdd893eb0749263"}]}
