Repository navigation
feat: add SQL_QUERY dashboard filter type to the schema - #3672
karl-power wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: dde72dc The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🟡 Tier 3 — StandardIntroduces new logic, modifies core functionality, or touches areas with non-trivial risk. Why this tier:
Review process: Full human review — logic, architecture, edge cases. Stats
|
Add a variable-only dashboard filter whose dropdown values come from the first column of a ClickHouse query run on a connection. - Add SqlQueryDashboardFilterSchema and the isSqlQueryFilter guard - Validate the template's macros and variable references, rejecting $__sourceTable and $__filters - Export the filter's connection as a name in dashboard templates - Keep the type out of the external API and MCP for now Refs HDX-5524
989bc97 to
f94e9ab
Compare
E2E Test Results✅ All tests passed • 467 passed • 1 skipped • 1109s
Tests ran across 4 shards in parallel. |
Duplicate code analysis1 new clone introduced by this PR.
If one of these duplicates a helper that already exists, import it instead jscpd compared this branch against |
PR Review
4 finding(s): 🔴 0 critical · 🟠 1 major · 🔵 3 minor 3 posted as inline comment(s) on the changed lines. 1 listed below. Findings outside the changed lines1 minor
Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides. |
Deep ReviewScope: PR #3672 — adds the ✅ No critical issues found. The schema addition is additive and well-tested, exhaustive switches were updated, the internal-only exclusion mirrors the established 🟡 P2 — recommended
🟡 P2 — pre-existing (surfaced, does not block)
🔵 P3 nitpicks (3)
Reviewers (11): correctness, testing, maintainability, project-standards, kieran-typescript, api-contract, adversarial, julik-frontend-races, previous-comments, ce-agent-native-reviewer, ce-learnings-researcher. Testing gaps:
No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
Summary
Adds the
SQL_QUERYdashboard filter type to the schema: a variable-only filter whose dropdown values come from the first column of a free-form ClickHouse query. This is the first of four PRs; it adds the data model and validation only, so the filter can't be created or used in the UI yet.SqlQueryDashboardFilterSchemastores aconnectionID and asqlTemplate, withisBroadcastEnabled: falseandisVariableEnabled: truefixed, since there's no column to broadcast.isSqlQueryFiltertype guard.validateDashboardFilterQueriesexpands the template with empty variable selections and flags$__sourceTable/$__filters(the filter has no source) and any macro or variable expansion error. The SQL itself isn't parsed; ClickHouse reports syntax errors when it runs.ADHOC, until they expose it.How to test on Vercel preview
N/A — non-UI change
References