Repository navigation
Conversation
On the kernel backend a custom WithTransport is rejected with ErrNotSupportedByKernel. The fix-it text said "use the default (Thrift) backend", which is wrong after Reyden auto-recovery: Reyden warehouses reject Thrift (KP001). The message now points to the WithKernel* TLS and proxy options and qualifies the Thrift suggestion to warehouses that accept Thrift. Add hermetic tests for both recovery paths (KP001 recovery and the cached Reyden pre-check) that assert the sentinels, the message, and that the caller's transport is never called. Document the Reyden limitation in CONNECTION_PARAMETERS.md. Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com> Co-authored-by: Isaac <no-reply@databricks.com>
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.
Summary
A custom
WithTransportcan't be used on the kernel backend: a GoRoundTrippercan't reach the kernel'sRust HTTP stack, so the driver rejects it with
ErrNotSupportedByKernel. The error told users to "use the default(Thrift) backend", which is wrong for Reyden warehouses: they reject Thrift, and the default backend then falls
back to the kernel and hits the same error. The message now points to the
WithKernel*TLS and proxy options, andsuggests Thrift only for warehouses that accept it.
What changes
WithTransporton the kernel path. The rejection itself, anderrors.Is(err, ErrNotSupportedByKernel), are unchanged.CONNECTION_PARAMETERS.md: one sentence sayingWithTransportcan't be used with Reyden warehouses.TestReydenWithTransportRejectionfor both Reyden fallback paths: Thrift rejected during connect, and awarehouse already known to be Reyden.
Known limit: the kernel path still can't honor a custom transport. Use
WithKernelTrustedCerts,WithKernelClientCertificate,WithKernelProxyorWithKernelSkipHostnameVerifyinstead.Testing
Live, against a DBSQL and a Reyden warehouse:
SELECT 1, no transportWithTransport: rejected before any network call, transport never calledWithTransport: new message, matchesErrNotSupportedByKernelandErrReydenThriftUnsupportedUnit:
go testpasses in the default build and with-tags databricks_kernel;go vet, golangci-lint and gofmtare clean. The kernel-tagged runs used a kernel archive built from source at
KERNEL_REV.Not run: Windows and macOS builds (CI).
Dependencies
None.
This pull request and its description were written by Isaac.