Skip to content

feat(warehouse): clickhouse v2 connection and schema - #7301

Merged
achettyiitr merged 5 commits into
masterfrom
feat.clickhouse-v2-connection
Aug 25, 2026
Merged

achettyiitr merged 5 commits into
masterfrom
feat.clickhouse-v2-connection

Conversation

@achettyiitr

@achettyiitr achettyiitr commented Aug 24, 2026 •

Copy link
Copy Markdown
Member

Description

First of four PRs replacing the ClickHouse clickhouse-go v1.5.4 driver with the fork of v2, github.com/rudderlabs/clickhouse-go/v2. This one adds the ClickhouseV2 type and everything needed to reach a server: its configuration, Setup / Connect / Cleanup, TestConnection, TLS setup and CreateSchema.

The v1 implementation in clickhouse.go is untouched. v2 lives beside it in the same package as *_v2.go files, so the two can run side by side during the rollout.

Nothing constructs NewV2 yet, so this changes no behaviour. Driver selection arrives in the last PR of the stack, behind Warehouse.clickhouse.useV2Driver, defaulting to false.

go.mod / go.sum carry the fork here rather than in a separate dependency PR: verify.yml runs go mod tidy and fails on a diff, so a module with no importer would be dropped again.

The stack — splitting #7299:

  1. this PR — connection and schema
  2. DDL operations — branches off this one
  3. loading — branches off this one, independent of 2, either can merge first
  4. feature flag and test coverage — after 2 and 3

Linear Ticket

  • Resolves INT-7019, INT-7018

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

Adds the ClickhouseV2 type against the forked clickhouse-go v2 driver: its
configuration, connection handling, TLS setup and the schema entry points.

Nothing constructs it yet, so this changes no behaviour. DDL, loading and the
test coverage follow as separate PRs.
🔒 Scanned for secrets using gitleaks 8.29.1
@achettyiitr
achettyiitr force-pushed the feat.clickhouse-v2-connection branch from 1de6d74 to a51afbb Compare August 25, 2026 05:00
@achettyiitr
achettyiitr requested a review from saikumarrs August 25, 2026 05:00
@achettyiitr
achettyiitr force-pushed the feat.clickhouse-v2-connection branch from b2ee28b to 487616e Compare August 25, 2026 08:02
🔒 Scanned for secrets using gitleaks 8.29.1
@achettyiitr
achettyiitr force-pushed the feat.clickhouse-v2-connection branch from 487616e to e6cb13f Compare August 25, 2026 08:13
@achettyiitr
achettyiitr merged commit 2eb1fa6 into master Aug 25, 2026
74 checks passed
@achettyiitr
achettyiitr deleted the feat.clickhouse-v2-connection branch August 25, 2026 08:48
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 157 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.93%. Comparing base (fa102b7) to head (e6cb13f).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
warehouse/integrations/clickhouse/clickhousev2.go 0.00% 104 Missing ⚠️
warehouse/integrations/clickhouse/driver_v2.go 0.00% 53 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7301      +/-   ##
==========================================
+ Coverage   79.73%   79.93%   +0.20%     
==========================================
  Files         601      604       +3     
  Lines       67308    67494     +186     
==========================================
+ Hits        53669    53953     +284     
+ Misses      10481    10358     -123     
- Partials     3158     3183      +25     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

mihir20 pushed a commit that referenced this pull request Aug 31, 2026
# Description

First of four PRs replacing the ClickHouse `clickhouse-go v1.5.4` driver
with the fork of v2, `github.com/rudderlabs/clickhouse-go/v2`. This one
adds the `ClickhouseV2` type and everything needed to reach a server:
its configuration, `Setup` / `Connect` / `Cleanup`, `TestConnection`,
TLS setup and `CreateSchema`.

The v1 implementation in `clickhouse.go` is untouched. v2 lives beside
it in the same package as `*_v2.go` files, so the two can run side by
side during the rollout.

