Skip to content

feat(warehouse): add clickhouse driver interface - #7296

Merged
achettyiitr merged 5 commits into
masterfrom
harness/INT-7016-feat-warehouse-add-clickhouse-d-ea545394
Aug 24, 2026
Merged

achettyiitr merged 5 commits into
masterfrom
harness/INT-7016-feat-warehouse-add-clickhouse-d-ea545394

Conversation

@rudder-devbox

@rudder-devbox rudder-devbox Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Description

Narrows this PR to the ClickHouse SQL driver interface surface only:

  • Replaces direct *sqlmw.DB usage on Clickhouse.DB with a package-local clickhouseDriver interface over the SQL wrapper methods the integration already uses.
  • Adds SqlDB() to sqlquerywrapper.DB so Connect can return the underlying *sql.DB without reaching into wrapper internals.
  • Updates Connect to use db.SqlDB() and adds focused coverage for the wrapper accessor.

Linear Ticket

INT-7016

Security

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

@rudder-devbox

rudder-devbox Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

👋 I'm rudder-devbox. I opened this PR from a Linear ticket.

Mention @devbox or @rudder-devbox and I'll act on it — on a top-level PR comment,
in a review summary, or on an inline comment on the diff. Without a mention I won't see it.

@rudder-devbox

rudder-devbox Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

I fixed and pushed the CI failure.

Root cause from the logs: the lint job failed on three ClickHouse issues: warehouse/integrations/clickhouse/driver_test.go:91 returned nil, nil (nilnil), clickhouse.go:512 had registerTLSConfig returning an error that was always nil (unparam), and clickhouse.go:393 had unused Config.toV1DSN (unused). The generated-files job then showed go mod tidy changing go.mod by removing github.com/ClickHouse/clickhouse-go v1.5.4 and github.com/cloudflare/golz4.

Fix: removed the unused DSN helper and committed the tidy module changes, made TLS CA parsing return a real error for invalid PEM, and changed the unreachable test stub to return a non-nil error. I validated with go test -count 1 ./warehouse/integrations/middleware/sqlquerywrapper ./warehouse/integrations/clickhouse, go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run ./warehouse/integrations/clickhouse -v, and git diff --check.

Commit: 85d19f9

@rudder-devbox

rudder-devbox Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Knowledge distillation completed

@rudder-devbox

rudder-devbox Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

I fixed and pushed the new CI failure.

Root cause from the downloaded log: the Correct generated files job failed after make fmt when git diff --exit-code showed warehouse/integrations/clickhouse/clickhouse.go being rewritten by gofumpt: func registerTLSConfig(name string, certificate string) needed to be func registerTLSConfig(name, certificate string). The log then emitted Not formatted files. Ensure you have run make fmt and committed the files locally.

Fix: applied the exact gofumpt formatting change. I validated with go run mvdan.cc/[email protected] -l -w -extra warehouse/integrations/clickhouse/clickhouse.go, go test -count 1 ./warehouse/integrations/clickhouse, go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run ./warehouse/integrations/clickhouse -v, and git diff --check.

Commit: b75e23a

@rudder-devbox

rudder-devbox Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Knowledge distillation completed

@rudder-devbox

rudder-devbox Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

⚠ CI failed on Tests but I could not fetch any job logs to diagnose the failure.

Errors encountered:
No details available.

View the run

@achettyiitr achettyiitr changed the title feat(warehouse): add clickhouse driver seam feat(warehouse): add clickhouse driver interface Aug 21, 2026
@achettyiitr
achettyiitr marked this pull request as ready for review August 21, 2026 12:04
@codecov

codecov Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.68%. Comparing base (f2655fb) to head (a3f4f19).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7296      +/-   ##
==========================================
- Coverage   80.12%   79.68%   -0.44%     
==========================================
  Files         601      601              
  Lines       67217    67217              
==========================================
- Hits        53857    53562     -295     
- Misses      10184    10504     +320     
+ Partials     3176     3151      -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.

🔒 Scanned for secrets using gitleaks 8.29.1
@achettyiitr
achettyiitr merged commit 239d9a4 into master Aug 24, 2026
75 checks passed
@achettyiitr
achettyiitr deleted the harness/INT-7016-feat-warehouse-add-clickhouse-d-ea545394 branch August 24, 2026 09:18
This was referenced Aug 24, 2026
itsmihir pushed a commit that referenced this pull request Aug 24, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.84.0-rc.1](v1.83.0...v1.84.0-rc.1)
(2026-08-24)


### Features

* add AGENTS.md for agent management and reference
([#7290](#7290))
([2d28b32](2d28b32))
* **processor:** report duplicate events as dedup/filtered metrics
([#7280](#7280))
([f2655fb](f2655fb))
* **warehouse:** add clickhouse driver interface
([#7296](#7296))
([239d9a4](239d9a4))


### Bug Fixes

* **processor:** proc destination hydration omitted destination's
original id
([#7297](#7297))
([f389df4](f389df4))
* **warehouse:** close load file descriptor in identity uploadFile
([#7186](#7186))
([bfd8bc9](bfd8bc9))


### Miscellaneous

* handle oversized reporting payloads
([#7293](#7293))
([7a83281](7a83281))
* pyt security hardening
([#7272](#7272))
([e13b731](e13b731))

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


##
[1.84.0](v1.83.0...v1.84.0)
(2026-08-24)


### Features

* add AGENTS.md for agent management and reference
([#7290](#7290))
([2d28b32](2d28b32))
* **processor:** report duplicate events as dedup/filtered metrics
([#7280](#7280))
([f2655fb](f2655fb))
* **warehouse:** add clickhouse driver interface
([#7296](#7296))
([239d9a4](239d9a4))


### Bug Fixes

* **processor:** proc destination hydration omitted destination's
original id
([#7297](#7297))
([f389df4](f389df4))
* **warehouse:** close load file descriptor in identity uploadFile
([#7186](#7186))
([bfd8bc9](bfd8bc9))


### Miscellaneous

* handle oversized reporting payloads
([#7293](#7293))
([7a83281](7a83281))
* pyt security hardening
([#7272](#7272))
([e13b731](e13b731))

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

4 participants