Skip to content
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

[Core] honor allowed_cloud config in catalog lookup #4496

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
6 changes: 2 additions & 4 deletions docs/source/reference/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ Available fields and semantics:
cpus: 4+ # number of vCPUs, max concurrent spot jobs = 2 * cpus
disk_size: 100

# Allow list for clouds to be used in `sky check`
# Allow list for clouds to be used
#
# This field is used to restrict the clouds that SkyPilot will check and use
# when running `sky check`. Any cloud already enabled but not specified here
# will be disabled on the next `sky check` run.
# This field is used to restrict the clouds that SkyPilot will check and use.
# If this field is not set, SkyPilot will check and use all supported clouds.
#
# Default: null (use all supported clouds).
Expand Down
8 changes: 7 additions & 1 deletion sky/clouds/service_catalog/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import typing
from typing import Dict, List, Optional, Set, Tuple, Union

from sky import skypilot_config
from sky.clouds.service_catalog.config import fallback_to_default_catalog
from sky.clouds.service_catalog.constants import ALL_CLOUDS
from sky.clouds.service_catalog.constants import CATALOG_DIR
Expand All @@ -20,7 +21,12 @@

def _map_clouds_catalog(clouds: CloudFilter, method_name: str, *args, **kwargs):
if clouds is None:
clouds = list(ALL_CLOUDS)
# Honor the allowed_clouds config when clouds is not specified.
# Note: no op if disabled clouds are specified, since Optimizer will
# error out to user in the end.
clouds = typing.cast(
List[str],
skypilot_config.get_nested(('allowed_clouds',), list(ALL_CLOUDS)))

# TODO(hemil): Remove this once the common service catalog
# functions are refactored from clouds/kubernetes.py to
Expand Down
Loading