Skip to content

chore: drop Altinity/clickhouse-go fork → upstream ClickHouse/clickhouse-go v2.46.0#138

Merged
BorisTyshkevich merged 1 commit into
mainfrom
chore/drop-clickhouse-go-fork
Jun 2, 2026
Merged

chore: drop Altinity/clickhouse-go fork → upstream ClickHouse/clickhouse-go v2.46.0#138
BorisTyshkevich merged 1 commit into
mainfrom
chore/drop-clickhouse-go-fork

Conversation

@BorisTyshkevich
Copy link
Copy Markdown
Collaborator

What

Swaps the github.com/Altinity/clickhouse-go/v2 fork back to upstream github.com/ClickHouse/clickhouse-go/v2 (latest stable, v2.46.0).

Why

The fork was adopted for a single reason: client-side interserver-secret (cluster_secret) authentication (#86, commits dea9214/5c20414). That feature was later dropped in favor of the ch-jwt-verify sidecar (49ecb42). Research confirms the only substantive fork delta is that interserver-secret patch — and we use zero fork-only symbols. Everything in use (HTTP Bearer/JWT auth, __exception__ parsing, TransportFunc, DialStrategy, HttpHeaders) is upstream-identical.

Returning to upstream gets us upstream security fixes + dependabot with nothing to rebase or maintain.

Changes

  • pkg/clickhouse/client.go — two import lines rewritten (the only production file importing the driver).
  • pkg/server/embedded_xml_config_test.go — blank driver-registration import rewritten.
  • go.mod / go.sum — fork require replaced with upstream v2.46.0; go mod tidy.
  • The cluster_secret RemovedConfigKeys deprecation entry (pkg/config/config.go) is intentionally left as-is.

A go.mod replace shim does not work here — Go's internal-package rule breaks across differing module paths. This is a real import-path rewrite.

Verification

  • go build ./... — clean.
  • go test ./... — all green, incl. pkg/clickhouse and the embedded-ClickHouse-backed pkg/server suite.
  • E2E on live otel (image chore-drop-clickhouse-go-fork-86825b1, helm rev 96): via claude.ai against /mcp/otel
    • whoami → non-empty email ✅
    • execute_query SELECT 11 ✅; SELECT count() FROM system.tables215
    • Confirms the runtime OAuth→ClickHouse HTTP auth path (bearer → Basic base64(email:JWT)ch-jwt-verify sidecar) still works on upstream.

Risk

Low. The interserver patch is untouched; all used paths are upstream-identical. Rollback is a branch revert (fork still published at its pinned pseudo-version).

🤖 Generated with Claude Code

…use-go v2.46.0

The fork was adopted solely for client-side interserver-secret
("cluster_secret") auth (PR #86), which was later dropped in favor of the
ch-jwt-verify sidecar (49ecb42). No fork-only symbols remain in use — all
code paths (HTTP Bearer/JWT auth, __exception__ parsing, TransportFunc,
DialStrategy, HttpHeaders) are upstream-identical.

Rewrites the two production import lines in pkg/clickhouse/client.go and the
blank driver-registration import in pkg/server/embedded_xml_config_test.go,
then re-pins go.mod/go.sum to upstream latest (v2.46.0). The cluster_secret
RemovedConfigKeys deprecation entry is intentionally left as-is.

Returns us to upstream security fixes + dependabot with nothing to rebase.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@BorisTyshkevich BorisTyshkevich merged commit 8953895 into main Jun 2, 2026
4 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