Repository navigation
feat(kernel): route the proxy option through SOCKS on the kernel backend - #653
Conversation
d080867 to
0c4d22b
Compare
0c4d22b to
d20691d
Compare
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
The mapping change looks correct, with 1 medium and 1 low docs concern. The socks→socks5h mapping and its table-driven tests are good. But the native package pins (1.5.0) do not include the SOCKS kernel change yet, so the changelog and docs claim support that does not ship.
aakash-saravanan-db
left a comment
There was a problem hiding this comment.
Thanks for the PR! The socks to socks5h mapping preserves Thrift's DNS behavior with a small adapter change, and keeping credentials in separate fields avoids URL-encoding problems. The option-conversion tests are focused and readable.
The inline comment is about the full-support claim while the shared kernel still drops SOCKS4 user IDs. The adapter mapping itself looks correct; the transport correction belongs in the kernel. The compatible native-package release remains a separate prerequisite, as already planned.
Please also shorten the PR description to the public behavior, dependencies, and relevant validation, removing internal tracking details and prior-review history.
This review was generated with GitHub MCP.
d20691d to
41a874c
Compare
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Low
Looks good, with one low concern. The socks → socks5h mapping matches the default DNS mode of Thrift's socks-proxy-agent, and the table-driven tests cover every declared protocol plus credential and bypass forwarding.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
f53207b to
1813d9b
Compare
aakash-saravanan-db
left a comment
There was a problem hiding this comment.
Thanks for the updates! The proxy mapping and focused option-conversion tests look good. LGTM.
This review was generated with GitHub MCP.
1813d9b to
434c310
Compare
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
Looks good: 1 medium concern. The protocol mapping and its tests are correct, and socks → socks5h matches Thrift's socks-proxy-agent DNS behavior. The only problem is that the shipped binding pins (1.5.0) don't support SOCKS yet.
With a kernel build that supports SOCKS proxies, the existing `proxy` connection option now works on the kernel backend (useKernel: true) for socks4, socks4a, socks5 and socks5h, as it already does on Thrift. buildKernelProxyOptions maps protocol 'socks' to 'socks5h', so the proxy resolves DNS as socks-proxy-agent does on Thrift. The kernel rejects a bare socks:// URL. Other protocols pass through verbatim, and credentials stay separate fields. No option is added or renamed. KERNEL_REV points at a29235c, the merged kernel SOCKS commit (databricks/databricks-sql-kernel#518), so kernel-e2e builds the binding that supports it; native/kernel/index.d.ts picks up that kernel's ProxyInput doc update. The published 1.5.0 binding still rejects SOCKS URLs, so the @databricks/databricks-sql-kernel-* package pins must move to the kernel release that includes it. The kernel does not send a SOCKS4 user ID yet, so CONNECTION_PARAMETERS.md marks kernel proxy support as partial. Table-driven unit tests cover the protocol mapping and credential and bypass forwarding. CONNECTION_PARAMETERS.md describes the kernel support, including the kernel's HTTPS_PROXY/ALL_PROXY/NO_PROXY handling when no proxy option is set (Thrift ignores those variables). CHANGELOG.md has a short entry. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
434c310 to
f6178cc
Compare
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Nit
Needs changes: 1 high, 1 medium. The SOCKS mapping and its tests look right, but the shipped native pins and KERNEL_REV don't match the feature being announced.
Other findings
- ⚪ Nit —
KERNEL_REVisa29235cb…, but the PR description says it points at the kernel PR commitc9669d5. So the regeneratedindex.d.tsand the live validation may not match the pinned build. Fix whichever is wrong, the pin or the description, and regeneratenative/kernel/index.d.tsfrom that exact commit. (Found by Claude Opus 5.5 · the judge couldn't confirm it)
|
On the latest review's nit (description vs. |
Brings in the kernel SOCKS proxy routing (#653) and #651. KERNEL_REV now pins kernel 159a2ff0b69d, which carries both SOCKS and the External header-provider bridge, and native/kernel/index.d.ts matches a binding built from it. CONNECTION_PARAMETERS.md keeps both features' notes. Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com> Co-authored-by: Isaac <no-reply@databricks.com>
Summary
On Thrift, the
proxyconnection option already supportssocks,socks4,socks4a,socks5andsocks5h. This PR makes the same option work on the kernel backend (useKernel: true), using the kernel's SOCKS support (databricks/databricks-sql-kernel#518).protocol: 'socks'maps tosocks5h, so the proxy resolves DNS as withsocks-proxy-agenton Thrift. Other protocols pass through unchanged, andauthstays as separate username/password fields.proxy.auth.username. A SOCKS4 proxy that checks the user ID refuses kernel connections, soCONNECTION_PARAMETERS.mdmarks kernelproxysupport as partial.proxyoption, the kernel honorsHTTPS_PROXY,ALL_PROXYandNO_PROXY, including SOCKS URLs, while Thrift ignores them. This is documented inCONNECTION_PARAMETERS.md.No option is added or renamed.
Dependencies
KERNEL_REVpins the merged kernel commita29235c(feat(client): support SOCKS4/4a/5/5h proxies databricks-sql-kernel#518), so kernel-e2e builds a binding with SOCKS support.ProxyInputdoc comment innative/kernel/index.d.ts, which now lists the SOCKS schemes;native/kernel/index.jsis unchanged.@databricks/databricks-sql-kernel-*packages (1.5.0, which rejects SOCKS URLs) move to the next kernel release.Validation
buildKernelProxyOptionstests cover every protocol and credential forwarding. The full suite (1891 tests), lint, type-check and prettier pass.a29235c, through a loopback SOCKS fixture that records each handshake, with same-session Thrift rows:SELECT 1through each scheme, with the same DNS mode as Thrift.HTTPS_PROXY/ALL_PROXY/NO_PROXY, and an HTTP CONNECT proxy still working.SELECT 1throughsocks5hstayed within the agreedmax(+25 %, +150 ms)of direct on both engines.This pull request and its description were written by Isaac.