Skip to content

ci: prebuild-publish must test the just-built addon; bump @chdb/lib-* to 26.5.3#73

Merged
ShawnChen-Sirius merged 1 commit into
chdb-io:mainfrom
chibugai:node/prebuild-test-fresh-addon
Jul 13, 2026
Merged

ci: prebuild-publish must test the just-built addon; bump @chdb/lib-* to 26.5.3#73
ShawnChen-Sirius merged 1 commit into
chdb-io:mainfrom
chibugai:node/prebuild-test-fresh-addon

Conversation

@chibugai

@chibugai chibugai commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #72 — the prebuild-publish run for v3.2.0 (https://github.com/chdb-io/chdb-node/actions/runs/29225306812) went red on all 4 subpackages legs, and the release never shipped.

Root cause

Two coupled defects, both from the same fact: @chdb/lib-*@26.5.2 already exists on npm (published 2026-06-24, v3.1.0-era native source — before ArrowRegisterColumns (98d81b6) and .stream() server-side param binding (f6457ee) existed):

  1. The release pipeline tested the wrong binary. npm install --ignore-scripts pulls the published @chdb/lib-*@26.5.2 via optionalDependencies, and src/loader.ts prefers the installed subpackage over the freshly built build/Release/chdb_node.node. So npm run test:all exercised the stale 26.5.2 binary → 8× TypeError: chdbNode.ArrowRegisterColumns is not a function + 5× Code: 456 Substitution 'p0' is not set (UNKNOWN_QUERY_PARAMETER) per job, identical on all 4 platforms. chdb-node-test.yml is green on the same sha only because it already drops the installed subpackage before testing; prebuild-publish.yml was missing that step.
  2. Even with green tests, v3.2.0 would have shipped the stale binary. The subpackage publish step intentionally skips already-published versions, and LIBCHDB_NPM_VERSION was still 26.5.2 — so the freshly built binaries would never publish and chdb@3.2.0 would resolve to the old 26.5.2 binaries, breaking the Layer 3 Arrow API at runtime for every user.

Fix

  • prebuild-publish.yml (subpackages job): drop node_modules/@chdb/lib-* before npm run test:all, mirroring chdb-node-test.yml, so the release pipeline tests the exact binary it is about to package and publish.
  • update_libchdb.sh: LIBCHDB_NPM_VERSION 26.5.2 → 26.5.3 (packaging revision — npm forbids republishing 26.5.2), with the history documented in the comment.
  • package.json: bump the four @chdb/lib-* optionalDependencies pins to 26.5.3.

Reproduction + validation (linux-x64, commit 0513de2, exact CI sequence)

npm install --ignore-scripts        # installs @chdb/lib-linux-x64-gnu@26.5.2
npm run libchdb && npm run build
npx vitest run test/v3/layer3/arrow-input.test.ts test/v3/layer3/stream.test.ts
#  → 9 failed | 6 passed — 16× "ArrowRegisterColumns is not a function",
#    "Substitution `p0` is not set" — identical frames to the CI run
rm -rf node_modules/@chdb/lib-*     # the fix's new step
npx vitest run ...                  # → 15 passed (15)

With this branch applied: npm install --ignore-scripts exits 0 with 26.5.3 not yet on the registry (optional dep skipped, loader falls through to the local build — same state CI will be in until the subpackages job publishes), and the full suite passes: npm run test:all → 39 files, 452 passed | 11 skipped.

Notes for re-release

After merge, re-running the release (re-tag v3.2.0 or cut v3.2.1) is a maintainer call. The verify job then installs the published chdb + @chdb/lib-*@26.5.3 from the registry on all 12 legs, which independently gates promotelatest.

Note

Fix prebuild-publish CI to test the locally built addon and bump @chdb/lib-* to 26.5.3

  • Adds a step in prebuild-publish.yml that removes installed @chdb/lib-* packages from node_modules before running test:all, ensuring the test exercises the freshly built chdb_node.node binary rather than a previously published subpackage.
  • Bumps LIBCHDB_NPM_VERSION in update_libchdb.sh and optionalDependencies in package.json from 26.5.2 to 26.5.3.

Macroscope summarized 91433b8.

@ShawnChen-Sirius ShawnChen-Sirius merged commit e209a22 into chdb-io:main Jul 13, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prebuild-publish CI: test:all loads stale @chdb/lib-*@26.5.2 instead of the just-built addon — v3.2.0 release red on all 4 platforms

2 participants