Repository navigation
docs: describe SOCKS proxies from the environment on the kernel backend - #1082
Conversation
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 Low
Docs-only change. Looks accurate, with 1 medium concern: the kernel support claim isn't tied to any released kernel version. The Thrift behavior described matches the urllib3 ProxyManager path in thrift_http_client.py.
aakash-saravanan-db
left a comment
There was a problem hiding this comment.
Thanks for the PR! This keeps the connector API unchanged and explains the kernel's environment-based SOCKS support, DNS modes, credentials, and differences from Thrift in one place.
There's one documentation correction inline: unsupported environment values are ignored by the underlying proxy parser, so the text should distinguish that from failures through a supported SOCKS proxy. The compatible kernel release remains a separate prerequisite, as already noted.
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.
687029a to
12e92bb
Compare
12e92bb to
92e1ab7
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 Nit
Looks good: a docs-only change with no blocking issues. The Thrift claims match the code: detect_and_parse_proxy reads only the scheme key from urllib.request.getproxies(), so ALL_PROXY is ignored, and ProxyManager rejects SOCKS URLs. The new anchor link resolves.
Other findings
- ⚪ Nit — The new section says both backends read proxies from the environment. The deprecated SEA backend also builds a urllib3 ProxyManager, and the section doesn't mention it. The doc deliberately omits a SEA column, so this is minor. Add a one-line note that SEA behaves like Thrift. (Found by Claude Opus 5.5 · confirmed by the judge)
|
On the review's nit (mention the deprecated SEA backend): leaving the section as is. It covers the two supported backends, Thrift and kernel, and deliberately has no SEA column, as the nit notes. The deprecated SEA backend uses the same urllib3 |
aakash-saravanan-db
left a comment
There was a problem hiding this comment.
Thanks for the updates! The SOCKS documentation clearly explains the environment settings and backend differences. LGTM.
This review was generated with GitHub MCP.
Once the installed databricks-sql-kernel supports SOCKS, use_kernel=True connections honor socks4/socks4a/socks5/socks5h URLs in HTTPS_PROXY, or in ALL_PROXY when HTTPS_PROXY is unset, with NO_PROXY bypass, through the kernel's existing environment-proxy handling. The connector needs no code change for this. Record it in CONNECTION_PARAMETERS.md as a documented difference from Thrift: the variables honored, DNS per scheme (socks5/socks4 resolve locally, socks5h/socks4a at the proxy), credentials as URL userinfo, fail-closed behavior, and that Thrift raises ProxySchemeUnknown for a SOCKS HTTPS_PROXY and ignores ALL_PROXY. Bump KERNEL_REV to a29235cbea9532efa5572ebff010045583a19cbe, the merged kernel SOCKS change (databricks/databricks-sql-kernel#518), so kernel-e2e builds a wheel that supports SOCKS proxies. Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com> Co-authored-by: Isaac <no-reply@databricks.com>
92e1ab7 to
1edd69d
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 Nit
Looks good — 1 low concern. The Thrift claims match the code (getproxies().get(scheme) only). The description says nothing changes except docs, but it doesn't mention the KERNEL_REV bump, which changes the kernel source CI builds against. Adding an in-repo SOCKS E2E is follow-up work.
Other findings
- ⚪ Nit — The doc says only "a
databricks-sql-kernelrelease that supports SOCKS", so users can't tell which kernel version they need. The_portrow names the specific kernel PR it depends on. Name the kernel PR or the release version here too, once it ships. (Found by Claude Opus 5.5 · confirmed by the judge)
|
On the latest review's nits:
|
What type of PR is this?
Description
Documents in
CONNECTION_PARAMETERS.mdhow SOCKS proxies from environment variables behave on each backend, and movesKERNEL_REV(the kernel the kernel-e2e workflow builds) to the merged SOCKS kernel commita29235c. No connector code, option or default changes.use_kernel=True, with adatabricks-sql-kernelrelease that includes feat(client): support SOCKS4/4a/5/5h proxies databricks-sql-kernel#518): only thesocks4://,socks4a://,socks5://andsocks5h://SOCKS schemes are supported, inHTTPS_PROXY, or inALL_PROXYwhenHTTPS_PROXYis unset. They apply to all kernel traffic (queries, CloudFetch downloads and OAuth), andNO_PROXYhosts connect directly. A value with another scheme, such as baresocks://, is ignored.socks5/socks4resolve the target locally;socks5h/socks4alet the proxy resolve it. SOCKS5 credentials go in the URL userinfo; SOCKS4 sends no user ID. An unreachable proxy or rejected credentials fail the connection, with no direct fallback.HTTPS_PROXYfails with urllib3'sProxySchemeUnknown, andALL_PROXYis ignored.How is this tested?
sql.connectwith a locally built kernel wheel)Live against staging DBSQL and Reyden warehouses with a wheel built from kernel
a29235c, through a loopback SOCKS4/4a/5 fixture that records each handshake:SELECT 1and a 200,000-row CloudFetch query throughsocks5h,socks5,socks4aandsocks4, with the DNS mode documented above.ALL_PROXYalone,HTTPS_PROXYtaking precedence overALL_PROXY, andNO_PROXYhosts going direct.socks://inHTTPS_PROXYis ignored: the kernel connects directly, or usesALL_PROXYwhen it's set.ProxySchemeUnknownfor a SOCKSHTTPS_PROXY;ALL_PROXYignored.SELECT 1throughsocks5hwas withinmax(+25 %, +150 ms)of direct on DBSQL in both runs. On Reyden it was within in the second run; in the first run Reyden's own direct samples ranged from 0.8 to 2 s.The unit tests pass, as do the real-kernel tests against that wheel.
Related Tickets & Documents
a29235c). The published kernel 1.5.0 rejects SOCKS URLs; moving the[kernel]dependency to the next kernel release is a separate change.This pull request and its description were written by Isaac.