Skip to content

docs: add connection parameter reference (Thrift vs SEA/Kernel) - #457

Merged
eric-wang-1990 merged 13 commits into
mainfrom
docs/connection-parameters
Aug 18, 2026
Merged

docs: add connection parameter reference (Thrift vs SEA/Kernel)#457
eric-wang-1990 merged 13 commits into
mainfrom
docs/connection-parameters

Conversation

@eric-wang-1990

Copy link
Copy Markdown
Contributor

What

Adds docs/connection-parameters.md — a single reference listing every public connection / session / per-statement parameter the Node.js connector accepts, and whether each is honored on the Thrift backend (default), the SEA / Kernel backend (useKernel: true), or both.

The goal is to make protocol support gaps explicit: a parameter honored on one backend but ignored or rejected on the other is called out in a Gap column.

Format

Modeled on the databricks-sql-kernel connection-parameters reference. Grouped by concern: connection identity · authentication · HTTP/proxy/retries · TLS/SSL · results & type rendering · session defaults · telemetry · per-statement options. Each row has a ✅ / ❌ / ⚠️ / — verdict per backend plus a Gap note.

Sources of truth

  • Public option shape ← lib/contracts/IDBSQLClient.ts
  • Internal / kernel-only flags ← lib/contracts/InternalConnectionOptions.ts
  • Thrift wiring ← lib/DBSQLClient.ts, lib/thrift-backend/ThriftBackend.ts, lib/connection/connections/HttpConnection.ts
  • Kernel wiring ← lib/kernel/KernelAuth.ts, lib/kernel/KernelBackend.ts, lib/kernel/KernelSessionBackend.ts

Notable gaps documented

Thrift-only (missing/ignored on Kernel): enableMetricViewMetadata auto-injection; auth types custom / token-provider / external-token / static-token + token federation; Azure-direct OAuth; custom OAuth persistence; custom U2M oauthClientId; SOCKS proxies; per-statement useCloudFetch / useLZ4Compression / stagingAllowedLocalPath.

Kernel-only (no Thrift public equivalent): maxConnections; all TLS controls (checkServerCertificate, checkServerCertificateHostname, customCaCert, clientCertPem, clientKeyPem).

TLS caveat surfaced: the Thrift connect() path exposes no public TLS options and hardcodes rejectUnauthorized: false (HttpConnection.ts); the internal ca/cert/key fields are never populated from a public option. TLS customization is therefore kernel-only in practice.

All kernel-path behavior reflects the M0 stub (useKernel is internal/unstable) and is noted as subject to change.

Docs-only change — no code touched.

This pull request and its description were written by Isaac.

Copilot AI review requested due to automatic review settings July 23, 2026 02:17

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@github-actions

Copy link
Copy Markdown

Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@msrathore-db msrathore-db left a comment

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.

Thanks!

@eric-wang-1990
eric-wang-1990 marked this pull request as draft July 24, 2026 07:07
@eric-wang-1990 eric-wang-1990 added the integration-test Trigger the cross-repo driver-test Node.js integration suite on this PR label Jul 24, 2026
@github-actions

Copy link
Copy Markdown

Node.js integration tests triggered. View workflow run.

@eric-wang-1990
eric-wang-1990 marked this pull request as ready for review July 28, 2026 05:31
@github-actions github-actions Bot removed the integration-test Trigger the cross-repo driver-test Node.js integration suite on this PR label Jul 28, 2026
@github-actions

Copy link
Copy Markdown

Integration test approval reset.

New commits were pushed to this PR. The integration-test label has been automatically removed for security.

A maintainer must re-review the changes and re-add the label to trigger tests again.

Latest commit: adcb617

@github-actions

Copy link
Copy Markdown

Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

Documents every public ConnectionOptions / OpenSessionRequest / per-statement
parameter and whether it is honored on the Thrift backend, the SEA/Kernel
backend (useKernel), or both — making protocol support gaps explicit.

Mirrors the databricks-sql-kernel connection-parameters reference format.

Co-authored-by: Isaac
Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
Relocate docs/connection-parameters.md → CONNECTION_PARAMETERS.md at the repo
root and add a README "Configuration" section linking to it, mirroring the
existing Telemetry section's summary+link pattern.

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.

Verdict: 1 Nit

