test: clickhouse — finops query history, dbt profiles, and registry error hints#624
test: clickhouse — finops query history, dbt profiles, and registry error hints#624anandgupta42 wants to merge 1 commit intomainfrom
Conversation
…rror hints Cover ClickHouse paths added in PR #574 that had zero test coverage: - buildHistoryQuery ClickHouse branch: SQL template correctness, integer clamping for days/limit (prevents NaN/float injection into string-interpolated SQL), and boundary values - dbt profiles.yml ClickHouse adapter mapping (prevents silent connection skip) - Registry known-unsupported DB hints (cassandra, cockroachdb, timescaledb) and generic unsupported error message Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> https://claude.ai/code/session_01CB7m2CjEFJbJia3ZJKZpHN
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTest coverage additions validate improved database connection error messaging, parser functionality for dbt profiles with ClickHouse adapters, and ClickHouse history query generation with parameter clamping and type safety. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
❌ Tests — Failures DetectedTypeScript — 15 failure(s)
cc @anandgupta42 |
Summary
Cover ClickHouse paths added in PR #574 that had zero test coverage, plus registry error hint tests for known-unsupported database types.
1.
buildHistoryQueryClickHouse branch —src/altimate/native/finops/query-history.ts(3 new tests)The ClickHouse finops query history path uses
__DAYS__/__LIMIT__string interpolation (unlike other warehouses that use bind parameters), making input clamping correctness critical. Zero tests existed. New coverage includes:today() - NaNorLIMIT 50.5in generated SQL0triggers|| 30/|| 100defaults)2.
parseDbtProfilesClickHouse adapter —src/altimate/native/connections/dbt-profiles.ts(1 new test)The
clickhouseentry was added toADAPTER_TYPE_MAPbut had no test verifying it maps correctly through the fullparseDbtProfilesflow. A user with a ClickHouse adapter in their dbtprofiles.ymlwould get silently skipped connections if this mapping broke. New coverage includes:3. Registry known-unsupported database hints —
src/altimate/native/connections/registry.ts(4 new tests)The
KNOWN_UNSUPPORTEDmap (cassandra, cockroachdb, timescaledb) provides friendlier error messages than the generic "Unsupported database type" error, but had zero test coverage. New coverage includes:type: postgresinsteadtype: postgresinsteadType of change
Issue for this PR
N/A — proactive test coverage for ClickHouse paths added in PR #574
How did you verify your code works?
Checklist
https://claude.ai/code/session_01CB7m2CjEFJbJia3ZJKZpHN
Summary by CodeRabbit