Skip to content

fix: accept case-insensitive HTTPS schemes in Thrift connections - #953

Open
Shubham-Padkonde wants to merge 2 commits into
databricks:mainfrom
Shubham-Padkonde:fix/thrift-case-insensitive-url-scheme
Open

Shubham-Padkonde wants to merge 2 commits into
databricks:mainfrom
Shubham-Padkonde:fix/thrift-case-insensitive-url-scheme

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

What type of PR is this?

  • Bug Fix

Description

An explicit HTTPS:// or mixed-case HtTpS:// prefix in server_hostname is currently prefixed again with https://. The Thrift transport then parses https as the hostname instead of the workspace hostname.

Check the HTTPS prefix case-insensitively while preserving the original URI. Added transport-level regression coverage for uppercase and mixed-case schemes, with lowercase and scheme-less controls, checking the resulting hostname, port, and path.

This addresses the Thrift backend portion of #950. The separately reported Rust kernel behavior is outside this change.

How is this tested?

  • Unit tests
  • E2E Tests

Windows / Python 3.13:

  • Uppercase and mixed-case regression subcases fail on the original implementation; the lowercase and scheme-less controls pass.
  • python -m pytest tests/unit/test_thrift_backend.py -q: 71 passed, 87 subtests passed.
  • python -m pytest tests/unit -m "not realkernel" -q: 1,018 passed, 5 skipped, 1 deselected, 359 subtests passed (11 warnings).
  • Black checks on both changed files and git diff --check pass.

No live Databricks workspace or optional Rust kernel tests were run.

Related Tickets & Documents

Related to #950 (Thrift portion).

Prepared with Codex assistance. The contributor personally reviewed and signed off the commit.

Signed-off-by: Shubham Padkonde <shubhampadkonde12@gmail.com>
Copilot AI lite review requested due to automatic review settings September 22, 2026 08:13

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.

@vuanhphung vuanhphung added engineer-bot Maintainer-applied gate: triggers engineer-bot (bug-fix on issue / take-over on PR). and removed engineer-bot Maintainer-applied gate: triggers engineer-bot (bug-fix on issue / take-over on PR). labels Sep 30, 2026
host=server_hostname.rstrip("/"), port=port, path=http_path.lstrip("/")
)
if not uri.startswith("https://"):
if not uri.lower().startswith("https://"):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we reuse the existing normalize_host_with_protocol helper in common/url_utils.py?

Signed-off-by: Shubham Padkonde <shubhampadkonde12@gmail.com>

This branch has not been deployed

No deployments
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.

3 participants