Skip to content

docs: correct kernel proxy (SOCKS) and session-conf allowlist caveats - #446

Open
eric-wang-1990 wants to merge 3 commits into
mainfrom
docs/connection-params-fixes
Open

docs: correct kernel proxy (SOCKS) and session-conf allowlist caveats#446
eric-wang-1990 wants to merge 3 commits into
mainfrom
docs/connection-params-fixes

Conversation

@eric-wang-1990

@eric-wang-1990 eric-wang-1990 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

What

Follow-up to #445. Three behaviors were overstated for the kernel path in CONNECTION_PARAMETERS.md; this corrects them.

  1. Session parameters. The blanket "passed through as a session parameter on both backends" claim is inaccurate for the kernel path: the kernel matches conf keys (case-insensitively) against an allowlist, dropping non-allowlisted keys with a warning and hard-rejecting a few. Thrift forwards the conf map freely. Updated the passthrough note to spell out the Thrift-vs-kernel difference and changed the WithSessionParams Kernel cell from ✅ to ⚠️. Tracked in PECOBLR-4153.
  2. Proxy. The kernel path accepts http(s) proxies only — a socks* proxy URL that the Thrift path honors is rejected at connect on the kernel path. Added that caveat to the Proxy section. Tracked in PECOBLR-4152.
  3. enableMetricViewMetadata. The driver folds spark.sql.thriftserver.metadata.metricview.enabled=true into SessionConf on both paths (kernel_config.go), but the kernel currently hard-rejects that conf (HTTP 400 INVALID_CONF_VALUE), so it does not take effect on the kernel path today. Flipped the Kernel cell ✅ → ⚠️ with a caveat. Fix tracked in PECOBLR-4142 / PECOBLR-4153.

All three surfaced while cross-referencing the doc against the kernel-parity Jira items under PECOBLR-3727.

Note

Opened as a new PR because #445 was already merged and its branch deleted, so a follow-up commit to that PR wasn't possible.

This pull request and its description were written by Isaac.

CONNECTION_PARAMETERS.md overstated two behaviors on the kernel path:

- Session params: the blanket "passed through on both backends" claim is
  wrong for kernel, which matches conf keys against an allowlist (dropping
  non-allowlisted keys, hard-rejecting a few). Note the Thrift-vs-kernel
  difference and mark WithSessionParams inert (⚠️) on kernel. (PECOBLR-4153)
- Proxy: the kernel path accepts http(s) proxies only; a socks* URL honored
  on Thrift is rejected at connect on kernel. (PECOBLR-4152)

Co-authored-by: Isaac
Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
Copilot AI lite review requested due to automatic review settings August 18, 2026 02:16

@peco-review-bot peco-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues identified by the review bot.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines the connection-parameter reference doc to more accurately describe behavioral differences between the Thrift and SEA/kernel backends, specifically around session-conf passthrough and proxy handling.

Changes:

  • Clarifies that Thrift forwards session confs freely, while kernel applies an allowlist (dropping or rejecting some keys).
  • Updates the WithSessionParams row to reflect the kernel path’s allowlist-gated behavior.
  • Adds a kernel-specific proxy caveat noting that SOCKS proxy URLs are rejected on kernel.
Suppressed comments (1)

CONNECTION_PARAMETERS.md:72

  • This row still says "Arbitrary session confs", but the kernel behavior described above is not arbitrary (it is allowlist-gated, with some keys dropped/rejected). Tweaking the wording here would avoid implying full/unchecked support on kernel.
| *(session param)* | `WithSessionParams` | ✅ | ⚠️ | | Arbitrary session confs (e.g. `ansi_mode`, `STATEMENT_TIMEOUT`, `QUERY_TAGS`). Allowlisted confs are honored on both; on kernel a non-allowlisted conf is dropped/rejected (see the note above; PECOBLR-4153). |

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread CONNECTION_PARAMETERS.md
Comment on lines 27 to +32
Any parameter not listed below (e.g. `ansi_mode`) is passed through as a
**session parameter** on both backends.
**session parameter**. On the **Thrift** path the session-conf map is forwarded freely.
On the **kernel** path conf keys are matched (case-insensitively) against an allowlist —
non-allowlisted keys are dropped with a warning, and a few are hard-rejected — so a conf
that takes effect on Thrift may silently be ignored on kernel. Broadening the kernel
allowlist is tracked in PECOBLR-4153.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broadened the ⚠️ legend entry to describe both fully-inert and partially/conditionally-honored cases, resolving the inconsistency between the legend and the updated session-parameter notes. Because the legend is shared, this covers both the line 32 note and the line 72 (WithSessionParams) row in one edit. No Go source touched, so no rebuild/tests required.

Pushed 2a283ba.

The driver folds spark.sql.thriftserver.metadata.metricview.enabled into
SessionConf on both paths (kernel_config.go), but the kernel hard-rejects
that conf (HTTP 400 INVALID_CONF_VALUE), so it does not take effect on the
kernel path today. Flip the Kernel cell ✅ -> ⚠️ with a caveat. Fix tracked
in PECOBLR-4142 / PECOBLR-4153.

Co-authored-by: Isaac
Signed-off-by: eric-wang-1990 <e.wang@databricks.com>

@peco-review-bot peco-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues identified by the review bot.

@eric-wang-1990 eric-wang-1990 added the engineer-bot Maintainer-only: triggers the autonomous engineer-bot (bug-fix author on issues; follow-up on PRs) label Aug 18, 2026
Addresses:
  - #3800438771 at CONNECTION_PARAMETERS.md:32

Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>

@peco-review-bot peco-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues identified by the review bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted engineer-bot Maintainer-only: triggers the autonomous engineer-bot (bug-fix author on issues; follow-up on PRs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants