Skip to content

feat(kernel): consume published @databricks/databricks-sql-kernel napi packages (0.2.0)#434

Merged
msrathore-db merged 4 commits into
mainfrom
msrathore/consume-napi-kernel-0.2.0
Jun 11, 2026
Merged

feat(kernel): consume published @databricks/databricks-sql-kernel napi packages (0.2.0)#434
msrathore-db merged 4 commits into
mainfrom
msrathore/consume-napi-kernel-0.2.0

Conversation

@msrathore-db

Copy link
Copy Markdown
Contributor

What

Declares the eight per-platform kernel binary packages as optionalDependencies, pinned to 0.2.0:

  • @databricks/databricks-sql-kernel-{linux-x64-gnu,linux-arm64-gnu,linux-x64-musl,linux-arm64-musl,darwin-x64,darwin-arm64,win32-x64-msvc,win32-arm64-msvc}

Also refreshes native/kernel/README.md to drop the stale "M0 / not yet published" note.

Why

The kernel's per-platform napi packages are now published on npm (umbrella + 8 triples at 0.2.0). With them in optionalDependencies, a released @databricks/sql pulls the matching native binding from npm at install time instead of requiring a local npm run build:native. npm installs only the package matching the consumer's process.platform/process.arch; the others are skipped (that's what optionalDependencies tolerates), so installs on unsupported platforms keep working on the Thrift backend.

The committed native/kernel/index.js router + index.d.ts are unchanged — the driver still owns the type contract and just needs the .node binary, which now arrives via the optional dep.

Testing

Verified locally on darwin-arm64 against the published 0.2.0 binary (binding loads, version()0.2.0) with main's driver code:

SELECT 1 via kernel 0.2.0 (useKernel:true, PAT): [{"one":1}]

KERNEL_REV on main (0d46716) matches the 0.2.0 binding's exports (assertBindingShape passes).

⚠️ Follow-up before merge: regenerate package-lock.json

package-lock.json is not updated in this commit. The lockfile must be regenerated against public npm (the internal npm-proxy.dev.databricks.com does not mirror the @databricks/databricks-sql-kernel* scope yet — separate allowlist request in flight). Run with VPN off:

npm install --registry=https://registry.npmjs.org/
git add package-lock.json && git commit

CI's npm ci will be red until that lands.

This pull request and its description were written by Isaac.

…i packages (0.2.0)

Declare the eight per-platform kernel binary packages as
optionalDependencies pinned to 0.2.0, so a released @databricks/sql
pulls the matching native binding from npm on install instead of
requiring a local 'npm run build:native'. npm resolves only the package
matching the consumer's platform; the rest are skipped (optional), so
installs on unsupported platforms keep working with the Thrift backend.

Refresh native/kernel/README.md to drop the stale 'M0 / not yet
published' note now that all 8 triples are live.

Co-authored-by: Isaac
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
Regenerated against public npm so the eight @databricks/databricks-sql-kernel-*
0.2.0 entries carry registry.npmjs.org resolved URLs + integrity, keeping
npm ci in sync with package.json.

Co-authored-by: Isaac
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
Adds a focused live-warehouse e2e that connects with useKernel:true,
runs SELECT 1, fetches the row, and asserts the value === 1 — the full
DBSQLClient → KernelBackend → napi (npm-installed binding) → warehouse
round-trip. Complements execution-e2e.test.ts, which exercises the
operation lifecycle but does not read rows. Gated on the pecotesting
secrets; skips when absent. Verified passing against a live warehouse
on the published kernel 0.2.0 binary.

Co-authored-by: Isaac
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
@msrathore-db msrathore-db added the kernel-e2e Preview-run the SEA Kernel E2E suite on this PR label Jun 11, 2026
@msrathore-db msrathore-db force-pushed the msrathore/consume-napi-kernel-0.2.0 branch from 6091ef3 to e9fda59 Compare June 11, 2026 07:37
@msrathore-db msrathore-db enabled auto-merge June 11, 2026 07:38
@github-actions github-actions Bot removed the kernel-e2e Preview-run the SEA Kernel E2E suite on this PR label Jun 11, 2026
@github-actions

Copy link
Copy Markdown

Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@vikrantpuppala vikrantpuppala disabled auto-merge June 11, 2026 09:25
@msrathore-db msrathore-db enabled auto-merge June 11, 2026 09:34
@msrathore-db msrathore-db disabled auto-merge June 11, 2026 09:34
@msrathore-db msrathore-db merged commit 96d02ef into main Jun 11, 2026
14 of 19 checks passed
@msrathore-db msrathore-db mentioned this pull request Jun 11, 2026
3 tasks
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.

2 participants