You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SEA-NodeJS] Rename SEA → kernel across the driver (useSEA → useKernel)
The kernel backend can sit on top of any wire protocol (today SEA / Statement
Execution API, later others), so the driver shouldn't brand its path "SEA". This
renames the driver-layer surface to `kernel`, matching the Python connector's
`use_kernel=True`, while PRESERVING genuine references to the SEA wire protocol
the kernel speaks.
Mechanical, no behavior change:
- Public option `useSEA` → `useKernel`.
- `lib/sea/` → `lib/kernel/`; `Sea*` classes/types → `Kernel*` (KernelBackend,
KernelSessionBackend, KernelOperationBackend, KernelAuth, KernelNativeLoader,
KernelServerInfo, …); `seaCancel`/`seaClose`/`seaFinished`/`seaServerInfoValue`
→ `kernel*`; `SEA_DBMS_*`/`SEA_SERVER_NAME` → `KERNEL_*`.
- `tests/unit/sea/` → `tests/unit/kernel/`, `tests/e2e/sea/` → `tests/e2e/kernel/`
(+ `Sea*`-named test files).
- `native/sea/` → `native/kernel/` — with build:native, prepack, loader require
path, .gitignore / .prettierignore / .npmignore / .gitattributes, and
kernel-e2e.yml all updated. index.d.ts / index.js regenerated from a fresh
build (so the drift-guard still matches).
- Driver-prose comments / binding error messages → "kernel".
- Dropped the dead `'sea'` telemetry backend literal (nothing emits it).
Deliberately preserved: the genuine PROTOCOL references — "Statement Execution
API (SEA)", "SEA REST protocol", "SEA wire", SEA `CreateSession` wire fields —
and the native-packaging regression-guard for the historical garbled
`@databricks/sea-native-*` npm prefix (renaming it would make the guard vacuous).
Built on current main (includes directResults #426). Supersedes #415 (which was
stacked on the now-closed old SEA stack).
Verification: tsc clean; `npm run lint` (eslint lib/** tests/e2e/**) clean;
`prettier --check` clean; renamed kernel unit suite 261 passing;
`git grep useSEA` → 0. `useKernel: true` validated end-to-end against a live
warehouse (SELECT, directResults CREATE+count, binding loads from native/kernel).
Co-authored-by: Isaac
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
# Run when the SEA driver layer, the napi binding contract, SEA
160
+
# Run when the kernel driver layer, the napi binding contract, kernel
161
161
# e2e tests, this workflow, the kernel revision pin, or core deps
162
162
# move.
163
-
if echo "$CHANGED" | grep -qE "^(lib/sea/|native/sea/|tests/e2e/sea/|tests/unit/sea/|\.github/workflows/kernel-e2e\.yml|KERNEL_REV|package\.json|package-lock\.json)"; then
163
+
if echo "$CHANGED" | grep -qE "^(lib/kernel/|native/kernel/|tests/e2e/kernel/|tests/unit/kernel/|\.github/workflows/kernel-e2e\.yml|KERNEL_REV|package\.json|package-lock\.json)"; then
# The committed native/sea/index.d.ts + index.js are the consumer-facing
315
+
# The committed native/kernel/index.d.ts + index.js are the consumer-facing
316
316
# type contract + platform router; they MUST correspond to the pinned
317
317
# kernel. build:native just regenerated them from the KERNEL_REV
318
318
# checkout, so any diff means the committed contract drifted from the
319
319
# pin — fail loudly and tell the author to commit the regenerated files.
320
320
# (The .node binaries are gitignored, so git diff only sees the contract.)
321
321
run: |
322
-
if ! git diff --exit-code -- native/sea/index.d.ts native/sea/index.js; then
323
-
echo "::error::native/sea/index.d.ts / index.js are out of sync with KERNEL_REV ($(tr -d '[:space:]' < KERNEL_REV)). Run 'npm run build:native' against that kernel SHA and commit native/sea/index.*."
322
+
if ! git diff --exit-code -- native/kernel/index.d.ts native/kernel/index.js; then
323
+
echo "::error::native/kernel/index.d.ts / index.js are out of sync with KERNEL_REV ($(tr -d '[:space:]' < KERNEL_REV)). Run 'npm run build:native' against that kernel SHA and commit native/kernel/index.*."
324
324
exit 1
325
325
fi
326
326
echo "Committed binding matches KERNEL_REV."
327
327
328
328
- name: Smoke-check binding loads
329
-
run: node -e "const b=require('./native/sea'); if(typeof b.version!=='function'){throw new Error('napi binding failed to load')} console.log('kernel binding ok:', b.version())"
329
+
run: node -e "const b=require('./native/kernel'); if(typeof b.version!=='function'){throw new Error('napi binding failed to load')} console.log('kernel binding ok:', b.version())"
330
330
331
-
- name: Run SEA e2e tests
331
+
- name: Run kernel e2e tests
332
332
# Run through `nyc` (not bare `mocha`) so the `require: ['ts-node/register']`
333
333
# in nyc.config.js loads the .ts specs via the CommonJS ts-node hook —
334
334
# exactly how main.yml's e2e job runs them. Bare `mocha` has no ts-node
@@ -340,7 +340,7 @@ jobs:
340
340
# index 4 (`mocha --config <file> <glob>`): tests/e2e/.mocharc.js derives
341
341
# `spec` from `process.argv.slice(4)`. We invoke mocha directly (not via
342
342
# `npm run e2e -- <glob>`, whose inner shell mangles `**` to zero files).
0 commit comments