Repository navigation
fix(session): remove session conf allowlist - #303
Conversation
There was a problem hiding this comment.
Verdict: 1 Low
Clean, well-scoped change — removes the kernel-side session_conf allowlist and forwards server-bound entries unchanged. Verified no dangling references to the removed filter_session_conf/SESSION_CONF_ALLOWLIST/SESSION_CONF_CASE_SENSITIVE_ALLOWLIST symbols, that docs/spec-v0.md already documents pass-through, and that client-side result-knob stripping (apply_client_result_overrides) is preserved and still tested. One low-severity note on the deliberate loss of the issue-#196 can_cloud_download guard.
| defaults.catalog.as_deref(), | ||
| defaults.schema.as_deref(), | ||
| crate::config::filter_session_conf(config.session_conf.clone()), | ||
| config.session_conf.clone(), |
There was a problem hiding this comment.
🔵 Low — Removing the allowlist also removes the issue-#196 guard that dropped a caller-supplied can_cloud_download session conf. Per the retired code/tests, SEA accepts this key at CreateSession but then rejects it at the first ExecuteStatement with CONFIG_NOT_AVAILABLE, poisoning every subsequent statement on the session. With this pass-through, a caller who sets can_cloud_download (the natural intuition for "disable CloudFetch") now opens a session that appears healthy but fails on first query, instead of getting a benign no-op.
This appears intentional ("validation belongs to the server"), and the CloudFetch-disable knob is correctly the typed ResultConfig path — so this is a deliberate robustness tradeoff, not a correctness bug. Flagging so it's a conscious decision: the kernel no longer shields callers from a known session-breaking key. If the team wants to keep the #196 protection while dropping the broader allowlist, a targeted drop of just can_cloud_download (with a warn) would preserve it. Otherwise consider a CHANGELOG/docs note since this reverses previously-tested behavior.
There was a problem hiding this comment.
seems okay because ResultConfig::cloudfetch_enabled isn't converted to session conf
There was a problem hiding this comment.
Right — the typed ResultConfig::cloudfetch_enabled path doesn't round-trip through session_conf, so that knob is fine. My concern was narrower: a caller who directly sets can_cloud_download in session_conf (the intuitive-but-wrong way to disable CloudFetch) no longer gets the #196 guard, and the current code at line 375 still forwards session_conf verbatim. Since this is a deliberate tradeoff rather than a bug, I'm leaving it as a low-severity note for the record — a CHANGELOG/docs mention (or a targeted can_cloud_download drop with a warn) would preserve the old protection if the team wants it.
vuanhphung
left a comment
There was a problem hiding this comment.
I think there's a stale comment about allowlist-filtered in include/databricks_kernel.h line 319
Signed-off-by: Jay Xiao <jay.xiao@databricks.com>
c01383b to
5073a51
Compare
There was a problem hiding this comment.
Verdict: 1 Low
Clean, well-scoped removal of the kernel-side session_conf allowlist. Client-only result knobs are still consumed and stripped (session.rs:306) before the now-unfiltered map is forwarded (session.rs:375); no dangling references to the removed filter_session_conf/SESSION_CONF_ALLOWLIST symbols remain; docs and wiremock coverage were updated coherently. One low note on doc discoverability for the metric-view conf whose casing behavior subtly changes with this PR.
| | Key | Notes | | ||
| |-----|-------| | ||
| | `spark.sql.thriftserver.metadata.metricview.enabled` | When `"true"`, `SHOW TABLES` returns `METRIC_VIEW` rows and `getColumns` surfaces `measure` columns. Mirrors JDBC `EnableMetricViewMetadata` (default off). | | ||
| for supported SQL parameter names and accepted values. |
There was a problem hiding this comment.
🔵 Low — This doc edit removes the entire table documenting the spark.sql.thriftserver.metadata.metricview.enabled conf and its effect (SHOW TABLES returning METRIC_VIEW rows, getColumns surfacing measure columns). The feature itself is unchanged — the kernel still lists METRIC_VIEW among table types and the server emits those rows only when this conf is set — so the capability now works but is undocumented at the connection-parameter level. Additionally, because the case-insensitive canonicalization is gone, a caller must now supply this key in its exact lowercase-dotted form (Spark conf keys are case-sensitive); any uppercased/mixed-case spelling that previously worked will now be forwarded verbatim and silently ignored server-side. Worth keeping a short note (or a link) so consumers know the exact key and that casing now matters. Not a correctness blocker — the removal is intentional per the PR scope.
Summary
Testing