Repository navigation
Conversation
Signed-off-by: Rashi Jaiswal <rashi.jaiswal@dbtlabs.com>
36 tasks
This branch has not been deployed
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.
Cold-starting SQL warehouses answer OpenSession with transient 503s, and the per-request retry budget (RetryMax) runs out before the warehouse is up. Clients such as dbt need a way to wait longer for the session.
Adds
WithConnectTimeout(d). On the Thrift backend, OpenSession is bounded bydand retried with exponential backoff (RetryWaitMin/RetryWaitMax) while the error is a retryable one; other errors (bad token, missing warehouse) fail fast. Default 0 keeps a single attempt, so behaviour is unchanged unless set. Ported from our fork (dbt-labs#9) onto theinternal/backend/thriftlayout.Only 429 and 503 are treated as retryable by the existing RetryPolicy (they surface as
RetryableError), so 502/504 and network drops still fail fast after the per-request retries. This matches the fork, which uses the sameRetryableErrorcheck; nothing wider was dropped in the port. The option is Thrift only:NewConnectorrejects it together withWithUseKernel(true), because the kernel backend has no connect-timeout equivalent. On deadline the error wraps both the last retryable error andcontext.DeadlineExceeded. Documented indoc.go.Independent of the polling PR from the same fork (it edits backend.go, backend_test.go and CHANGELOG.md in other places, so whichever merges second needs a trivial rebase). The foundry driver's connection timeout option (adbc-drivers/databricks) will use this once it is released.
Part of dbt-labs/dbt#16697