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

Fixed select_node_type error #614

Merged
merged 1 commit into from
Apr 12, 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
7 changes: 5 additions & 2 deletions databricks/sdk/mixins/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def select_spark_version(self,
:param beta: bool
:param latest: bool
:param ml: bool
:param genomics: bool
:param gpu: bool
:param scala: str
:param spark_version: str
Expand All @@ -100,7 +101,7 @@ def select_spark_version(self,
for version in sv.versions:
if "-scala" + scala not in version.key:
continue
matches = ((not "apache-spark-" in version.key) and (("-ml-" in version.key) == ml)
matches = (("apache-spark-" not in version.key) and (("-ml-" in version.key) == ml)
and (("-hls-" in version.key) == genomics) and (("-gpu-" in version.key) == gpu)
and (("-photon-" in version.key) == photon)
and (("-aarch64-" in version.key) == graviton) and (("Beta" in version.name) == beta))
Expand Down Expand Up @@ -137,7 +138,7 @@ def _should_node_be_skipped(nt: compute.NodeType) -> bool:
return False
val = compute.CloudProviderNodeStatus
for st in nt.node_info.status:
if st in (val.NotAvailableInRegion, val.NotEnabledOnSubscription):
if st in (val.NOT_AVAILABLE_IN_REGION, val.NOT_ENABLED_ON_SUBSCRIPTION):
return True
return False

Expand Down Expand Up @@ -168,6 +169,8 @@ def select_node_type(self,
:param photon_driver_capable: bool
:param graviton: bool
:param is_io_cache_enabled: bool
:param support_port_forwarding: bool
:param fleet: bool

:returns: `node_type` compatible string
"""
Expand Down
Loading