-
Notifications
You must be signed in to change notification settings - Fork 130
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
Added timeout to w.clusters.ensure_cluster_running()
#227
Conversation
- Retry on `OperationFailed` errors, same as in Java SDK
e8c0e64
to
2fe1293
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #227 +/- ##
==========================================
- Coverage 53.73% 53.72% -0.02%
==========================================
Files 33 33
Lines 19332 19349 +17
==========================================
+ Hits 10389 10396 +7
- Misses 8943 8953 +10
☔ View full report in Codecov by Sentry. |
databricks/sdk/mixins/compute.py
Outdated
@@ -203,16 +209,25 @@ def select_node_type(self, | |||
return nt.node_type_id | |||
raise ValueError("cannot determine smallest node type") | |||
|
|||
def ensure_cluster_is_running(self, cluster_id: str): | |||
def ensure_cluster_is_running(self, cluster_id: str) -> compute.ClusterDetails: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need cluster details to be returned? this will have to be adjusted across all SDKs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't have to 🤷♂️ Just seemed more useful given that we have it than returning None
.
Do you want me to revert that commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@judahrand could you address this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry! I'd forgotten to follow up on this. Done now.
This was requested in order to match up with the SDKs in other languages. This reverts commit 3f04d7c.
2932d2c
to
743252c
Compare
w.clusters.ensure_cluster_running()
Changes
This picks up where #118 left off.
Tests
make test
run locallymake fmt
applied