Repository navigation
feat(napi): bundle SEA kernel parity surface - #101
Merged
Merged
Conversation
This was referenced May 31, 2026
Closed
This was referenced Jun 1, 2026
msrathore-db
force-pushed
the
msrathore/krn-tls-napi
branch
from
June 1, 2026 06:11
b6a7b90 to
7751e9b
Compare
msrathore-db
force-pushed
the
msrathore/krn-tls-napi
branch
from
June 1, 2026 06:17
7751e9b to
5faa309
Compare
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
vikrantpuppala
approved these changes
Jun 2, 2026
# Conflicts: # .github/workflows/napi-checks.yml
Three pyo3 tests asserted behavior that the kernel/bundle intentionally changed; main's CI audit (which fixed the maturin --interpreter bug so pytest now actually runs) surfaced them. - test_pat_with_empty_token: PAT empty-token validation is centralised in the kernel's AuthConfig::pat ctor (every binding rejects identically), which surfaces "PAT auth requires a non-empty access token". Match that message instead of the `access_token` kwarg spelling. - test_list_tables_in_information_schema: the kernel returns JDBC-shaped metadata columns (TABLE_NAME/TABLE_TYPE …) matching Thrift's getTables, not the raw SHOW TABLES shape — assert the JDBC names. - test_list_columns_requires_catalog_kwarg → _catalog_is_optional: catalog is now an optional kwarg (defaults to None = across catalogs); assert omitting it is accepted, bounded by schema+table patterns. Verified live against a warehouse: all three pass; no-network tier (test_auth + test_module) green. Co-authored-by: Isaac Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
open_with_oauth_m2m / open_with_oauth_u2m are #[tokio::test] (current-
thread). OAuth token acquisition does a blocking refresh via
block_on_in_runtime -> block_in_place, which panics on a current-thread
runtime ("can call blocking only when running on the multi-threaded
runtime"). The tests previously passed only because they skip when their
creds are unset; once DATABRICKS_TEST_CLIENT_ID is present in CI the M2M
test runs the real flow and panics.
Pin both to #[tokio::test(flavor = "multi_thread")], matching every other
OAuth test (src/auth/oauth/m2m.rs, tests/oauth_u2m_integration.rs) and the
runtime requirement documented in src/util/runtime.rs. Verified live: the
M2M session test now opens + closes cleanly. Pre-existing latent issue
(the test file is identical to main), not caused by this PR's changes.
Co-authored-by: Isaac
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
main now includes #107 (feat(pyo3): wire OAuth M2M/U2M + TLS/mTLS through Session), which overlaps this branch's auth/TLS work. Conflict resolution: Auth: - pyo3/src/auth.rs: kept #107's version — it's the richer, canonical OAuth surface (PAT + oauth-m2m + oauth-u2m, with Python-API guards for degenerate client_id/redirect_port/callback_timeout). #101's 14-line PAT tweak is superseded. - src/config.rs: kept BOTH (clean union) — #107's mTLS TlsConfig fields (client_cert_pem/client_key_pem) AND #101's AuthConfig::{pat,oauth_m2m, oauth_u2m} validating constructors, which napi depends on (napi/src/database.rs forwards to them). - pyo3/tests/test_auth.py: reverted the empty-PAT assertion to match='access_token' — pyo3 now validates inline (#107) producing 'access_token must not be empty', not the kernel ctor message. TLS: - Kept #107's kernel-side TLS (src/client/http.rs application + config.rs mTLS + tests/v0_tls_e2e.rs) and #101's napi TLS exposure (napi/src/database.rs checkServerCertificate/customCaCert). Complementary. tests/v0_session_e2e.rs: both branches added the same multi_thread fix to the M2M/U2M tests; took #107's wording. Verified after merge: kernel 605 lib tests, napi 41, pyo3 40 live tests, config auth+TLS unit tests; clippy + fmt clean on kernel and napi. Co-authored-by: Isaac
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Single main-based kernel mega PR for the SEA NodeJS parity surface. This intentionally replaces the smaller stacked PRs so agent review can inspect one integrated kernel/napi change.
Current real diff after folding #99, #100, #101, and #93 into one signed commit: about 2953 additions / 121 deletions across 22 files.
Included Changes
submitStatement,AsyncStatement, async result handling, status polling, and async result fetching.Connection/Databasewiring for SEA session creation and statement execution.napi/src/metadata.rsand kernel-sidemetadata_v0support.napi/src/params.rs, including positional and named params plus timestamp, interval, variant, and decimal parsing.statementConf,queryTags,row_limit, and per-statement timeout support.intervalsAsString,complexTypesAsJson, and inline result handling updates.checkServerCertificateandcustomCaCert.executeStatementbehavior.@databricks/sql-kernelplus JFrog cargo proxy setup for napi checks.main, including fix(sea): close orphaned statement when execute_and_read fails #92's orphaned-statement cleanup, so stale duplicate hunks from the old stack are removed.Superseded PRs
This PR now supersedes all remaining kernel stack PRs:
Earlier smaller feature PRs already closed as superseded are also represented here: #75, #76, #84, #94, #95, #96, #97, and #98.
Review Notes
This is intentionally broad and is the only kernel review PR for the SEA parity work. The branch history was squashed to one DCO-signed commit on top of latest
mainto remove stale stack history and avoid duplicate review surfaces.Known live E2E failures in
v0_execute_e2efor VARIANT/geospatial parameter round trips are pre-existing server/test-surface issues and are not fixed in this PR.Testing
Local focused validation after folding the branches:
cargo fmt --all -- --checkcargo check --testscargo test -p databricks-sql-kernel --doccargo check --no-default-features --features tls-rustlscargo clippy --no-default-features --features tls-rustls --all-targets -- -D warningscargo test -p databricks-sql-kernel typed_value_geonapi/:cargo fmt --all -- --checknapi/:cargo clippy --all-targets --locked -- -D warningsnapi/:cargo test --locked(79 tests)CI is rerunning on the single squashed branch.
This pull request and its description were written by Isaac.