Skip to content

Commit d99a3df

Browse files
committed
ci(kernel-rc-cross-os): force-install kernel binary on Node 16 (npm skips it via engines>=18)
CI proved npm omits the kernel optionalDependencies on Node 16 because they declare engines>=18, so the binary was never installed (Cannot find module @databricks/databricks-sql-kernel-*). Direct-install the matching triple (engines only warns on a direct install) before lowering the loader floor — demonstrating the FULL proposed change (engines + floor) needed for Node 16. Co-authored-by: Isaac
1 parent a0128c9 commit d99a3df

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

.github/workflows/kernel-rc-cross-os.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,13 @@ jobs:
4848
matrix:
4949
include:
5050
# Node 16 — validate the proposed lowered floor (kernel) + Thrift.
51-
- { label: linux-x64-gnu, os: ubuntu-latest, node: 16 }
52-
- { label: darwin-x64, os: macos-13, node: 16 }
53-
- { label: darwin-arm64, os: macos-latest, node: 16 }
54-
- { label: win32-x64-msvc, os: windows-latest, node: 16 }
51+
# The kernel packages declare engines>=18, so npm SKIPS them as
52+
# optional deps on Node 16; we force-install the matching triple
53+
# (a direct install only warns on engines) then lower the loader floor.
54+
- { label: linux-x64-gnu, os: ubuntu-latest, node: 16, triple: linux-x64-gnu }
55+
- { label: darwin-x64, os: macos-13, node: 16, triple: darwin-x64 }
56+
- { label: darwin-arm64, os: macos-latest, node: 16, triple: darwin-arm64 }
57+
- { label: win32-x64-msvc, os: windows-latest, node: 16, triple: win32-x64-msvc }
5558
# 18/20/22 — real published RC (floor >=18), kernel as shipped.
5659
- { label: linux-x64-gnu, os: ubuntu-latest, node: 18 }
5760
- { label: linux-x64-gnu, os: ubuntu-latest, node: 20 }
@@ -71,11 +74,13 @@ jobs:
7174
run: |
7275
npm install --no-audit --no-fund
7376
npm install --no-audit --no-fund "@databricks/sql@${{ env.RC_VERSION }}"
77+
- name: '[node16] Force-install kernel binary (npm skips it via engines>=18) + lower floor'
78+
if: ${{ matrix.node == 16 }}
79+
run: |
80+
npm install --no-save --no-audit --no-fund "@databricks/databricks-sql-kernel-${{ matrix.triple }}@0.2.0"
81+
node -e "const fs=require('fs');const f='node_modules/@databricks/sql/dist/kernel/KernelNativeLoader.js';const s=fs.readFileSync(f,'utf8');const o=s.replace('MIN_NODE_MAJOR = 18','MIN_NODE_MAJOR = 16');if(o===s)throw new Error('floor marker not found');fs.writeFileSync(f,o);console.log('kernel floor lowered 18->16');"
7482
- name: Verify kernel native binary loads
7583
run: node -e "console.log('kernel napi', require('@databricks/sql/native/kernel').version())"
76-
- name: '[node16] Lower kernel floor 18->16 (validate proposed change)'
77-
if: ${{ matrix.node == 16 }}
78-
run: node -e "const fs=require('fs');const f='node_modules/@databricks/sql/dist/kernel/KernelNativeLoader.js';const s=fs.readFileSync(f,'utf8');const o=s.replace('MIN_NODE_MAJOR = 18','MIN_NODE_MAJOR = 16');if(o===s)throw new Error('floor marker not found');fs.writeFileSync(f,o);console.log('kernel floor lowered 18->16');"
7984
- name: Run full bug-bash suite (KERNEL mode)
8085
run: node scripts/run-all.js
8186
- name: '[node16] Run full bug-bash suite (THRIFT mode)'
@@ -112,6 +117,6 @@ jobs:
112117
sh -c "node -e 'console.log(process.version, process.platform, process.arch)' && \
113118
npm install --no-audit --no-fund && \
114119
npm install --no-audit --no-fund '@databricks/sql@${{ env.RC_VERSION }}' && \
115-
if [ -n \"\$LOWER16\" ]; then node -e \"const fs=require('fs');const f='node_modules/@databricks/sql/dist/kernel/KernelNativeLoader.js';fs.writeFileSync(f,fs.readFileSync(f,'utf8').replace('MIN_NODE_MAJOR = 18','MIN_NODE_MAJOR = 16'));console.log('floor lowered 18->16');\"; fi && \
120+
if [ -n \"\$LOWER16\" ]; then npm install --no-save --no-audit --no-fund '@databricks/databricks-sql-kernel-linux-x64-musl@0.2.0' && node -e \"const fs=require('fs');const f='node_modules/@databricks/sql/dist/kernel/KernelNativeLoader.js';fs.writeFileSync(f,fs.readFileSync(f,'utf8').replace('MIN_NODE_MAJOR = 18','MIN_NODE_MAJOR = 16'));console.log('floor lowered 18->16');\"; fi && \
116121
node -e \"console.log('kernel napi', require('@databricks/sql/native/kernel').version())\" && \
117122
node scripts/run-all.js"

0 commit comments

Comments
 (0)