From 08628254e4575f91f3627968ff123e405aba57dc Mon Sep 17 00:00:00 2001 From: Zhanghao Wu Date: Thu, 22 Jun 2023 02:04:57 -0700 Subject: [PATCH] fix azure refresh when the cluster terminated on the cloud --- sky/clouds/azure.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sky/clouds/azure.py b/sky/clouds/azure.py index 8461be60e84..f90ceb0d459 100644 --- a/sky/clouds/azure.py +++ b/sky/clouds/azure.py @@ -527,6 +527,8 @@ def query_status(cls, name: str, tag_filters: Dict[str, str], if not stdout.strip(): return [] node_ids = json.loads(stdout.strip()) + if not node_ids: + return [] state_str = '[].powerState' if len(node_ids) == 1: state_str = 'powerState'