Skip to content

Commit f95e3d4

Browse files
committed
fix(sea): sync package-lock for napi-rs/cli + skip native smoke test until binding ships
CI was red on every job at `npm ci` (EUSAGE: "Missing @napi-rs/cli@2.18.4 from lock file") — package.json added @napi-rs/cli (build:native devDep) and the @databricks/sql-kernel-linux-x64-gnu optional dep, but package-lock.json was never regenerated. Updated the lock (the unpublished optional dep is recorded as optional, so `npm ci` tolerates/skips it). Also: the version smoke test fail-louded when the binding was absent on a linux-x64 CI runner, assuming the optional dep installs there. It doesn't yet — the @databricks/sql-kernel-* packages aren't published and the standard CI doesn't run build:native — so the fail-loud was spurious. Gate it behind SEA_NATIVE_EXPECTED=1 (set once a CI step provisions the binding); default to skip. The e2e smoke test already skips when the binding is absent. Co-authored-by: Isaac Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
1 parent 715a6f4 commit f95e3d4

2 files changed

Lines changed: 42 additions & 6 deletions

File tree

package-lock.json

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/unit/sea/version.test.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@
1515
import { expect } from 'chai';
1616
import { tryGetSeaNative } from '../../../lib/sea/SeaNativeLoader';
1717

18-
// On a CI runner whose triple is supposed to have a published binding
19-
// (M0 = linux-x64-gnu) a missing binding is a hard failure — a silent
20-
// skip there would mask a broken build / packaging regression. On every
21-
// other platform (and on dev machines) the binding is optional, so we
22-
// skip.
18+
// Fail loudly only when the binding is actually expected to be present —
19+
// i.e. a CI step has provisioned it (a published `@databricks/sql-kernel-*`
20+
// optional dep installed, or `npm run build:native` was run) and opts in via
21+
// `SEA_NATIVE_EXPECTED=1`. A missing binding there is a real packaging / build
22+
// regression that a silent skip would mask.
23+
//
24+
// Until those binding packages are published, the standard CI cannot install
25+
// the optional dep and does not build the native binding, so the binding is
26+
// legitimately absent — default to a skip rather than a spurious hard failure.
27+
// (`npm ci` already skips the unpublished optional dep.)
2328
function bindingIsExpected(): boolean {
24-
return process.env.CI === 'true' && process.platform === 'linux' && process.arch === 'x64';
29+
return process.env.SEA_NATIVE_EXPECTED === '1';
2530
}
2631

2732
describe('SEA native binding — smoke test', function smoke() {

0 commit comments

Comments
 (0)