Conversation
…ltaneously started by two different processes This PR adds a retry for timing edge cases like `INVALID_STATE: Cluster XXX is in unexpected state Pending.`
This was referenced Aug 11, 2023
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #580 +/- ##
==========================================
- Coverage 18.25% 18.24% -0.01%
==========================================
Files 85 85
Lines 9861 9865 +4
==========================================
Hits 1800 1800
- Misses 7906 7910 +4
Partials 155 155
☔ View full report in Codecov by Sentry. |
mgyucht
approved these changes
Aug 14, 2023
Contributor
mgyucht
left a comment
There was a problem hiding this comment.
Small nit, otherwise LGTM
| return retries.Wait(ctx, timeout, func() *retries.Err { | ||
| err := a.startClusterIfNeeded(ctx, clusterId, timeout) | ||
| var apiErr *apierr.APIError | ||
| if errors.As(err, &apiErr) && apiErr.ErrorCode == "INVALID_STATE" { |
Contributor
There was a problem hiding this comment.
Can we define this error code as a constant?
github-merge-queue bot
pushed a commit
to databricks/databricks-sdk-py
that referenced
this pull request
Aug 16, 2023
…imultaneously started by two different processes. (#283) This PR adds a retry for timing edge cases like `INVALID_STATE: Cluster XXX is in unexpected state Pending.` Other PRs: - databricks/databricks-sdk-go#580 - databricks/databricks-sdk-java#134
github-merge-queue bot
pushed a commit
to databricks/databricks-sdk-java
that referenced
this pull request
Aug 16, 2023
…multaneously started by two different processes (#134) This PR adds a retry for timing edge cases like `INVALID_STATE: Cluster XXX is in unexpected state Pending.` Other PRs: - databricks/databricks-sdk-py#283 - databricks/databricks-sdk-go#580
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a retry for timing edge cases like
INVALID_STATE: Cluster XXX is in unexpected state Pending.Other PRs:
w.clusters().ensureClusterIsRunning(id)when cluster is simultaneously started by two different processes databricks-sdk-java#134w.clusters.ensure_cluster_is_running(id)when cluster is simultaneously started by two different processes. databricks-sdk-py#283