Skip to content

Publish previews from a tag on main, and cut 1.0.0-preview.1 - #29

Merged
ShawnChen-Sirius merged 7 commits into
mainfrom
release/preview-publishing
Sep 21, 2026
Merged

ShawnChen-Sirius merged 7 commits into
mainfrom
release/preview-publishing

Conversation

@ShawnChen-Sirius

@ShawnChen-Sirius ShawnChen-Sirius commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

v1.0.0-preview.1 was tagged on a branch 67 commits behind main, so the binaries it
published were missing thirteen merged fixes, and the install command in its README pointed
at main/scripts/install-preview.sh — a path that only ever existed on that branch, so the
first step of the documented install returned 404. Verified against the published assets on
Linux x86_64: DESCRIBE/SHOW/EXPLAIN/EXISTS all fail with Streaming query is not
supported
(#12), a non-ASCII storage path is refused under a non-UTF-8 locale (#7), exiting
the JVM with a live stream aborts with a libc++ assertion, exit 134 (#8, #22), and column
types come back as the Arrow projection rather than what the engine declared — DateTime as
UInt32, Array as Unsupported(arrow=+l) (#28).

Nothing had downloaded it, so it is withdrawn and the number reused. This brings the
publishing machinery onto main and makes that class of release impossible to cut again.

What is here

.github/workflows/preview-release.yml — the Central path with the last step swapped.
Same four runners, same build-native.sh, same integration tests against the staged package;
instead of signing a portal bundle it uploads one zip per platform to a GitHub Release. It
keeps release.yml's rule that the version lives in git — no versions:set in CI — and
refuses a tag unless all four hold:

check what it would have caught
POMs at the tagged commit carry the tag's version a tag naming bytes no commit describes
scripts/check-release-tag.sh agrees the tag points at this commit the same, from the other direction
the commit is an ancestor of main the withdrawn tag — compare/main...e9f2223 is diverged
build concluded successfully for the commit an untested tree

scripts/package-preview.sh, scripts/install-preview.sh — moved onto main, which is
what the README's curl needs. The installer verifies the bundle against the release's
SHA256SUMS, installs the POMs the build produced rather than generated ones, and refuses a
bundle whose preview.properties version disagrees with the tag it was fetched under. Its
404 message names both plausible causes instead of leaving curl: (22) as the diagnosis.

scripts/verify-preview-bundle.sh — what CI runs on each bundle before it is uploaded. A
real Maven project outside the checkout, declaring the native package with no version and
resolving from nothing but the repository the bundle was installed into, so the parent
relationship, the BOM and the transitive chdb-jdbc dependency are all exercised — then an
in-memory query and one that has to survive a reopen.

release.yml no longer triggers on preview tags. v* matched v1.0.0-preview.1 and
preflight would have accepted it, so the Central path would have staged, signed and offered a
preview in the portal — where a release cannot be unpublished.

Versioning: the binding is now SemVer, 1.0.0-preview.1. <engine-version>.<binding-revision>
read the wrong way round in both directions: 26.7.2-rc.2.1 → 26.7.3.1 looked like a major
change and was none of the binding's doing, while a break in the Java API could ship as a
trailing .2. The engine version moves to where it is read rather than parsed — each native
package's manifest.properties, scripts/engine.properties, the release notes — and the ABI
check already refuses any engine but the one a package was built against. Work plan §4.3 is
rewritten to match. The README also says org.chdb is provisional and may end up
com.clickhouse; a preview is unaffected either way, because the bundle carries its own POMs
and the installer reads the group id out of them.

Checked locally

  • mvn -pl chdb-jdbc -am test at the new version — 178 tests, green.
  • scripts/verify-preview-bundle.sh against the published bundle: installs, resolves through
    the BOM, chdb-jdbc arrives transitively, every org.chdb artifact comes from the bundle's
    own repository, queries run. It found one bug in itself on the way — jar --create writes a
    META-INF beside the bundle directory, so "the first directory in the zip" is not it.
  • install-preview.sh against the published release, including the 404 and argument paths.
  • The ancestor-of-main gate, against three real commits: main → identical (accept), a
    merged ancestor → behind (accept), e9f2223 → diverged (reject).

After merge

Tag the merge commit v1.0.0-preview.1 once build is green on it, let this workflow
publish, then the ordinary back-to-development commit returns the POMs to 1.0.0-SNAPSHOT.

🤖 Generated with Claude Code

Note

Publish v*-preview.* tags as GitHub prereleases and cut 1.0.0-preview.1

  • Adds a GitHub Actions workflow in preview-release.yml to build, package, verify, and publish preview bundles for Linux and macOS x86_64/aarch64 from tags matching v*-preview.*.
  • Adds package-preview.sh, verify-preview-bundle.sh, and install-preview.sh to assemble bundles, validate them as an external Maven consumer, and install them into a local Maven repository.
  • Bumps all Maven module versions to 1.0.0-preview.1 across pom.xml and submodule POMs.
  • Updates release.yml to exclude v*-preview.* tags from the Central release workflow.
  • Risk: release.yml now ignores v*-preview.* tags, so pushing these tags no longer triggers the standard Central release path.

Macroscope summarized ae0e23b.

ShawnChen-Sirius and others added 2 commits September 21, 2026 00:07
`org.chdb` is not on Central yet, so there is nowhere for a user to resolve the driver
from. This publishes a release as GitHub Release assets instead: one zip per platform,
holding the jars and the POMs the build produced, and scripts/install-preview.sh installs
one into a local Maven repository with `install-file`.

The workflow is the Central path with the last step swapped -- the same four runners, the
same build-native.sh, the same integration tests against the staged package -- and it keeps
release.yml's rule that the version lives in git: no `versions:set` in CI, the POMs at the
tagged commit must already carry the tag's version, scripts/check-release-tag.sh must agree
that the tag names that commit, the commit must be an ancestor of main, and `build` must
have concluded successfully for it.

Each of those checks names a way the first preview went wrong. v1.0.0-preview.1 was tagged
on a branch 67 commits behind main, so the published binaries were missing thirteen merged
fixes -- non-streamable statements, the non-ASCII storage path, the shutdown hook, stream
handle ownership, RowBinary types -- and its own install command pointed at a script that
existed only on that branch.

A preview tag is also excluded from release.yml's trigger. `v*` matched it, and preflight
would have accepted it, so the Central path would have staged and signed a preview and
offered it in the portal, where a release cannot be unpublished.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… resolve yet

The Maven coordinates at the top of Installing are the ones a user will eventually write,
and today they resolve to nothing. Say so where they are, and give the path that works:
the installer script, what it verifies, and the coordinates it prints.

Versioning gains the preview qualifier -- `26.7.3.1-preview.1` is the first preview of
`26.7.3.1` and sorts below it -- so a preview stays the same scheme from a different place
rather than a second one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment thread .github/workflows/preview-release.yml
Comment thread .github/workflows/preview-release.yml Outdated
Comment thread scripts/install-preview.sh Outdated
Comment thread .github/workflows/preview-release.yml Outdated
ShawnChen-Sirius and others added 3 commits September 21, 2026 00:25
`<engine-version>.<binding-revision>` read the wrong way round in both directions. The move
from 26.7.2-rc.2.1 to 26.7.3.1 looked like a major change and was none of the binding's
doing, while a break in the Java API could ship as a trailing `.2` that nothing in the
number marked as breaking. A version is read by consumers, and the question they ask it is
about the Java API.

So: SemVer for the binding, `1.0.0` first, `1.0.0-preview.<n>` for a preview. The engine
version is not dropped, it is moved to where it can be read rather than parsed out of a
string -- `engine.version` in each native package's manifest.properties, the pinned baseline
and its SHA-256 in scripts/engine.properties, and the release notes. The ABI check already
refuses any engine but the one a package was built against, so the pairing was never the
artifact name's job.

Work plan §4.3 is rewritten rather than annotated, because a versioning rule with two
answers in it is worse than either.

The README also says plainly that `org.chdb` itself is provisional and may end up as
`com.clickhouse`. A preview survives that: the bundle carries the POMs it was built with and
the installer reads the group id out of them, so a namespace decision changes what a user
declares, not whether an install keeps working.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…blishing

Two gaps in the preview workflow, both found in review.

The bundle check installed the artifacts and then ran a class off a hand-built `-cp`. That
proves the JARs execute and says nothing about whether Maven can resolve them, which is the
half `install-file` can break: the parent relationship, the BOM's dependencyManagement, and
the native package's dependency on the driver are all metadata a classpath never reads.
scripts/verify-preview-bundle.sh builds a project outside the checkout instead, declaring
the native package and no version and resolving from nothing but the repository the bundle
was installed into, then runs an in-memory query and one that has to survive a reopen. It
also asserts every org.chdb artifact on the classpath came from that repository.

Running it locally against the published bundle turned up a bug in it worth keeping the
note: `jar --create` writes its own META-INF beside the bundle directory, so "the first
directory in the zip" is not the bundle.

The publish job had no checkout. Every gh call in it passes --repo, so it had a good chance
of working, but `gh release create` with no --repo and no checkout is exactly how the first
attempt at publishing a preview failed -- `fatal: not a git repository` -- and a job that
publishes is the wrong place to rely on a flag being right.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The tag has to name bytes a commit describes, so the version is committed here rather than
set in CI. The back-to-development commit returns the POMs to a -SNAPSHOT after the tag is
pushed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ShawnChen-Sirius
ShawnChen-Sirius force-pushed the release/preview-publishing branch from aea066b to d1cb70b Compare September 21, 2026 00:26
@ShawnChen-Sirius ShawnChen-Sirius changed the title Publish previews from a tag on main, and cut 26.7.3.1-preview.1 Publish previews from a tag on main, and cut 1.0.0-preview.1 Sep 21, 2026
Comment thread CHDB_JAVA_V1_WORK_PLAN.md Outdated
Comment thread CHDB_JAVA_V1_WORK_PLAN.md Outdated
Comment thread scripts/install-preview.sh
Comment thread .github/workflows/preview-release.yml Outdated
ShawnChen-Sirius and others added 2 commits September 21, 2026 00:39
Five things review found, each able to publish or install something wrong.

The publish job re-resolves the tag immediately before uploading and fails unless it still
points at the commit the bundles were built from. `--verify-tag` only asks whether the tag
exists, and staging takes tens of minutes -- long enough for a tag to move.

`gh release edit` passes `--draft=false`, so an existing draft is published rather than
quietly taking the uploads and staying invisible.

The integration-test step closes stdin, as build.yml already does: chDB reads a non-TTY
stdin with bytes on it as external data for an INSERT. verify-preview-bundle.sh does the
same, because its consumer inserts.

In the installer, `$HOME` is no longer dereferenced under `set -u` before arguments are
parsed, and a relative `--maven-repo` is made absolute before Maven runs from the temporary
directory -- it used to install into a path the EXIT trap deleted, then report success.

Comments here are cut to what is not obvious from the code.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`1.0.0-preview.1` does not sort below `1.0.0`. ComparableVersion orders unknown qualifiers
after the final release, and `preview` is not one of the qualifiers it knows, so the preview
compares *newer* than the release it previews. Measured against maven-artifact 3.9.9:

    1.0.0-preview.1  >  1.0.0
    1.0.0-rc.1       <  1.0.0

The README and §4.3 claimed the opposite. Both now say what it does, and why it costs
nothing as things stand -- previews are installed by hand into a local repository, never
published beside a GA, and named exactly rather than matched by a range -- with `-rc.<n>` as
the answer if one ever has to live in a shared repository.

The prose around all of this is cut back too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ShawnChen-Sirius

Copy link
Copy Markdown
Contributor Author

Review findings, all addressed in f8822b9 and ae0e23b.

Finding Done
Tag can move during staging; --verify-tag only checks existence publish re-resolves the tag and fails unless it still points at the preflight SHA
An existing draft release stays a draft gh release edit --draft=false
$HOME dereferenced under set -u ${HOME:-$PWD}
Relative --maven-repo installed under $WORK, then deleted made absolute before Maven runs; verified that a relative path now survives
stdin left open for the engine's INSERT path exec </dev/null in the integration-test step and in verify-preview-bundle.sh, matching build.yml
Consumer test resolved from the reactor already replaced by scripts/verify-preview-bundle.sh in d1cb70b
1.0.0-preview.1 does not sort below 1.0.0 correct, and the docs said otherwise. Measured against maven-artifact 3.9.9: 1.0.0-preview.1 > 1.0.0, 1.0.0-rc.1 < 1.0.0. README and §4.3 now state it, with -rc.<n> named as the fix if a preview ever has to live in a shared repository. Keeping -preview.<n>: these are installed by hand into a local repository, never published beside a GA, and named exactly rather than matched by a range
§4.3 conflicts with a preflight expecting v26.7.3.1-preview.1 stale — the POMs and the tag are both 1.0.0-preview.1, and preflight compares the tag against the POMs rather than any fixed version

Prose and comments across the PR are also cut back: 213 lines removed against 135 added, no behaviour change in that commit.

@ShawnChen-Sirius

Copy link
Copy Markdown
Contributor Author

@wudidapaopao please reivew this PR

@ShawnChen-Sirius
ShawnChen-Sirius merged commit edfb4fe into main Sep 21, 2026
30 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.

1 participant