[coverage] Conformance findings: SESSION-018

オープン
#950 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
api, backend

調査の方向性

Start by locating the Python session path and its thrift_backend hostname handling, then compare it with the named test_server_hostname_url_scheme_parsed_case_insensitively in the coverage PR. Verify the existing lower-case behavior and reproduce the upper-case and mixed-case scheme cases. Done means explicit schemes are handled case-insensitively, while a prefix without the ':' delimiter preserves the full hostname in the error.

索引モデルが issue の本文から書いたものです。

説明

Summary

Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-python. Each finding is committed as an expected-failure (xfail) test in the coverage PR — the test asserts the CORRECT (post-fix) behavior and stays red until THIS driver (databricks/databricks-sql-python) is fixed, then flips green as a tripwire.

Findings

  • SESSION-018 [thrift]: An explicit server_hostname URL scheme is matched case-sensitively: HTTPS://<host> is not recognized/stripped, so thrift_backend re-prefixes to https://HTTPS://<host> and the driver dials hostname https instead of the workspace
    • failing test: test_server_hostname_url_scheme_parsed_case_insensitively (see the coverage PR diff under tests/)
  • SESSION-018 [sea]: The Rust kernel's config.rs::normalise_host matches the scheme with lowercase-only starts_with("https://"), so HTTPS://<host> is treated as scheme-less and re-prefixed into the unreachable https://https//<host>/api/2.0/sql/sessions
    • failing test: test_server_hostname_url_scheme_parsed_case_insensitively (see the coverage PR diff under tests/)
  • SESSION-018: An explicit server_hostname URL scheme is matched case-sensitively: HTTPS://<host> / HtTpS://<host> are not recognized or stripped, so thrift_backend re-prefixes to https://HTTPS://<host> and the driver dials hostname https instead of the workspace (RFC 3986 §3.1 requires case-insensitive schemes; the connector's own url_utils.normalize_host_with_protocol already does this but the session path bypasses it)

Reproduce & Expected

SESSION-018 — Validates how the driver parses an explicit URL scheme on its server-hostname input.

Reproduce:

SELECT 1 AS test_value
SELECT 1 AS test_value
SELECT 1 AS test_value

Expected (per the shared spec):

  • completes without an exception
  • result has exactly 1 row(s)
  • completes without an exception
  • result has exactly 1 row(s)
  • completes without an exception
  • result has exactly 1 row(s)
  • full assertion contract:
result:
- label: lower_case_scheme
  no_exception: true
  description: "APPLICABILITY GATE, not the behavior under test. If this phase fails,\
    \ the\ndriver's host input does not accept an explicit URL scheme at all \u2014\
    \ report\na capability skip citing that absent capability, NOT a driver bug, and\
    \ do\nnot run the case-folding phases.\n"
- label: lower_case_scheme
  row_count: 1
- label: upper_case_scheme
  no_exception: true
  description: 'The upper-case scheme was recognized and stripped. A driver that matched
    the

    scheme case-sensitively would carry `HTTPS://` into the hostname and fail to

    reach the workspace.

    '
- label: upper_case_scheme
  row_count: 1
- label: mixed_case_scheme
  no_exception: true
- label: mixed_case_scheme
  row_count: 1
- label: prefix_without_delimiter
  error:
    contains:
    - httpbin.invalid
  description: 'The failure names the FULL, unmodified hostname. A driver that treated
    the

    leading `http` as a scheme without requiring the `:` delimiter would report

    the mangled `bin.invalid` instead, so the full string would be absent.

    '

Context

主要言語
Python
スター
233
フォーク
152
平均マージ
21時間 5分
マージ済み PR(30日)
10

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

databricks/databricks-sql-python のほかの issue

databricks/databricks-sql-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。