Commit c4fc625
committed
[SEA-NodeJS] Pin the kernel by SHA (KERNEL_REV) + kernel-e2e CI
The SEA napi binding is built from the kernel's private Rust source, not a
published/versioned artifact, and the actual `.node` binary is gitignored —
so nothing in the repo records *which* kernel revision the committed
`native/sea/index.d.ts` / `index.js` correspond to, and the standard e2e job
never builds or exercises the binding (its SEA suite skips).
Mirror the databricks-sql-python connector's mechanism:
- `KERNEL_REV` — a single 40-char kernel commit SHA at the repo root: the one
source of truth for the kernel version the driver is built against. Bumping it
is the only way to pick up a new kernel, so a driver change and its kernel
dependency always land together in one bisectable diff. Pinned to current
kernel main (b4d8822).
- Refresh the committed `native/sea/index.d.ts` / `index.js` to match that SHA.
main's committed binding had drifted to the pre-#101 surface (missing
submitStatement / AsyncStatement / params / TLS / metadata methods); this
regenerates it from the pinned kernel so the committed type contract is
current and consistent with the pin. Verified main's SEA e2e suite
(execution / results / interval) passes against the regenerated binding.
- `.github/workflows/kernel-e2e.yml` — reads `KERNEL_REV`, checks the kernel out
at that SHA via a GitHub App token, builds the napi binding
(`npm run build:native` against the pinned checkout, cargo via the JFrog
proxy), asserts the committed binding still matches the pin (drift-guard:
`git diff --exit-code native/sea/index.*`), and runs the SEA e2e suite against
the dogfood warehouse. Gate semantics mirror the python workflow:
synthetic-success on plain PRs, real run in the merge queue (or via the
`kernel-e2e` label), change-detection to auto-pass when no SEA-relevant files
moved.
The test step invokes mocha directly (`npx mocha --config … "tests/e2e/sea/**"`)
rather than `npm run e2e -- <glob>`: routing a glob through the npm-script's
inner shell mangles `**` and silently resolves to zero files (a false pass).
- `native/sea/README.md` — documents the pin and how to match it locally.
Requires one-time repo-admin setup (GitHub App allowlist for the kernel repo,
the `kernel-e2e` label, warehouse secrets in azure-prod) — see the workflow
header. Does not change the published-binary story (the
`@databricks/sql-kernel-*` optional packages remain a separate, later step).
Co-authored-by: Isaac
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>1 parent 2753ad3 commit c4fc625
3 files changed
Lines changed: 432 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
283 | 297 | | |
284 | 298 | | |
285 | 299 | | |
286 | 300 | | |
287 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
288 | 306 | | |
289 | 307 | | |
290 | 308 | | |
| |||
0 commit comments