[coverage] Conformance findings: SESSION-018
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 58/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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 tohttps://HTTPS://<host>and the driver dials hostnamehttpsinstead of the workspace- failing test:
test_server_hostname_url_scheme_parsed_case_insensitively(see the coverage PR diff undertests/)
- failing test:
- 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 unreachablehttps://https//<host>/api/2.0/sql/sessions- failing test:
test_server_hostname_url_scheme_parsed_case_insensitively(see the coverage PR diff undertests/)
- failing test:
- 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 tohttps://HTTPS://<host>and the driver dials hostnamehttpsinstead 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
- The behavior was first fixed in a DIFFERENT driver — reference PR: https://github.com/databricks/databricks-sql-go/pull/485 — which seeded the shared language-neutral spec. This issue tracks the same conformance gap in databricks/databricks-sql-python; the reference PR is for cross-referencing the intended behavior, NOT a change to this repo.
- Coverage PR carrying the reproducing xfail test(s): https://github.com/databricks/databricks-driver-test/pull/1654
- Ngôn ngữ chính
- Python
- Star
- 233
- Fork
- 152
- Merge trung bình
- 21 giờ 5 phút
- Pull request đã merge (30 ngày)
- 10
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của databricks/databricks-sql-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Tất cả issue của databricks/databricks-sql-python
Issue tương tự
-
fix: inaccuracy ⚠️
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
uabrc/uabrc.github.io#1255 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
ethereum-optimism/factory#64 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
duckdb/duckdb-python#627 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Add link for tutorial Đang mởdocumentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Qiskit/qiskit-addon-sqd#376 ·