From 7c6706041ffb2aad736e04768067df8d1f73e072 Mon Sep 17 00:00:00 2001 From: Alexey Roytman Date: Sat, 2 Sep 2023 17:22:49 +0300 Subject: [PATCH] RayCluster status safeguards Signed-off-by: Alexey Roytman --- src/codeflare_sdk/cluster/cluster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codeflare_sdk/cluster/cluster.py b/src/codeflare_sdk/cluster/cluster.py index 4d8637667..0e08c2751 100644 --- a/src/codeflare_sdk/cluster/cluster.py +++ b/src/codeflare_sdk/cluster/cluster.py @@ -562,7 +562,7 @@ def _get_app_wrappers( def _map_to_ray_cluster(rc) -> Optional[RayCluster]: - if "state" in rc["status"]: + if "status" in rc and "state" in rc["status"]: status = RayClusterStatus(rc["status"]["state"].lower()) else: status = RayClusterStatus.UNKNOWN