Nothing constructs `NewV2` yet, so this changes no behaviour. Driver
selection arrives in the last PR of the stack, behind
`Warehouse.clickhouse.useV2Driver`, defaulting to false.

`go.mod` / `go.sum` carry the fork here rather than in a separate
dependency PR: `verify.yml` runs `go mod tidy` and fails on a diff, so a
module with no importer would be dropped again.

**The stack** — splitting #7299:

1. **this PR** — connection and schema
2. DDL operations — branches off this one
3. loading — branches off this one, independent of 2, either can merge
first
4. feature flag and test coverage — after 2 and 3

## Linear Ticket

- Resolves INT-7019, INT-7018

## Security

- [x] The code changed/added as part of this pull request won't create
any security issues with how the software is being used.
This was referenced Aug 31, 2026
itsmihir pushed a commit that referenced this pull request Aug 31, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.85.0-rc.1](v1.84.0...v1.85.0-rc.1)
(2026-08-31)


### Features

* backend config v2 resolver with stub mapper
([#7275](#7275))
([267b973](267b973))
* **warehouse:** clickhouse v2 connection and schema
([#7301](#7301))
([2eb1fa6](2eb1fa6))
* **warehouse:** clickhouse v2 ddl operations
([#7302](#7302))
([f2887c5](f2887c5))
* **warehouse:** clickhouse v2 loading
([#7303](#7303))
([3e48618](3e48618))
* **warehouse:** enable the clickhouse v2 driver behind a flag
([#7311](#7311))
([3ce1da5](3ce1da5))


### Bug Fixes

* race conditions while counting initial pending events can cause wrong
counting
([#7292](#7292))
([3efa718](3efa718))
* replay destinations not using the config corresponding to their
connected source type
([#7307](#7307))
([ee7aa93](ee7aa93))
* **router:** abort router-transform on proactive invalid_grant instead
of retrying (INT-6779)
([#7175](#7175))
([4d7348d](4d7348d))
* tracking plan merged config is cached without its event type
([#7314](#7314))
([624dd5c](624dd5c))


### Miscellaneous

* setattr/delattr hardening
([#7291](#7291))
([2855af4](2855af4))
* sync release v1.84.0 to main branch
([#7306](#7306))
([fa102b7](fa102b7))
* webhook reasons
([#7294](#7294))
([c298d59](c298d59))

---
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 1, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.85.0](v1.84.0...v1.85.0)
(2026-08-31)


### Features

* backend config v2 resolver with stub mapper
([#7275](#7275))
([267b973](267b973))
* **warehouse:** clickhouse v2 connection and schema
([#7301](#7301))
([2eb1fa6](2eb1fa6))
* **warehouse:** clickhouse v2 ddl operations
([#7302](#7302))
([f2887c5](f2887c5))
* **warehouse:** clickhouse v2 loading
([#7303](#7303))
([3e48618](3e48618))
* **warehouse:** enable the clickhouse v2 driver behind a flag
([#7311](#7311))
([3ce1da5](3ce1da5))


### Bug Fixes

* race conditions while counting initial pending events can cause wrong
counting
([#7292](#7292))
([3efa718](3efa718))
* replay destinations not using the config corresponding to their
connected source type
([#7307](#7307))
([ee7aa93](ee7aa93))
* **router:** abort router-transform on proactive invalid_grant instead
of retrying (INT-6779)
([#7175](#7175))
([4d7348d](4d7348d))
* tracking plan merged config is cached without its event type
([#7314](#7314))
([624dd5c](624dd5c))


### Miscellaneous

* setattr/delattr hardening
([#7291](#7291))
([2855af4](2855af4))
* sync release v1.84.0 to main branch
([#7306](#7306))
([fa102b7](fa102b7))
* webhook reasons
([#7294](#7294))
([c298d59](c298d59))

---
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>
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.

3 participants