diff --git a/python/ray/dashboard/modules/node/node_head.py b/python/ray/dashboard/modules/node/node_head.py index e146d9409cb6..7336c6216912 100644 --- a/python/ray/dashboard/modules/node/node_head.py +++ b/python/ray/dashboard/modules/node/node_head.py @@ -442,18 +442,15 @@ async def _update_node_stats(self): # from another async task) current_stub_node_id_tuples = list(self._stubs.items()) - if current_stub_node_id_tuples: - node_ids, _ = zip(*current_stub_node_id_tuples) - else: - node_ids = [] - + node_ids = [] get_node_stats_tasks = [] - for i, (node_id, stub) in enumerate(current_stub_node_id_tuples): + for _, (node_id, stub) in enumerate(current_stub_node_id_tuples): node_info = DataSource.nodes.get(node_id) if node_info["state"] != "ALIVE": continue + node_ids.append(node_id) get_node_stats_tasks.append( stub.GetNodeStats( node_manager_pb2.GetNodeStatsRequest( diff --git a/python/ray/dashboard/modules/node/tests/test_node.py b/python/ray/dashboard/modules/node/tests/test_node.py index cb71105046e3..2cda84daab65 100644 --- a/python/ray/dashboard/modules/node/tests/test_node.py +++ b/python/ray/dashboard/modules/node/tests/test_node.py @@ -189,6 +189,7 @@ def _check_nodes(): assert detail["raylet"]["state"] == "ALIVE" else: assert detail["raylet"]["state"] == "DEAD" + assert detail["raylet"].get("objectStoreAvailableMemory", 0) == 0 response = requests.get(webui_url + "/test/dump?key=agents") response.raise_for_status() agents = response.json()