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) (#428)
Rename SEA → kernel across the driver (useSEA → useKernel)
The kernel backend is not restricted to the SEA wire protocol, so the
"SEA" branding on the driver-layer code is misleading. Rename the
driver-side surface to "kernel":
- `lib/sea/Sea*.ts` → `lib/kernel/Kernel*.ts` (backend, session/operation
backends, auth, native loader, results provider, error mapping, etc.)
- `native/sea/` → `native/kernel/`; `tests/{unit,e2e}/sea/` → `.../kernel/`
- public option `useSEA` → `useKernel`; internal `use_sea` → `use_kernel`;
telemetry backend tag `'sea'` → `'kernel'`
- config/CI: package.json build:native + prepack paths, .gitignore,
.npmignore, .prettierignore, .gitattributes, kernel-e2e.yml
Genuine SEA *protocol* references are intentionally preserved (SEA wire
protocol, SEA `row_limit`/`wait_timeout`, "Statement Execution API (SEA)"),
since SEA remains one transport the kernel can sit on.
Bump KERNEL_REV to the current kernel main (b676275); the regenerated
native/kernel/index.{d.ts,js} are byte-identical to the committed
contract, so the kernel-e2e drift-guard stays green.
Verified: build-surface tsc clean, eslint clean, prettier clean, kernel
unit suite green, and a live warehouse run through `useKernel:true`
(SELECT, named-param binding, CREATE/INSERT/SELECT/DROP, async+cancel,
error mapping) all pass.
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