Skip to content

Commit cbd500f

Browse files
committed
Merge branch 'main' into 06/17/26/binary_string_support
2 parents 2bbb606 + 75e96ed commit cbd500f

21 files changed

Lines changed: 431 additions & 79 deletions

File tree

.github/workflows/release.yml

Lines changed: 37 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ name: Release
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
version:
7-
description: "Release version"
8-
required: true
95

106
env:
117
CH_VERSION: "25.3"
@@ -15,11 +11,16 @@ jobs:
1511
name: "Build and Publish Artifact"
1612
runs-on: "ubuntu-latest"
1713

18-
permissions: write-all
14+
permissions:
15+
contents: write
1916

2017
steps:
2118
- name: Check out Git repository
2219
uses: actions/checkout@v4
20+
- name: Read release version
21+
id: version
22+
shell: bash
23+
run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT"
2324
- name: Install JDK and Maven
2425
uses: actions/setup-java@v4
2526
with:
@@ -28,6 +29,11 @@ jobs:
2829
8
2930
17
3031
cache: 'maven'
32+
server-id: central
33+
server-username: MAVEN_USERNAME
34+
server-password: MAVEN_PASSWORD
35+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
36+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
3137
- name: Setup Toolchain
3238
shell: bash
3339
run: |
@@ -48,43 +54,34 @@ jobs:
4854
EOF
4955
- name: Update Configuration
5056
run: |
51-
sed -i 's|<revision>.*</revision>|<revision>${{ github.event.inputs.version }}</revision>|g' pom.xml
57+
sed -i 's|<revision>.*</revision>|<revision>${{ steps.version.outputs.version }}</revision>|g' pom.xml
5258
find . -type f -name "simplelogger.*" -exec rm -fv '{}' \;
5359
- name: Release Maven package
54-
uses: samuelmeuli/action-maven-publish@v1
55-
with:
56-
maven_profiles: release
57-
maven_args: -q --batch-mode -DclickhouseVersion=${{ env.CH_VERSION }}
58-
server_id: central
59-
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
60-
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
61-
nexus_username: ${{ secrets.SONATYPE_TOKEN_USER }}
62-
nexus_password: ${{ secrets.SONATYPE_TOKEN }}
60+
env:
61+
MAVEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_USER }}
62+
MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN }}
63+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
64+
run: mvn -q --batch-mode -P release -DclickhouseVersion=${{ env.CH_VERSION }} clean deploy
6365
- name: Release R2DBC 0.9.1
64-
uses: samuelmeuli/action-maven-publish@v1
65-
with:
66-
directory: clickhouse-r2dbc
67-
maven_profiles: release
68-
maven_args: -q --batch-mode -Dr2dbc-spi.version=0.9.1.RELEASE -DclickhouseVersion=${{ env.CH_VERSION }}
69-
server_id: central
70-
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
71-
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
72-
nexus_username: ${{ secrets.SONATYPE_TOKEN_USER }}
73-
nexus_password: ${{ secrets.SONATYPE_TOKEN }}
66+
working-directory: clickhouse-r2dbc
67+
env:
68+
MAVEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_USER }}
69+
MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN }}
70+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
71+
run: mvn -q --batch-mode -P release -Dr2dbc-spi.version=0.9.1.RELEASE -DclickhouseVersion=${{ env.CH_VERSION }} clean deploy
7472
- name: Create Pre-release on Github
75-
uses: "zhicwu/action-automatic-releases@latest"
76-
with:
77-
repo_token: "${{ secrets.GITHUB_TOKEN }}"
78-
automatic_release_tag: "v${{ github.event.inputs.version }}"
79-
prerelease: true
80-
title: "Release v${{ github.event.inputs.version }}"
81-
files: |
82-
LICENSE
83-
clickhouse-client/target/clickhouse*.jar
84-
clickhouse-data/target/clickhouse*.jar
85-
clickhouse-http-client/target/clickhouse*.jar
86-
clickhouse-jdbc/target/clickhouse*.jar
87-
clickhouse-jdbc/target/bundle/clickhouse*.jar
88-
clickhouse-r2dbc/target/clickhouse*.jar
89-
client-v2/target/client-v2*.jar
73+
env:
74+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
run: |
76+
gh release create "v${{ steps.version.outputs.version }}" \
77+
--prerelease \
78+
--title "Release v${{ steps.version.outputs.version }}" \
79+
LICENSE \
80+
clickhouse-client/target/clickhouse*.jar \
81+
clickhouse-data/target/clickhouse*.jar \
82+
clickhouse-http-client/target/clickhouse*.jar \
83+
clickhouse-jdbc/target/clickhouse*.jar \
84+
clickhouse-jdbc/target/bundle/clickhouse*.jar \
85+
clickhouse-r2dbc/target/clickhouse*.jar \
86+
client-v2/target/client-v2*.jar \
9087
jdbc-v2/target/jdbc-v2*.jar

