Skip to content

[minor] Allow sky check to set enabled_clouds to empty #3174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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