You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
Titled as a test addition, this PR verifies that the V1 http client and V1 JDBC driver correctly send custom HTTP headers (via custom_http_headers) using new WireMock-based unit tests that assert the X-ClickHouse-Replica-Tag header routes to a specific replica. Alongside the tests it adds a new public constant HEADER_REPLICA_TAG to both ClickHouseHttpOption (clickhouse-http-client) and ClickHouseHttpProto (client-v2), consolidates the wiremock version into a parent-pom property (adding wiremock as a new test dependency of clickhouse-jdbc), and substantially expands docs (docs/clickhouse-docs/client.mdx, jdbc.mdx) with custom-header usage and a new "ClickHouse Cloud sticky sessions" section for client-v2, jdbc-v2, V1 client, and V1 JDBC.
What this impacts
clickhouse-http-client: new public constant ClickHouseHttpOption.HEADER_REPLICA_TAG (main source, additive) + new WireMock unit test.
client-v2: new public constant ClickHouseHttpProto.HEADER_REPLICA_TAG (main source, additive only — no runtime logic touched).
clickhouse-jdbc: new WireMock test dependency and V1 connection test.
Build: wiremock version centralized in root pom.xml property (4 module poms touched).
Docs: significant rewrite/expansion of custom-header and Cloud sticky-session documentation for both v1 and v2 surfaces.
Concerns
Borderline cross-module footprint: 4+ modules touched (clickhouse-http-client, clickhouse-jdbc, client-v2, jdbc-v2), including main sources in two of them. Downgraded from High because the main-source changes are two inert additive constants and the rest is pom/test/docs — but this drove the medium call.
Mild intent drift / bundling: title says "custom header tests," but the PR also adds new public API surface (constants), a large docs overhaul, and a build refactor. No linked issue for the new Cloud replica-tag feature surface.
Total diff (~357 additions) approaches but stays under the large-diff threshold; splitting docs from tests would have simplified review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
X-ClickHouse-Replica-Tagheader constant toClientHttpOptionsandcom.clickhouse.client.api.http.ClickHouseHttpProtoChecklist
Delete items not relevant to your PR: