Skip to content

Commit

Permalink
[minor] Allow sky check to set enabled_clouds to empty (#3174)
Browse files Browse the repository at this point in the history
* [minor] Allow sky check to set enabled_clouds to empty

* format
  • Loading branch information
Michaelvll authored Feb 18, 2024
1 parent bd64e18 commit 053d0ba
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sky/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ def check_one_cloud(cloud_tuple: Tuple[str, clouds.Cloud]) -> None:
for cloud_tuple in sorted(clouds_to_check):
check_one_cloud(cloud_tuple)

# Cloudflare is not a real cloud in clouds.CLOUD_REGISTRY, and should not be
# inserted into the DB (otherwise `sky launch` and other code would error
# out when it's trying to look it up in the registry).
enabled_clouds = [
cloud for cloud in enabled_clouds if not cloud.startswith('Cloudflare')
]
global_user_state.set_enabled_clouds(enabled_clouds)

if len(enabled_clouds) == 0:
click.echo(
click.style(
Expand All @@ -71,14 +79,6 @@ def check_one_cloud(cloud_tuple: Tuple[str, clouds.Cloud]) -> None:
rich.print('\n[green]:tada: Enabled clouds :tada:'
f'{enabled_clouds_str}[/green]')

# Cloudflare is not a real cloud in clouds.CLOUD_REGISTRY, and should not be
# inserted into the DB (otherwise `sky launch` and other code would error
# out when it's trying to look it up in the registry).
enabled_clouds = [
cloud for cloud in enabled_clouds if not cloud.startswith('Cloudflare')
]
global_user_state.set_enabled_clouds(enabled_clouds)


def get_cloud_credential_file_mounts(
excluded_clouds: Optional[Iterable[clouds.Cloud]]) -> Dict[str, str]:
Expand Down

0 comments on commit 053d0ba

Please sign in to comment.