Skip to content

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

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

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

Conversation

@aakash-saravanan-db

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

Copy link
Copy Markdown
Collaborator

Feature or gap

Expose HTTP/2 negotiation control for kernel connections.

What this PR addresses

Add the boolean enable_http2 connection option. Omission preserves the native default; False forces HTTP/1.1. An explicit value requires a supporting installed Session constructor and raises NotSupportedError before construction when unsupported. Document the option in the connection-parameter table.

Dependencies

Requires kernel #483. Before merging, update the kernel requirement and lockfile to the release providing Session(enable_http2=...); the current ^1.4.0 floor remains unchanged pending that release.

Tests and validation

Focused tests cover omitted/true/false forwarding, invalid types and a fixed-signature older Session. Compatibility and large-result measurements used earlier local builds. Published-artifact and scheduled verification remain release prerequisites.

This pull request and its description were written by Isaac.

@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 Terra), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 High · 2 Low

Mostly good, with 1 medium concern. Leaving enable_http2 unset keeps working on older wheels, but setting it explicitly on a wheel that lacks the option fails with a vague error instead of a clear NotSupportedError.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Terra added findings it doesn't mention — see the findings below.

Comment thread tests/unit/test_kernel_client.py Resolved

@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 Terra), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 High · 1 Medium

Mostly good, with 1 medium concern: an explicit enable_http2 reaches older kernel wheels without the capability check that geospatial uses. Validation and forwarding look correct. Nit: the new README paragraph sits between the install heading and its install line.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Terra added findings it doesn't mention — see the findings below.

Other findings

  • 🟡 Medium — The new tests only capture kwargs in a fake Session, so they cannot detect a native transport that ignores the flag or incorrectly negotiates HTTP/2 through a proxy. Add a real-kernel regression that verifies negotiated protocols for omitted, true and false settings, including proxy fallback. (Found by GPT-6.1 Terra · the judge couldn't confirm it)

@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 Terra), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 High · 1 Medium

The forwarding and validation look correct and are tested, with one medium concern: an explicit enable_http2 is not gated for older kernel wheels.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Terra added findings it doesn't mention — see the findings below.

Other findings

  • 🟡 Medium — The new test only captures kwargs in a permissive fake, so CI cannot detect a missing native argument or verify HTTP/2 negotiation, fallback, and proxy opt-out. Add a regression using the matching real kernel that exercises the settings and checks the negotiated transport. (Found by GPT-6.1 Terra · the judge couldn't confirm it)

@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 Terra), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 High · 1 Medium · 1 Low

Mostly fine, with 1 medium concern: an explicit enable_http2 isn't checked against the installed kernel Session signature, so older wheels fail with an unclear error. The plumbing and the bool validation are correct and tested.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Terra added findings it doesn't mention — see the findings below.

Other findings

  • 🟡 Medium — The new tests only capture kwargs in a fake Session, so the maintained suite never verifies that the real kernel negotiates HTTP/2 by default or honors the HTTP/1.1 opt-out. Add an in-repo real-kernel regression that observes the negotiated protocols for both settings. (Found by GPT-6.1 Terra · the judge couldn't confirm it)

Comment thread src/databricks/sql/client.py Resolved
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

Mostly good, with 1 medium concern. Forwarding and the bool check are correct, but an explicit enable_http2 isn't checked against what the installed kernel Session accepts, unlike the existing geospatial option.

Comment thread tests/unit/test_kernel_client.py Resolved
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 Low

Looks good, with 1 low concern. The option is checked for type before session construction, gated through _kernel_session_accepts_kwarg (which fails closed), forwarded only when set, and tested at both the session and client layers.

Comment thread CHANGELOG.md
# Release History

# Unreleased
- Kernel HTTPS traffic negotiates HTTP/2 with HTTP/1.1 fallback. Set `enable_http2=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.

🔵 Low — The CHANGELOG entry says kernel HTTPS negotiates HTTP/2 and that enable_http2=False forces HTTP/1.1. The floor is still ^1.4.0, and the code raises NotSupportedError when the installed wheel lacks the kwarg, so the entry is only true with a newer wheel. Name the required kernel version in the entry, or raise the pyproject floor once that wheel ships.

🔀 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 unsupported-wheel error is now explicit, but the actual kernel requirement and lockfile still need to move to the release providing the option before this PR merges. The changelog will ship with that pin update; this release prerequisite remains open.

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 d517411: CHANGELOG.md:4 doesn't name a kernel version, and the kernel floor and lockfile haven't been raised.

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 Low

Looks good: 1 low concern. The HTTP/2 helper correctly rejects non-bool values and checks Session support before construction, and the tests cover omitted, True, False, a non-bool value and an older fixed-signature Session. Nit: the CONNECTION_PARAMETERS.md list of kernel-only options leaves out enable_http2.

Comment thread CHANGELOG.md
# Release History

# Unreleased
- Kernel HTTPS traffic negotiates HTTP/2 with HTTP/1.1 fallback. Set `enable_http2=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.

🔵 Low — The kernel floor is still ^1.4.0, so older wheels may not negotiate HTTP/2 or force HTTP/1.1 behind a proxy as the CHANGELOG and README claim. Explicit enable_http2 already raises NotSupportedError on those wheels. Raise the floor and lockfile to the release that supports enable_http2, or word the notes as depending on that kernel version.

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

Duplicate of #1070 (comment). This PR will merge only with the kernel requirement and lockfile raised to the release providing kernel #483. The installed-wheel capability check handles explicit values in the meantime; the release floor remains a merge prerequisite.

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 6bc721f: the kernel floor and lockfile still allow wheels older than kernel #483, so CHANGELOG.md:4 overstates support.

This branch was previously deployed

1 inactive deployment
azure-prod — 6bc721fe Deployed Nov 20, 2026 by peco-review-bot[bot] via followup #2576
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