Repository navigation
chore(warehouse): move back to upstream clickhouse-go - #7419
Merged
Merged
Conversation
v2 carries every destination that has been migrated, so the second implementation is now dead weight: two files to keep in step, a selector per destination, and a test suite run twice. Deletes the v1 implementation and the selector. The shared schema maps and helpers v1 owned move to schema.go, since v2 has always depended on them. The v2 files keep their names here; renaming them in the same change would make git read the removal as a rewrite of clickhouse.go rather than a delete. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> 🔒 Scanned for secrets using gitleaks 8.29.1
v2 is the only ClickHouse implementation, so the files, the type and the config namespace no longer need to say so. Config is read from Warehouse.clickhouse.v2.* first and Warehouse.clickhouse.* second, so config deployed against the v2 namespace keeps winning while the unprefixed name becomes canonical. .golangci.yml silences clickhouse-go's deprecated Options.Debug by path, so the exclusion follows driver_v2.go to its new name. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> 🔒 Scanned for secrets using gitleaks 8.29.1
The fork existed for one reason: rudder-server linked both clickhouse-go v1 and v2, and each registers the database/sql driver name "clickhouse" in init(), so a single binary panicked before main. The fork registered v2 as "clickhouse-v2" so the two could coexist while the warehouse integration migrated. v1 is gone, so the collision is gone with it. The only v1 use left was a test helper that accepted either version's Exception type; it now takes v2's alone. Nothing referenced the registered driver name — both call sites use OpenDB, which does not go through the registry — so the swap is the import path and the dependency. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> 🔒 Scanned for secrets using gitleaks 8.29.1
gci sorts imports into standard, third-party, rudderlabs and module sections. Swapping the path in place left the driver in the rudderlabs block, which is where the fork belonged but upstream does not. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> 🔒 Scanned for secrets using gitleaks 8.29.1
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7419 +/- ##
==========================================
+ Coverage 83.77% 83.79% +0.01%
==========================================
Files 622 622
Lines 61991 61991
==========================================
+ Hits 51936 51944 +8
+ Misses 10052 10044 -8
Partials 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
saikumarrs
approved these changes
Sep 23, 2026
Base automatically changed from
chore/clickhouse-promote-v2-names-master
to
master
September 23, 2026 11:12
#7418 merged to master as a squash, so this branch's own copies of the v1 removal and the rename no longer matched master's history. Merging master in resolves it; the branch's remaining change is just the move to the upstream clickhouse-go driver. 🔒 Scanned for secrets using gitleaks 8.29.1
This was referenced Sep 28, 2026
Merged
itsmihir
pushed a commit
that referenced
this pull request
Sep 28, 2026
🤖 I have created a release *beep* *boop* --- ## [1.89.0-rc.1](v1.88.0...v1.89.0-rc.1) (2026-09-28) ### Features * **warehouse:** add shared SQL identifier and string literal quoting helpers ([#7406](#7406)) ([814f6db](814f6db)) ### Bug Fixes * **warehouse:** quote azure synapse identifiers ([#7363](#7363)) ([d399fd1](d399fd1)) * **warehouse:** quote bigquery identifiers ([#7366](#7366)) ([89de526](89de526)) * **warehouse:** quote clickhouse identifiers ([#7420](#7420)) ([490c097](490c097)) * **warehouse:** quote deltalake identifiers ([#7368](#7368)) ([08f2f1e](08f2f1e)) * **warehouse:** quote mssql identifiers ([#7364](#7364)) ([695b881](695b881)) * **warehouse:** quote postgres load column list and bind schema existence check ([#7405](#7405)) ([2ff81c1](2ff81c1)) * **warehouse:** quote redshift identifiers ([#7365](#7365)) ([a3e2a3c](a3e2a3c)) * **warehouse:** quote snowflake identifiers ([#7367](#7367)) ([53d4891](53d4891)) ### Miscellaneous * sync release v1.88.0 to main branch ([#7415](#7415)) ([130bdd3](130bdd3)) * **warehouse:** drop the per dialect identifier quoting wrappers ([#7421](#7421)) ([ec0cf52](ec0cf52)) * **warehouse:** drop the v2 suffix now v1 is gone ([#7418](#7418)) ([b759c33](b759c33)) * **warehouse:** move back to upstream clickhouse-go ([#7419](#7419)) ([1a7e776](1a7e776)) * **warehouse:** remove the ClickHouse v1 driver ([#7417](#7417)) ([bd14179](bd14179)) * **warehouse:** replace dead clickhouse blockSize with commitEvery ([#7427](#7427)) ([0806478](0806478)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
itsmihir
pushed a commit
that referenced
this pull request
Sep 29, 2026
🤖 I have created a release *beep* *boop* --- ## [1.89.0](v1.88.0...v1.89.0) (2026-09-28) ### Features * **warehouse:** add shared SQL identifier and string literal quoting helpers ([#7406](#7406)) ([814f6db](814f6db)) ### Bug Fixes * **warehouse:** quote azure synapse identifiers ([#7363](#7363)) ([d399fd1](d399fd1)) * **warehouse:** quote bigquery identifiers ([#7366](#7366)) ([89de526](89de526)) * **warehouse:** quote clickhouse identifiers ([#7420](#7420)) ([490c097](490c097)) * **warehouse:** quote deltalake identifiers ([#7368](#7368)) ([08f2f1e](08f2f1e)) * **warehouse:** quote mssql identifiers ([#7364](#7364)) ([695b881](695b881)) * **warehouse:** quote postgres load column list and bind schema existence check ([#7405](#7405)) ([2ff81c1](2ff81c1)) * **warehouse:** quote redshift identifiers ([#7365](#7365)) ([a3e2a3c](a3e2a3c)) * **warehouse:** quote snowflake identifiers ([#7367](#7367)) ([53d4891](53d4891)) ### Miscellaneous * sync release v1.88.0 to main branch ([#7415](#7415)) ([130bdd3](130bdd3)) * **warehouse:** drop the per dialect identifier quoting wrappers ([#7421](#7421)) ([ec0cf52](ec0cf52)) * **warehouse:** drop the v2 suffix now v1 is gone ([#7418](#7418)) ([b759c33](b759c33)) * **warehouse:** move back to upstream clickhouse-go ([#7419](#7419)) ([1a7e776](1a7e776)) * **warehouse:** remove the ClickHouse v1 driver ([#7417](#7417)) ([bd14179](bd14179)) * **warehouse:** replace dead clickhouse blockSize with commitEvery ([#7427](#7427)) ([0806478](0806478)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Moves the ClickHouse driver import from the RudderStack fork back to upstream
github.com/ClickHouse/clickhouse-go/v2, and drops the v1 dependency.Why the fork existed
From the fork's own README:
That condition is now met. #7417 removes the v1 implementation, so nothing links v1 any more and the driver-name collision cannot happen.
The fork was 4 commits ahead of upstream
v2.48.0and 0 behind: the module path rename, theclickhouse-v2driver registration, a README note, and a CI runner change. Only the registration was functional, and it is precisely what is no longer needed.What changed
driver.go: import swapped togithub.com/ClickHouse/clickhouse-go/v2clickhouse_test.go: same swap;clickhouseExceptionCodedropped its v1 branch, which was the last thing importinggithub.com/ClickHouse/clickhouse-gogo.mod/go.sum: the fork and the v1 driver are gone; upstreamv2.48.0is now a direct dependency (it was already present indirectly at v2.36.0)The registered driver name is not a concern. Both call sites use
clickhouse.OpenDB(opts), which constructs a*sql.DBdirectly and never looks up a name indatabase/sql's registry, so upstream registeringclickhouserather thanclickhouse-v2changes nothing here.Once this merges,
rudderlabs/clickhouse-gocan be archived.Test plan
go build ./...,go vet ./warehouse/...,gofmtcleangolangci-lint(CI-pinned v2.13.2) — 0 issuesrudderlabs/clickhouse-goreferences remain in Go sources,go.modorgo.sumSLOW=1, docker) in CILinear Ticket
https://linear.app/rudderstack/issue/INT-7053/cleanup
Security
Swapping a fork for its upstream at the same version reduces what we carry; the fork's only functional patch was a driver-registration name. TLS and credential handling are upstream's and unchanged.
🤖 Generated with Claude Code