Looks good — docs-only change and the load-bearing Thrift claims verify against source (getConnectionOptions exposes no public TLS fields, HttpConnection.createHttpsAgent hardcodes rejectUnauthorized: false, enableMetricViewMetadata auto-injects the conf in openSession, and the OAuth flow/oauthClientId behavior matches createAuthProvider). Only a minor nit: the PR description calls the file docs/connection-parameters.md but it lands as CONNECTION_PARAMETERS.md at repo root.

Other findings

  • ⚪ Nit — The PR description repeatedly refers to the file as docs/connection-parameters.md, but the diff adds CONNECTION_PARAMETERS.md at the repository root (and README links to CONNECTION_PARAMETERS.md). No code impact — just a description/filename mismatch worth reconciling so future readers aren't sent to a nonexistent docs/ path. Consider either moving the file under docs/ (to match the description and the databricks-sql-kernel layout it models) or updating the description.

@github-actions

Copy link
Copy Markdown

Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@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.

Comment thread CONNECTION_PARAMETERS.md Outdated

| Option | Type | Thrift | Kernel | Default Value | Note |
| ---------------------------------------------------------------------------- | -------------------- | :------: | :------: | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `authType: 'access-token'` + `token` (PAT) | `token: string` | ✅ | ✅ | `authType` ⇒ `'access-token'` | Default auth mode when `authType` is omitted. |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is weird, the option name is authType. If it only allow several possible values you should put in the Note Column

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.

Made the docs-only edit: the access-token row's Note column now enumerates the allowed authType values ('access-token', 'databricks-oauth', 'custom', 'token-provider', 'external-token', 'static-token'), sourced from the union in lib/contracts/IDBSQLClient.ts. This directly answers the reviewer's request to call out that authType only accepts a fixed set of values.

Pushed a2282f5.

peco-engineer-bot Bot added a commit that referenced this pull request Aug 17, 2026
Addresses:
  - #3799315347 at CONNECTION_PARAMETERS.md:60

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

Copy link
Copy Markdown

Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@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 and others added 6 commits August 17, 2026 16:41
Signed-off-by: eric-wang-1990 <115501094+eric-wang-1990@users.noreply.github.com>
Addresses:
  - #3799169490 at CONNECTION_PARAMETERS.md:88

Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
…ernel/Default/Note

Add `Type` and `Default Value` columns to every parameter table and rename the
`Gap` column to `Note`. Types come from the public `ConnectionOptions` /
`ExecuteStatementOptions` shapes (`IDBSQLClient.ts`, `IDBSQLSession.ts`);
defaults come from `DBSQLClientDefaults` (`DBSQLClient.ts`) and
`DEFAULT_TELEMETRY_CONFIG` (`telemetry/types.ts`). The telemetry section's prose
"Aspect" table is replaced with a full per-option table (one row per
`telemetry*` knob with its default), and the events caveat is kept as a note.

Formatted with `prettier --write` so `prettier . --check` passes (the file
previously failed the check).

Co-authored-by: Isaac
Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
The `runAsync` row said "not threaded on the kernel path", but
`IDBSQLSession.ts` documents the reverse: on Thrift `runAsync` is a no-op
(the path always submits async and polls; the option is not read), while the
kernel reads it to select sync direct-results (default) vs. submit-and-poll.
Flip the verdicts (Thrift ⚠️, kernel ✅) and rewrite the note to match.

Co-authored-by: Isaac
Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
Addresses:
  - #3799315347 at CONNECTION_PARAMETERS.md:60

Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
Per review feedback (PR #457 discussion r3799323450): collapse the seven
per-authType rows into two — one for the modes both backends accept
(`access-token`, `databricks-oauth`) and one for the Thrift-only modes
(`custom`, `token-provider`, `external-token`, `static-token`). OAuth
sub-option rows are unchanged.

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.

Verdict: 1 Medium

Docs-only PR adding a connection-parameter reference; the accompanying comment edits in KernelAuth.ts/KernelBackend.ts accurately match the code (flow selection now keys off oauthClientSecret, mirroring Thrift). One medium inaccuracy: the customHeaders row marks Thrift ✅ but the option is not applied to the primary Thrift transport. Nit: the PR description says the file is docs/connection-parameters.md while it's actually created as CONNECTION_PARAMETERS.md at repo root (the README link is correct, so no functional issue).

Comment thread CONNECTION_PARAMETERS.md Outdated
Addresses:
  - #3799637110 at CONNECTION_PARAMETERS.md:76

Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
The previous commit edited the customHeaders row without re-aligning the
table; prettier requires the column padding to match the widest cell. No
content change — realignment only. Fixes the lint / "Check code style" job.

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.

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

Labels

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.

3 participants