diff --git a/.github/workflows/rc-release.yml b/.github/workflows/rc-release.yml new file mode 100644 index 0000000..b991e3a --- /dev/null +++ b/.github/workflows/rc-release.yml @@ -0,0 +1,172 @@ +name: Maven RC release + +# RCs are published to GitHub Packages while Maven Central Publisher Pro is being arranged. +# The permanent Maven coordinates are used from the first RC, so the later Central migration +# changes only the repository URL, not users' dependencies. +on: + push: + tags: + - 'v*-rc.*' + workflow_dispatch: + inputs: + tag: + description: Existing RC tag to build and publish + required: true + type: string + +concurrency: + group: rc-release-${{ inputs.tag || github.ref_name }} + cancel-in-progress: false + +permissions: + contents: read + actions: read + +env: + MAVEN_ARGS: '--batch-mode --no-transfer-progress' + +jobs: + build: + name: build ${{ matrix.platform }} + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + include: + - platform: linux-x86_64-gnu + runner: ubuntu-22.04 + - platform: linux-aarch64-gnu + runner: ubuntu-22.04-arm + - platform: macos-aarch64 + runner: macos-15 + - platform: macos-x86_64 + runner: macos-15-intel + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.tag || github.ref }} + + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '11' + cache: maven + + - name: Resolve and validate RC version + run: | + set -eu + TAG='${{ inputs.tag || github.ref_name }}' + case "$TAG" in + v*-rc.*) ;; + *) echo "Expected a tag like v1.0.0-rc.1, got $TAG" >&2; exit 1 ;; + esac + VERSION="${TAG#v}" + echo "RC_TAG=$TAG" >> "$GITHUB_ENV" + echo "RC_VERSION=$VERSION" >> "$GITHUB_ENV" + + - name: Set the Maven RC version + run: | + # shellcheck disable=SC2086 + mvn $MAVEN_ARGS org.codehaus.mojo:versions-maven-plugin:2.17.0:set \ + -DnewVersion="$RC_VERSION" -DgenerateBackupPoms=false + + - name: Compile and run unit tests + run: | + # shellcheck disable=SC2086 + mvn $MAVEN_ARGS -pl chdb-jdbc -am test + + - name: Fetch the engine and build the native shim + run: | + case '${{ matrix.platform }}' in + linux-*) scripts/build-native-in-container.sh '${{ matrix.platform }}' ;; + *) scripts/build-native.sh '${{ matrix.platform }}' ;; + esac + + - name: Package the JDBC and native artifacts + run: | + set -eu + # shellcheck disable=SC2086 + mvn $MAVEN_ARGS -pl chdb-jdbc,chdb-native-${{ matrix.platform }} package -DskipTests + mkdir -p "maven/${{ matrix.platform }}" + cp "chdb-jdbc/target/chdb-jdbc-${RC_VERSION}.jar" "maven/${{ matrix.platform }}/" + cp "chdb-native-${{ matrix.platform }}/target/chdb-native-${{ matrix.platform }}-${RC_VERSION}.jar" "maven/${{ matrix.platform }}/" + cp pom.xml "maven/${{ matrix.platform }}/chdb-java-parent.pom" + cp chdb-jdbc/pom.xml "maven/${{ matrix.platform }}/chdb-jdbc.pom" + cp "chdb-native-${{ matrix.platform }}/pom.xml" "maven/${{ matrix.platform }}/chdb-native-${{ matrix.platform }}.pom" + cp chdb-bom/pom.xml "maven/${{ matrix.platform }}/chdb-bom.pom" + + - uses: actions/upload-artifact@v4 + with: + name: maven-${{ matrix.platform }} + path: maven/${{ matrix.platform }} + if-no-files-found: error + retention-days: 14 + + publish: + name: publish RC to GitHub Packages + needs: build + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.tag || github.ref }} + + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '11' + server-id: github + server-username: GITHUB_ACTOR + server-password: GITHUB_TOKEN + + - name: Resolve RC version + run: | + TAG='${{ inputs.tag || github.ref_name }}' + case "$TAG" in + v*-rc.*) ;; + *) echo "Expected a tag like v1.0.0-rc.1, got $TAG" >&2; exit 1 ;; + esac + echo "RC_VERSION=${TAG#v}" >> "$GITHUB_ENV" + + - uses: actions/download-artifact@v4 + with: + pattern: maven-* + path: maven + + - name: Publish Maven artifacts + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_ACTOR: ${{ github.actor }} + run: | + set -eu + REPOSITORY_URL="https://maven.pkg.github.com/${GITHUB_REPOSITORY_OWNER,,}/chdb-java" + PARENT_POM=$(find maven -name chdb-java-parent.pom -print -quit) + JDBC_POM=$(find maven -name chdb-jdbc.pom -print -quit) + BOM_POM=$(find maven -name chdb-bom.pom -print -quit) + + mvn $MAVEN_ARGS org.apache.maven.plugins:maven-deploy-plugin:3.1.3:deploy-file \ + -Dfile="$PARENT_POM" -DgroupId=com.clickhouse.chdb -DartifactId=chdb-java-parent \ + -Dversion="$RC_VERSION" -Dpackaging=pom -DgeneratePom=false \ + -DrepositoryId=github -Durl="$REPOSITORY_URL" + + mvn $MAVEN_ARGS org.apache.maven.plugins:maven-deploy-plugin:3.1.3:deploy-file \ + -Dfile="$(find maven -name "chdb-jdbc-${RC_VERSION}.jar" -print -quit)" \ + -DpomFile="$JDBC_POM" -DgeneratePom=false \ + -DrepositoryId=github -Durl="$REPOSITORY_URL" + + for platform in macos-aarch64 macos-x86_64 linux-x86_64-gnu linux-aarch64-gnu; do + NATIVE_POM=$(find maven -name "chdb-native-${platform}.pom" -print -quit) + NATIVE_JAR=$(find maven -name "chdb-native-${platform}-${RC_VERSION}.jar" -print -quit) + mvn $MAVEN_ARGS org.apache.maven.plugins:maven-deploy-plugin:3.1.3:deploy-file \ + -Dfile="$NATIVE_JAR" -DpomFile="$NATIVE_POM" -DgeneratePom=false \ + -DrepositoryId=github -Durl="$REPOSITORY_URL" + done + + mvn $MAVEN_ARGS org.apache.maven.plugins:maven-deploy-plugin:3.1.3:deploy-file \ + -Dfile="$BOM_POM" -DpomFile="$BOM_POM" -Dpackaging=pom \ + -DgroupId=com.clickhouse.chdb -DartifactId=chdb-bom -Dversion="$RC_VERSION" \ + -DgeneratePom=false \ + -DrepositoryId=github -Durl="$REPOSITORY_URL" diff --git a/CHDB_JAVA_V1_WORK_PLAN.md b/CHDB_JAVA_V1_WORK_PLAN.md index d0aaede..1842978 100644 --- a/CHDB_JAVA_V1_WORK_PLAN.md +++ b/CHDB_JAVA_V1_WORK_PLAN.md @@ -165,12 +165,12 @@ What "multiple ClassLoaders" means in V1: several child ClassLoaders can share o ### 4.1 V1 artifacts ```text -org.chdb:chdb-jdbc: -org.chdb:chdb-native-linux-x86_64-gnu: -org.chdb:chdb-native-linux-aarch64-gnu: -org.chdb:chdb-native-macos-x86_64: -org.chdb:chdb-native-macos-aarch64: -org.chdb:chdb-bom: +com.clickhouse.chdb:chdb-jdbc: +com.clickhouse.chdb:chdb-native-linux-x86_64-gnu: +com.clickhouse.chdb:chdb-native-linux-aarch64-gnu: +com.clickhouse.chdb:chdb-native-macos-x86_64: +com.clickhouse.chdb:chdb-native-macos-aarch64: +com.clickhouse.chdb:chdb-bom: ``` - `chdb-jdbc`: the pure Java API, the JDBC implementation and the native loader. It does not contain the chDB engine. @@ -219,16 +219,17 @@ a break in the Java API could ship as a trailing `.2`. | Fix in the driver, loader or JNI shim | `1.0.1` | | New engine baseline, no Java API change | `1.1.0` | | Breaking change to the Java API | `2.0.0` | -| Preview of `1.0.0` | `1.0.0-preview.1` | +| First Maven RC / first test version | `1.0.0-rc.1` | Release rules: - A published artifact is immutable. Never overwrite `1.0.0`; any fix ships as `1.0.1`. - `chdb-jdbc`, the four platform packages and `chdb-bom` always carry the same version. - An engine change is a `MINOR` bump when it changes what the driver can do and a `PATCH` when it does not. It is never invisible: the manifest and the release notes name the engine. -- A binding built on an engine RC is a preview and cannot be V1 GA. +- A binding built on an engine RC is an RC and cannot be V1 GA. - `-SNAPSHOT` is for development and never reaches Maven Central. -- **`-preview.` sorts *above* the release it previews.** Maven's `ComparableVersion` orders unknown qualifiers after the final release, so `1.0.0-preview.1` compares newer than `1.0.0` — measured, not assumed. It costs nothing here because previews are installed by hand into a local repository and never published beside a GA, and consumers name exact versions. If a preview ever has to live in a shared repository, use `-rc.`, which Maven does order below the release. +- **`-rc.` is the shared-repository pre-release qualifier.** The first test version is + `1.0.0-rc.1`, followed by `1.0.0-rc.2` and then the stable `1.0.0` release. To remove string-parsing ambiguity, every artifact manifest records these separately: diff --git a/README.md b/README.md index 6903a21..9f30bc3 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,9 @@ A JDBC driver for [chDB](https://github.com/chdb-io/chdb-core), the embedded bui ClickHouse. It runs the engine in your JVM's process — no server, no network — and gives you streaming, forward-only result sets over ClickHouse SQL. -> **Status: pre-release.** V1 is under construction against the work plan in -> [`CHDB_JAVA_V1_WORK_PLAN.md`](CHDB_JAVA_V1_WORK_PLAN.md). Nothing is on Maven Central yet -> and the public API is not frozen; releases ship as -> [preview bundles](#a-preview-from-a-github-release). See +> **Status: release candidate.** The first Maven release candidate is `v1.0.0-rc.1`, built with +> chDB Core `26.7.3`. RC artifacts are published to GitHub Packages until Maven Central is ready; +> the public API is not frozen. See > [What works today](#what-works-today). ```java @@ -58,35 +57,34 @@ on. The native package pulls in the driver, so declaring it alone is enough. ```xml - org.chdb + com.clickhouse.chdb chdb-native-linux-x86_64-gnu - 1.0.0 + 1.0.0-rc.1 ``` -**These coordinates do not resolve yet, and `org.chdb` is provisional** — nothing is on Maven -Central, and the published group id may end up being `com.clickhouse`. See -[docs/release-readiness.md](docs/release-readiness.md). Until then, install a preview. +GitHub Packages requires a GitHub classic PAT with `read:packages` in `~/.m2/settings.xml`: -### A preview from a GitHub Release - -Previews ship as one zip per platform, holding the same artifacts a Central release would: - -```bash -curl -fsSL -o /tmp/install-chdb-java-preview.sh \ - https://raw.githubusercontent.com/chdb-io/chdb-java/main/scripts/install-preview.sh -chmod +x /tmp/install-chdb-java-preview.sh -/tmp/install-chdb-java-preview.sh v1.0.0-preview.1 +```xml + + + + github + YOUR_GITHUB_USERNAME + YOUR_GITHUB_PAT + + + ``` -It downloads the bundle for this platform, verifies it against the release's `SHA256SUMS`, -installs it with `mvn install-file`, and prints the coordinates. Use `--maven-repo PATH` for a -repository other than `~/.m2/repository`. Then declare the dependency as above with -`1.0.0-preview.1`; because the bundle carries its own POMs, a later change of group id does -not strand an installed preview. +Add the repository to the consuming project: -Each preview tag is a commit on `main`, built and tested on all four platforms by -[`preview-release.yml`](.github/workflows/preview-release.yml). +```xml + + github + https://maven.pkg.github.com/chdb-io/chdb-java + +``` Building for several platforms — a CI matrix, or a distribution your users install on either architecture — declare the driver plus each native package you need: @@ -95,7 +93,7 @@ architecture — declare the driver plus each native package you need: - org.chdb + com.clickhouse.chdb chdb-bom 1.0.0 pom @@ -106,15 +104,15 @@ architecture — declare the driver plus each native package you need: - org.chdb + com.clickhouse.chdb chdb-jdbc - org.chdb + com.clickhouse.chdb chdb-native-linux-x86_64-gnu - org.chdb + com.clickhouse.chdb chdb-native-macos-aarch64 @@ -134,9 +132,9 @@ change to the Java API. The engine version is not part of it — it is in each p named in the release notes (`26.7.3` today), and the driver refuses to load any other build. See [work plan §4.3](CHDB_JAVA_V1_WORK_PLAN.md). -A preview is that version with a `-preview.` qualifier. Maven orders an unknown qualifier -*after* the release, so `1.0.0-preview.1` compares newer than `1.0.0`: name the version you -want rather than a range, and note that previews are never published beside a GA. +The first test version is the RC `1.0.0-rc.1`; later candidates increment the final number, and +the first stable Maven release is `1.0.0`. RCs use the permanent `com.clickhouse.chdb` groupId, +so moving stable releases to Maven Central will not change dependency coordinates. ## Connecting diff --git a/chdb-bom/pom.xml b/chdb-bom/pom.xml index d27ae3c..d75d84a 100644 --- a/chdb-bom/pom.xml +++ b/chdb-bom/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - org.chdb + com.clickhouse.chdb chdb-java-parent - 1.0.0-preview.1 + 1.0.0-SNAPSHOT chdb-bom @@ -23,27 +23,27 @@ - org.chdb + com.clickhouse.chdb chdb-jdbc ${project.version} - org.chdb + com.clickhouse.chdb chdb-native-macos-aarch64 ${project.version} - org.chdb + com.clickhouse.chdb chdb-native-macos-x86_64 ${project.version} - org.chdb + com.clickhouse.chdb chdb-native-linux-x86_64-gnu ${project.version} - org.chdb + com.clickhouse.chdb chdb-native-linux-aarch64-gnu ${project.version} diff --git a/chdb-examples/pom.xml b/chdb-examples/pom.xml index 9135439..104cfe5 100644 --- a/chdb-examples/pom.xml +++ b/chdb-examples/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - org.chdb + com.clickhouse.chdb chdb-java-parent - 1.0.0-preview.1 + 1.0.0-SNAPSHOT chdb-examples @@ -21,7 +21,7 @@ - org.chdb + com.clickhouse.chdb chdb-jdbc ${project.version} diff --git a/chdb-integration-tests/pom.xml b/chdb-integration-tests/pom.xml index b5cdb5a..28e8089 100644 --- a/chdb-integration-tests/pom.xml +++ b/chdb-integration-tests/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - org.chdb + com.clickhouse.chdb chdb-java-parent - 1.0.0-preview.1 + 1.0.0-SNAPSHOT chdb-integration-tests @@ -60,7 +60,7 @@ - org.chdb + com.clickhouse.chdb chdb-jdbc ${project.version} diff --git a/chdb-jdbc/pom.xml b/chdb-jdbc/pom.xml index 02a86c5..91a3169 100644 --- a/chdb-jdbc/pom.xml +++ b/chdb-jdbc/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - org.chdb + com.clickhouse.chdb chdb-java-parent - 1.0.0-preview.1 + 1.0.0-SNAPSHOT chdb-jdbc diff --git a/chdb-jdbc/src/main/java/org/chdb/internal/NativeLibraryLoader.java b/chdb-jdbc/src/main/java/org/chdb/internal/NativeLibraryLoader.java index d48051b..587bfcf 100644 --- a/chdb-jdbc/src/main/java/org/chdb/internal/NativeLibraryLoader.java +++ b/chdb-jdbc/src/main/java/org/chdb/internal/NativeLibraryLoader.java @@ -298,7 +298,7 @@ private static LoadedRuntime loadFromJavaLibraryPath(Platform platform) { + foreign + "\nAdd the platform package for this machine:\n" + " \n" - + " org.chdb\n" + + " com.clickhouse.chdb\n" + " chdb-native-" + platform.id() + "\n" + " ${chdb.version}\n" + " \n" @@ -410,7 +410,7 @@ private static LoadedRuntime verify( + " shim and the chdb-jdbc JAR come from different releases. Use a" + " chdb-native-" + platform.id() - + " package with the same version as chdb-jdbc, or import org.chdb:chdb-bom" + + " package with the same version as chdb-jdbc, or import com.clickhouse.chdb:chdb-bom" + " to keep them aligned.", e); } @@ -426,7 +426,7 @@ private static LoadedRuntime verify( + ". These come from different releases; align the versions of chdb-jdbc" + " and chdb-native-" + platform.id() - + " (org.chdb:chdb-bom does this for you)."); + + " (com.clickhouse.chdb:chdb-bom does this for you)."); } String expectedEngine = manifest.get("engine.version"); diff --git a/chdb-native-linux-aarch64-gnu/pom.xml b/chdb-native-linux-aarch64-gnu/pom.xml index 989551c..ddf224d 100644 --- a/chdb-native-linux-aarch64-gnu/pom.xml +++ b/chdb-native-linux-aarch64-gnu/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - org.chdb + com.clickhouse.chdb chdb-java-parent - 1.0.0-preview.1 + 1.0.0-SNAPSHOT chdb-native-linux-aarch64-gnu @@ -31,7 +31,7 @@ - org.chdb + com.clickhouse.chdb chdb-jdbc ${project.version} diff --git a/chdb-native-linux-x86_64-gnu/pom.xml b/chdb-native-linux-x86_64-gnu/pom.xml index 408fe78..aacb9ff 100644 --- a/chdb-native-linux-x86_64-gnu/pom.xml +++ b/chdb-native-linux-x86_64-gnu/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - org.chdb + com.clickhouse.chdb chdb-java-parent - 1.0.0-preview.1 + 1.0.0-SNAPSHOT chdb-native-linux-x86_64-gnu @@ -31,7 +31,7 @@ - org.chdb + com.clickhouse.chdb chdb-jdbc ${project.version} diff --git a/chdb-native-macos-aarch64/pom.xml b/chdb-native-macos-aarch64/pom.xml index 6dfd182..492df9d 100644 --- a/chdb-native-macos-aarch64/pom.xml +++ b/chdb-native-macos-aarch64/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - org.chdb + com.clickhouse.chdb chdb-java-parent - 1.0.0-preview.1 + 1.0.0-SNAPSHOT chdb-native-macos-aarch64 @@ -31,7 +31,7 @@ - org.chdb + com.clickhouse.chdb chdb-jdbc ${project.version} diff --git a/chdb-native-macos-x86_64/pom.xml b/chdb-native-macos-x86_64/pom.xml index 4d600dc..586d521 100644 --- a/chdb-native-macos-x86_64/pom.xml +++ b/chdb-native-macos-x86_64/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - org.chdb + com.clickhouse.chdb chdb-java-parent - 1.0.0-preview.1 + 1.0.0-SNAPSHOT chdb-native-macos-x86_64 @@ -31,7 +31,7 @@ - org.chdb + com.clickhouse.chdb chdb-jdbc ${project.version} diff --git a/docs/publishing.md b/docs/publishing.md index 03cb52e..82fb295 100644 --- a/docs/publishing.md +++ b/docs/publishing.md @@ -1,11 +1,8 @@ # Publishing runbook -Everything needed to put `org.chdb:chdb-jdbc` on Maven Central, in the order it has to happen, -marked by who can do it. The short version: the mechanics are done and tested, the namespace -needs one DNS record, and one licence question needs somebody with authority to answer it. - -Until those land there is nothing for `mvn` to resolve, so releases go out as preview bundles -on GitHub — section 8. +Everything needed to publish `com.clickhouse.chdb` artifacts. The first test version is +`1.0.0-rc.1`, published to GitHub Packages; stable releases go to Maven Central once the +ClickHouse Publisher Pro setup is ready. --- @@ -18,9 +15,9 @@ on GitHub — section 8. | GPG signing | **done and verified** — signs jar, sources, javadoc and pom | | Publishing plugin | **done** — `central-publishing-maven-plugin`, `autoPublish=false` | | Third-party licence inventory | **done** — generated from the engine, shipped in the package, drift-tested | -| `org.chdb` namespace | **not started** — needs a DNS TXT record, and there is no fallback | +| `com.clickhouse.chdb` namespace | **pending** — stable releases use the ClickHouse Central workspace | | A way to stage all four platforms for one release | **done** — `.github/workflows/release.yml`, issue #15 | -| A way to ship before the namespace exists | **done** — preview bundles, section 8 | +| GitHub Packages RC publishing | **implemented** — `.github/workflows/rc-release.yml` | | Proof that the artifacts work when consumed from a repository | **done, locally** — `scripts/verify-consumer.sh`, issue #10 | | GPG key for the project | **not started** — needs a decision about whose key | | Position on the LGPL components | **not started** — needs chdb-io | @@ -158,17 +155,13 @@ For CI, two secrets — the ASCII-armoured private key and its passphrase: Signing the first release from a laptop is fine and is the faster way to find out whether the rest works. -## 3. The namespace — needs DNS, approved automatically +## 3. The namespace — ClickHouse Central workspace -`org.chdb` is **unclaimed**. So are `io.chdb`, `com.chdb` and `io.github.chdb-io`; Maven Central -returns zero artifacts for all four. There is no conflict to resolve, only a claim to make. +All RC and stable artifacts use the permanent `com.clickhouse.chdb` namespace. The stable +release will be published through the ClickHouse Sonatype Central workspace, so the maintainer +needs workspace publisher/member access rather than a temporary personal namespace. -1. Register at . -2. Start a namespace claim for `org.chdb`. -3. Add the TXT record Sonatype names to the `chdb.org` zone. `chdb.org` resolves, so whoever - administers that zone can do this. -4. Sonatype's checker verifies it. No human review, no queue. -5. Generate a portal token and put it in `~/.m2/settings.xml`: +When Publisher Pro is ready, generate a Central Portal token and put it in `~/.m2/settings.xml`: ```xml @@ -241,7 +234,7 @@ much better case than a smoothed average would have been. real numbers at , then mail `central-support@sonatype.com` with what the exception form asks for: -- organisation and namespace (`org.chdb`) +- organisation and namespace (`com.clickhouse.chdb`) - what it is: four per-platform packages of an embedded analytical database engine, where the size is a ~326 MB prebuilt native library per platform and cannot meaningfully be reduced - the publishing pattern: event-driven, one release every two to three months, tracking chDB @@ -383,7 +376,7 @@ Each step can invalidate the next, so: | Release profile, signing config, licence inventory | done | no | | Generate and publish a GPG key | any maintainer | no | | Decide *whose* key signs | chdb-io | a decision, not an approval | -| `org.chdb` namespace claim | whoever runs `chdb.org` DNS | automatic once the TXT record is up | +| `com.clickhouse.chdb` namespace permission | ClickHouse Central workspace admin | required before stable release | | Sonatype account and portal token | any maintainer | no | | A publishing-limit exception | Sonatype support | yes, if the numbers need it | | **Position on the twelve copyleft components** | **chdb-io / ClickHouse legal** | **yes — the only real gate** | @@ -391,32 +384,16 @@ Each step can invalidate the next, so: --- -## 8. Previews, until Central exists - -A preview is this release published somewhere reachable today. Same runners, same -`build-native.sh`, same integration tests; the difference is one workflow: -`.github/workflows/preview-release.yml` uploads one zip per platform to a GitHub Release, and -`scripts/install-preview.sh` installs a zip into a local Maven repository. The POMs in the -bundle are the ones the build produced. A GitHub Release rather than files in the repository, -because a native package is 112–167 MB. +## 8. RCs on GitHub Packages -Cutting one is cutting a release, because it is one: +The first test version is `1.0.0-rc.1`, released by pushing the tag `v1.0.0-rc.1`. The +`.github/workflows/rc-release.yml` workflow builds all four native packages on native runners +and publishes the parent POM, JDBC driver, platform packages and BOM to: -```bash -mvn versions:set -DnewVersion=1.0.0-preview.1 -DgenerateBackupPoms=false -git commit -am "Set the version for the 1.0.0-preview.1 release" -# merge to main, let build.yml go green on the merge commit -git tag -a v1.0.0-preview.1 -m "chdb-java 1.0.0-preview.1" -git push origin v1.0.0-preview.1 +```text +https://maven.pkg.github.com/chdb-io/chdb-java ``` -The workflow refuses the tag unless the POMs at that commit carry that version, the tag points -at that commit, the commit is an ancestor of `main`, and `build` was green for it. The first -attempt at `v1.0.0-preview.1` failed all four: tagged on a side branch 67 commits behind -`main`, it published binaries missing thirteen merged fixes. Nothing had downloaded it, so it -was deleted and the number reused. Afterwards the usual back-to-development commit returns the -POMs to a `-SNAPSHOT`. - -A preview tag cannot start the Central path — `release.yml` excludes it — and the release is -always marked pre-release. - +Consumers configure that repository and a GitHub classic PAT with `read:packages`. Stable +versions keep the same coordinates and later move to Maven Central; no dependency coordinate +change is required. diff --git a/docs/release-readiness.md b/docs/release-readiness.md index ece860a..833e71a 100644 --- a/docs/release-readiness.md +++ b/docs/release-readiness.md @@ -284,7 +284,7 @@ four platforms, so the answer cannot go stale between releases. there. Nothing exercised that indirection before. The consumer's *local* repository then ends up holding both names at once — the timestamped file it downloaded and a `-SNAPSHOT.jar` beside it — so anything that looks for the driver by file name is depending on a resolver - detail. `scripts/verify-consumer.sh` locates it by coordinate, `org/chdb/chdb-jdbc/`, for + detail. `scripts/verify-consumer.sh` locates it by coordinate, `com/clickhouse/chdb/chdb-jdbc/`, for that reason. - **"Declared the wrong platform package" was indistinguishable from "declared none".** Both produced the same message — three locations searched, none found, here is the coordinate to diff --git a/docs/v1-progress.md b/docs/v1-progress.md index f1a82f4..8fe1baa 100644 --- a/docs/v1-progress.md +++ b/docs/v1-progress.md @@ -6,6 +6,8 @@ stays the report. Legend: ✅ done and tested · 🟡 partly done · ⬜ not started · ➖ out of this milestone +The first test version is the Maven RC `1.0.0-rc.1`, published through GitHub Packages. + Verified in CI against **engine 26.7.0** on all four platforms — Linux x86_64 and aarch64, macOS arm64 and x86_64 — each running the full suite on **Java 11, 17, 21 and 25**, plus sanitizer runs on one Linux and one macOS toolchain. Sixteen platform-and-JDK combinations, all @@ -18,7 +20,7 @@ current engine until CI says otherwise. 26.7.3 is a **stable** chdb-core release, which clears the [work plan §4.3 ](../CHDB_JAVA_V1_WORK_PLAN.md) bar that 26.7.2-rc.2 could not: a binding built on an engine -pre-release is a preview and cannot be the V1 GA, so the RC baseline was itself a release +pre-release is not suitable for V1 GA, so the RC baseline was itself a release blocker. It also carries chdb-core #224, the fix for the signal-handler window reported as chdb-core #221 — `scripts/run-signal-window-test.sh measure` reports zero on it, against 688, 613 and 724 on 26.7.2-rc.2. diff --git a/pom.xml b/pom.xml index 4e0c499..71bf275 100644 --- a/pom.xml +++ b/pom.xml @@ -4,9 +4,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.chdb + com.clickhouse.chdb chdb-java-parent - 1.0.0-preview.1 + 1.0.0-SNAPSHOT pom chDB Java Binding (parent) diff --git a/scripts/install-preview.sh b/scripts/install-preview.sh index 9305de7..72d8943 100755 --- a/scripts/install-preview.sh +++ b/scripts/install-preview.sh @@ -4,7 +4,7 @@ # platform, verifies it against the release's SHA256SUMS, and installs the jars with the POMs # the build produced. Needs curl, unzip and mvn. # -# install-preview.sh v1.0.0-preview.1 [--repo OWNER/REPO] [--maven-repo PATH] +# install-preview.sh vX.Y.Z-preview.N [--repo OWNER/REPO] [--maven-repo PATH] # set -euo pipefail @@ -70,7 +70,7 @@ done [[ "$REPO" =~ ^[^/]+/[^/]+$ ]] || die "repository must look like OWNER/REPO: $REPO" case "$TAG" in v*-preview.*) ;; - *) die "release tag must look like v1.0.0-preview.1: $TAG" ;; + *) die "release tag must look like vX.Y.Z-preview.N: $TAG" ;; esac VERSION=${TAG#v} diff --git a/scripts/verify-consumer.sh b/scripts/verify-consumer.sh index 562b986..8fdb4a4 100755 --- a/scripts/verify-consumer.sh +++ b/scripts/verify-consumer.sh @@ -41,18 +41,18 @@ # mvn -pl chdb-jdbc compile && scripts/build-native.sh # # Needs network on first run: the consumer's empty local repository has to fetch Maven's own -# plugins. Everything under org.chdb comes from the file repository, and the script asserts it. +# plugins. Everything under com.clickhouse.chdb comes from the file repository, and the script asserts it. # # What is isolated, and what is not: # -# org.chdb artifacts isolated. The consumer's project repositories are the throwaway file +# com.clickhouse.chdb artifacts isolated. The consumer's project repositories are the throwaway file # repository and a disabled `central`, and every downloaded file's # recorded provenance is checked afterwards. Nothing else may serve # them, because a good copy on Central masking a bad one we just # deployed is the single failure this script exists to detect. # Maven's own plugins not isolated, on purpose. They come from the real Central through the # inherited pluginRepositories. Vendoring them would make this script -# unrunnable for no gain: org.chdb is never a plugin dependency. +# unrunnable for no gain: com.clickhouse.chdb is never a plugin dependency. # the local repository overridden, not shared: -Dmaven.repo.local points at an empty # directory, so nothing can be satisfied from a previous build. # settings.xml not suppressed. A caller's mirrors and profiles still apply, and a @@ -121,7 +121,7 @@ VERSION="$(cd "$ROOT" && mvn "${MVN_FLAGS[@]}" -q -DforceStdout help:evaluate -D # cd/pwd rather than mktemp's own answer: TMPDIR usually ends in a slash, so mktemp hands back # a path with a doubled separator, and Maven reports the normalised form. The check below that -# every org.chdb artifact came from the consumer's own local repository compares paths as +# every com.clickhouse.chdb artifact came from the consumer's own local repository compares paths as # strings, and would fail on that difference alone. WORK="$(cd "$(mktemp -d "${TMPDIR:-/tmp}/chdb-verify-consumer.XXXXXX")" && pwd)" @@ -176,10 +176,10 @@ step "Deploying to a throwaway file:// repository" # Every artifact a consumer needs has to be in there, POM included -- a jar with no POM # resolves for a direct dependency and then fails to bring in chdb-jdbc. for coord in \ - "org/chdb/chdb-java-parent/${VERSION}" \ - "org/chdb/chdb-bom/${VERSION}" \ - "org/chdb/chdb-jdbc/${VERSION}" \ - "org/chdb/${MODULE}/${VERSION}"; do + "com/clickhouse/chdb/chdb-java-parent/${VERSION}" \ + "com/clickhouse/chdb/chdb-bom/${VERSION}" \ + "com/clickhouse/chdb/chdb-jdbc/${VERSION}" \ + "com/clickhouse/chdb/${MODULE}/${VERSION}"; do [ -d "${REPO}/${coord}" ] || die "nothing published at ${coord}" # A JAR with no POM resolves for a direct dependency and then quietly brings in nothing. compgen -G "${REPO}/${coord}/*.pom" > /dev/null || die "no POM published at ${coord}" @@ -192,14 +192,14 @@ case "$VERSION" in # chdb-jdbc-26.7.0.1-20260909.053707-1.jar and a maven-metadata.xml that maps -SNAPSHOT # onto that timestamp, and a consumer cannot resolve the version without it. Nothing in # the reactor exercises that indirection, which is the sort of thing issue #10 is about. - [ -f "${REPO}/org/chdb/chdb-jdbc/${VERSION}/maven-metadata.xml" ] \ + [ -f "${REPO}/com/clickhouse/chdb/chdb-jdbc/${VERSION}/maven-metadata.xml" ] \ || die "no snapshot metadata for chdb-jdbc; a consumer could not resolve ${VERSION}" ok "snapshot metadata maps ${VERSION} onto the timestamped filenames" ;; esac NATIVE_JAR="" -for candidate in "${REPO}/org/chdb/${MODULE}/${VERSION}/"*.jar; do +for candidate in "${REPO}/com/clickhouse/chdb/${MODULE}/${VERSION}/"*.jar; do case "$candidate" in *-sources.jar|*-javadoc.jar) continue ;; esac NATIVE_JAR="$candidate" break @@ -233,7 +233,7 @@ cat > "${CONSUMER}/pom.xml" < "${CONSUMER}/pom.xml" < - org.chdb + com.clickhouse.chdb chdb-bom ${VERSION} pom @@ -284,7 +284,7 @@ cat > "${CONSUMER}/pom.xml" < - org.chdb + com.clickhouse.chdb ${MODULE} @@ -292,7 +292,7 @@ cat > "${CONSUMER}/pom.xml" <chdb-verify="*) ;; *) - die "an org.chdb artifact was served by a repository other than the throwaway one: + die "a com.clickhouse.chdb artifact was served by a repository other than the throwaway one: ${record} ${line} Only 'chdb-verify' proves the artifact under test is the one this run deployed. If a mirror in @@ -346,11 +346,11 @@ your settings.xml claims '*', run this with -s pointing at a settings file that ;; esac done < "$record" -done < <(find "${CONSUMER_M2}/org/chdb" -name '_remote.repositories' -type f) +done < <(find "${CONSUMER_M2}/com/clickhouse/chdb" -name '_remote.repositories' -type f) [ "$PROVENANCE_LINES" -gt 0 ] \ - || die "no _remote.repositories entries under ${CONSUMER_M2}/org/chdb: nothing was actually + || die "no _remote.repositories entries under ${CONSUMER_M2}/com/clickhouse/chdb: nothing was actually downloaded, so this run proved nothing about resolving from a repository." -ok "all ${PROVENANCE_LINES} downloaded org.chdb files came from the throwaway repository, not from Central" +ok "all ${PROVENANCE_LINES} downloaded com.clickhouse.chdb files came from the throwaway repository, not from Central" # Located by its repository path rather than by a file name, and this matters more than it # looks. A snapshot exists under two names at once: the remote repository holds # chdb-jdbc-26.7.2-rc.2.1-20260909.081309-1.jar, and Maven's local repository ends up with @@ -361,11 +361,11 @@ ok "all ${PROVENANCE_LINES} downloaded org.chdb files came from the throwaway re # changed that would not fail this assertion, it would skip the two error paths below and # still print "all consumer checks passed". # -# org/chdb/chdb-jdbc/ is the coordinate. It cannot drift. +# com/clickhouse/chdb/chdb-jdbc/ is the coordinate. It cannot drift. JDBC_ONLY="" for entry in "${CP_ENTRIES[@]}"; do case "$entry" in - */org/chdb/chdb-jdbc/*.jar) + */com/clickhouse/chdb/chdb-jdbc/*.jar) [ -z "$JDBC_ONLY" ] || die "two chdb-jdbc jars on the consumer's classpath: ${JDBC_ONLY} ${entry}"