Skip to content

Commit

Permalink
Fix bug with checking enabled clouds in k8s list_accelerators
Browse files Browse the repository at this point in the history
  • Loading branch information
hemildesai committed Oct 6, 2023
1 parent fa0df6a commit 2134873
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sky/clouds/service_catalog/kubernetes_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ def list_accelerators(
quantity_filter: Optional[int],
case_sensitive: bool = True
) -> Dict[str, List[common.InstanceTypeInfo]]:
if Kubernetes not in global_user_state.get_enabled_clouds(
k8s_cloud = Kubernetes()
if not any(
map(lambda cloud: k8s_cloud.is_same_cloud(cloud),
global_user_state.get_enabled_clouds())
) or not kubernetes_utils.check_credentials()[0]:
return {}

Expand Down

0 comments on commit 2134873

Please sign in to comment.