AGENTS.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ Main modules:
1717

1818
- Minimal supported Java version is 8.
1919
- Follow `docs/ai-review.md` for compatibility, breaking-change, and review instructions.
20+
- Follow `AI_POLICY.md`: take the same responsibility for generated code as hand-written code, don't
21+
submit code you don't understand, and respect licensing when reproducing any external code.
22+
23+
## When to pause and ask
24+
25+
- Before implementing a new feature, a large behavior change, or anything touching public API,
26+
configuration, protocol handling, serialization, or JDBC/R2DBC behavior: check whether an approved
27+
issue or proposal already covers it. If not, say so and ask before implementing instead of proceeding silently — see `CONTRIBUTING.md`.
28+
- Do not modify CI workflow files (`.github/workflows/**`). CI changes are restricted; raise it with the user first.
2029

2130
## Setup and test commands
2231

@@ -29,6 +38,11 @@ Prefer targeted Maven commands over full-repo runs.
2938
- `mvn -pl jdbc-v2 test`
3039
- `mvn -pl clickhouse-data test`
3140

41+
Also compile examples or packaging modules (e.g. `packages/clickhouse-jdbc-all`) when a change affects examples, packaging, public APIs, or other user-facing behavior — running the touched module's tests alone isn't enough.
42+
43+
Run benchmarks under `clickhouse-benchmark` when a change touches a performance-sensitive path (see
44+
`docs/ai-review.md`); this is optional and only worth doing when performance is actually in question.
45+
3246
Avoid broad dependency, formatting, or unrelated cleanup churn unless required by the task.
3347

3448
## Editing expectations
@@ -37,10 +51,40 @@ Avoid broad dependency, formatting, or unrelated cleanup churn unless required b
3751
- Read nearby code and follow existing local patterns before introducing new abstractions.
3852
- Prefer focused tests near the affected module over repo-wide runs.
3953

54+
## Scope discipline
55+
56+
- One logical change per commit/PR: a feature, a bug fix, a refactor, or a doc update. Don't mix.
57+
- Implement the smallest change that solves the problem. Defer polish, extra configuration, and
58+
optimization to follow-ups rather than expanding scope.
59+
- Flag it if a change is growing large: ~400 LOC starts to hurt reviewability, 800+ LOC needs to be
60+
split into smaller changes.
61+
62+
## Testing expectations
63+
64+
- Add negative tests when a change affects validation, error handling, parsing, serialization, or
65+
compatibility-sensitive behavior. The test should prove the failure path produces the correct
66+
result/exception, not just that the original bug no longer reproduces.
67+
- Don't pad coverage: add a test only when it covers a distinct scenario, edge case, module, type,
68+
format, or failure mode. Avoid duplicating existing coverage.
69+
- Favor scenario coverage (boundary values, invalid input, nullable/nested interactions) over raw
70+
coverage percentage.
71+
- Keep tests compact, readable, and focused on the scenario being verified. Reduce duplication in test setup and assertions so a reviewer can quickly see what behavior is being tested.
72+
73+
## Closeout checklist
74+
75+
- Run the affected module's tests locally (see "Setup and test commands") before treating a change as done. Don't hand off a change with failing or unrun tests.
76+
- Update `CHANGELOG.md` for user-facing changes: what the problem was, how it was fixed, and a link to the issue.
77+
- Update `docs/features.md` when a `client-v2` or `jdbc-v2` feature is added, removed, or its behavior intentionally changes.
78+
- In the final summary: state compatibility impact explicitly, describe any user-visible behavior
79+
change, and link the related issue (note that one should be created if it's missing).
80+
4081
## Review expectations
4182

4283
For review requests, follow `docs/ai-review.md` as the shared review standard across AI agents.
4384

85+
Before treating implementation work as done, self-review your own diff against `docs/ai-review.md`
86+
not only when a review is explicitly requested.
87+
4488
## Optional nested AGENTS.md
4589

4690
If a module develops its own conventions, add a nested `AGENTS.md` inside that module.

0 commit comments

Comments
 (0)