Skip to content

feat(kernel): expose HTTP/2 opt-out - #626

Open
aakash-saravanan-db wants to merge 4 commits into
mainfrom
aakash-saravanan-db/feat/http2
Open

aakash-saravanan-db wants to merge 4 commits into
mainfrom
aakash-saravanan-db/feat/http2

Conversation

@aakash-saravanan-db

Copy link
Copy Markdown
Collaborator

Feature or gap

Direct kernel-owned HTTPS requests negotiate HTTP/2 with HTTP/1.1 fallback. Configured proxies, including environment proxy variables, keep the entire kernel client on HTTP/1.1.

What this PR addresses

Add the kernel-only boolean enableHttp2 connection option and forward explicit false to the native binding. Omission preserves the kernel default.

Dependencies

Requires the native HTTP/2 support in kernel #483. Requires a kernel binding exposing enableHttp2. The driver and matching kernel ship in the coordinated release.

Tests and validation

Validation status: blocked. Matching kernel integration and the full metadata compatibility matrix remain open.

Connection-option and forwarding unit tests pass. Final source-built native transport and live full-result checks pass for omitted, true and false settings. Five-pair connection/query and full 250,000-row result-drain comparisons on DBSQL against Node Thrift meet parity. Full wildcard metadata comparator validation remains incomplete.

This pull request and its description were written by Isaac.

Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@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.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 Medium · 1 Low

One medium and one low concern. The validation and forwarding are correct and tested, but the native declaration was edited by hand while the binding pins stay at 1.4.0, so the option probably does nothing in published builds.

Comment thread native/kernel/index.d.ts
*/
enableGeoSpatialSupport?: boolean
/** Negotiate HTTP/2 over HTTPS by default. False or a configured proxy forces HTTP/1.1. */
enableHttp2?: boolean

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium — The enableHttp2 field was hand-added to the NAPI-generated native/kernel/index.d.ts, but every platform pin in package.json and package-lock.json is still 1.4.0. I couldn't confirm that 1.4.0 supports the field. If it doesn't, NAPI will silently drop it and enableHttp2: false will do nothing. Regenerate the typings from a binding build that has the field, and bump all platform pins together, or hold the PR until that binding is published.

🔀 Found by Claude Opus 5.5 · confirmed by the judge

@aakash-saravanan-db aakash-saravanan-db Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The added enableHttp2 declaration and its documentation match the corresponding kernel binding declaration, and actual matching-native transport checks cover omitted, true and false values. This PR is held for that binding: matching native package integration is an explicit merge/release prerequisite in the description. No release version has been assigned in this change.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at 4fb6fa0: every platform pin is still 1.4.0 (package.json:95-102); keep this open until a binding with enableHttp2 ships and all pins are bumped.

Comment thread CHANGELOG.md Outdated

## Unreleased

- Add kernel-only `enableHttp2`: HTTPS negotiates HTTP/2 with HTTP/1.1 fallback; set `enableHttp2: false` to force HTTP/1.1 for all kernel-owned HTTPS requests. Configured proxies, including environment proxy variables, force HTTP/1.1.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Low — The changelog entry presents enableHttp2 as available. It doesn't name the minimum published kernel binding version, a required follow-up package bump, or the kernel change that adds the field. Add the required kernel version, or a note about the pending bump, and link the kernel PR.

🔀 Found by Claude Opus 5.5 · confirmed by the judge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The entry is under Unreleased. Matching binding integration and kernel #483 are explicit dependencies in the PR description, and this PR remains blocked until those artifacts are available. A minimum published version cannot be named before that coordinated release is assigned.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at 4fb6fa0: CHANGELOG.md:5 has no pending-binding-bump note or kernel #483 link. No version number is needed; just add the note and the link.

Signed-off-by: Aakash Saravanan <aakash.saravanan@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.

🔀 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 Medium · 1 Low

Needs changes: 1 high concern. The forwarding code and its validation look right, but the option needs a published kernel binding that this PR doesn't pin, so the documented opt-out does nothing on shipped installs.

Comment thread CHANGELOG.md

## Unreleased

- Kernel HTTPS traffic negotiates HTTP/2 with HTTP/1.1 fallback. Set `enableHttp2: false` to force HTTP/1.1. Configured proxies also force HTTP/1.1.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium — The changelog claims HTTP/2 negotiation and enableHttp2: false work, but the platform packages are pinned to 1.4.0, which has no such field in this diff. Add the published-package caveat and the kernel change reference, or land the pin bump with the entry.

🔀 Found by Claude Opus 5.5 · confirmed by the judge

Comment thread lib/kernel/KernelAuth.ts
if (typeof options.enableHttp2 !== 'boolean') {
throw new HiveDriverError('kernel backend: `enableHttp2` must be a boolean.');
}
http.enableHttp2 = options.enableHttp2;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High — enableHttp2 is forwarded to the native binding, but every optionalDependency is still pinned to 1.4.0 and this diff doesn't bump them. An older binding drops the unknown field silently, so enableHttp2: false does nothing. Bump all platform pins to a binding that has the field, or add a capability check.

🔀 Found by Claude Opus 5.5 · confirmed by the judge

Comment thread native/kernel/index.d.ts
* to SEA.
*/
enableGeoSpatialSupport?: boolean
/** Negotiate HTTP/2 over HTTPS by default. False or a configured proxy forces HTTP/1.1. */

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Low — The generated native/kernel/index.d.ts was hand-edited, and the diff doesn't touch KERNEL_REV or the pins. CI's check that the committed binding matches KERNEL_REV would likely fail. Regenerate the file from a binding build that exposes enableHttp2, and bump the pin in the same change.

🔀 Found by Claude Opus 5.5 · confirmed by the judge

This branch was successfully deployed

1 active deployment
azure-prod — f3e4ce54 Deployed Nov 19, 2026 by aakash-saravanan-db via e2e-test (22.23.4, 22_23_4) #2131
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant