fix(appkit): check isRetryable before retrying in interceptor#276
Open
MarioCadenas wants to merge 1 commit intomainfrom
Open
fix(appkit): check isRetryable before retrying in interceptor#276MarioCadenas wants to merge 1 commit intomainfrom
MarioCadenas wants to merge 1 commit intomainfrom
Conversation
The RetryInterceptor retried all errors including AuthenticationError and ValidationError which have isRetryable=false. Now checks error.isRetryable before scheduling a retry attempt. Also handles Databricks SDK ApiError via duck-typed isRetryable() method and status-code heuristic (4xx not retried, 5xx/429 retried). Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
fd21bbb to
a9fc61f
Compare
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.
Summary
The
RetryInterceptorretried all errors indiscriminately — includingAuthenticationError(401),ValidationError(400), and Databricks SDK 4xx errors — wasting warehouse compute and delaying error responses. This PR adds anisRetryableErrorcheck that respects theAppKitError.isRetryableproperty and duck-types the Databricks SDKApiError.isRetryable()method, with a status-code fallback (5xx/429 retry, 4xx don't).Changes
isRetryableError()function toretry.tsthat checks:AppKitError.isRetryableboolean property (covers all AppKit error subclasses)ApiError.isRetryable()method via duck typing (no SDK import needed)isRetryableErrorTest plan
AuthenticationErrorinside a plugin'sexecute()— it should propagate immediately without retries