Repository navigation
feat(cli): ClickStack webhook validation and new alert, dashboard and role shapes (#1112) - #1122
Closed
sdairs wants to merge 2 commits into
Conversation
…ok shapes (#1112) - clickstack webhook validate checks a webhook create body without saving it. - Alerts accept channel, channels or both, and inline sources whose chartConfig is checked against its alert variant and tile rules. - Dashboards accept stacked_line tiles, series heatmaps and all four filter types, each checked strictly per variant, with closed-value checks for line interpolation and filter selection limits. - Role permissions reject unknown actions, subjects and condition languages. Co-authored-by: Alasdair Brown <sdairs@users.noreply.github.com>
…sor/openapi-drift-1112-cli-clickstack-c05d Co-authored-by: Alasdair Brown <sdairs@users.noreply.github.com>
cursor
Bot
changed the base branch from
cursor/openapi-drift-1112-api-clickstack-c05d
to
cursor/openapi-drift-1112-cli-clickpipes-c05d
October 21, 2026 21:03
|
|
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.
CLI exposure for the ClickStack part of the #1112 drift remediation. Refs #1112. Stacked on CLI 2 (#1120,
cursor/openapi-drift-1112-cli-clickpipes-c05d), which it merges; the ClickStack library changes it uses are in API 3 (#1121).Follow-up issues
I can't open issues from this environment. This PR's tracking issue would read:
Changes
clickstack webhook validate <service-id> --filesends a webhook create body to the new validate endpoint and prints the result. The CLI's create-body checks run first. Likedashboard validate, it's classified as a write (API key auth) because the API exposes it as POST. A permission declaration is included.channel,channels(1 to 10, no duplicates) or both are accepted. At least one is still required, because an alert with no destination isn't useful and the spec doesn't define one.source: inlineneedschartConfigand rejects dashboard, tile and saved-search IDs.chartConfigwithtileorsaved_searchis rejected.chartConfigis a union, so the CLI checks it strictly against its alert variant (unknown fields, type errors, overlaywhereLanguage,whereon raw SQL), then runs the tile validator for the chart it extends.sourceis still required; see the decision in the API 1 description (fix(api): refresh OpenAPI snapshot; Postgres IP access lists, pgConfig settings and GCP size renames (#1112) #1117).stacked_linetiles (builder and raw SQL) andheatmapMode: seriesheatmaps are validated like the other tiles.lineInterpolationis checked on line and stacked-line tiles.idon update. UnknownminSelections/maxSelectionsvalues are rejected.action,subjectand ClickHouse conditionwhereLanguagevalues are rejected, on top of API 3's strict per-variant check.docs/guides/clickstack.mdcovers webhook validation, inline alerts, the new tile and filter shapes, and role integrations.Tests
webhook validate, plus the shared--file/--config-filecontract.chartConfig, wrong source combinations, unsupported display type, unknown fields, raw-SQLwhere, unknownwhereLanguage, unknown selectaggFn, no channels).lineInterpolation,minSelections: 2, unknown filter types, and create-shaped filters on update.webhook validatesends the exact body with basic auth, prints JSON and human output, and fails locally on an invalid Slack body.Verification
cargo fmt --all --check, bothclickhousectlclippy configurations,cargo check -p clickhousectl --no-default-featuresandcargo test -p clickhousectlall pass, including the help-structure tests. No files added or renamed.