Skip to content

fix(api): ClickStack alert list filters, minAutoGranularity and App subject (#1466) - #1478

Open
sdairs wants to merge 1 commit into
claude/drift-1466-api-postgresfrom
claude/drift-1466-api-clickstack
Open

sdairs wants to merge 1 commit into
claude/drift-1466-api-postgresfrom
claude/drift-1466-api-clickstack

Conversation

@sdairs

@sdairs sdairs commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Fixes #1466. API PR 3 of 3, stacked on the Postgres PR. CLI exposure follows in #1472.

  • Breaking: click_stack_list_alerts gains tag: &[&str], search: Option<&str>, source: &[ClickStackListAlertsSource] and state: &[ClickStackListAlertsState]. Slice elements are sent as repeated query parameters. New enums, each with Unknown(String), Display and VALUES.
  • min_auto_granularity on ClickStack metric and PromQL sources, including their response types.
  • ClickStackCASLPermissionSubject::App.
  • CLI: compile-only; alert list sends no filter params (pinned).

Drift against the vendored snapshot is zero after this PR, and every gate passes. The live spec has since moved again: Postgres private endpoints and organization_roles_get_list paging are new. That drift is left for a follow-up issue.

🤖 Generated with Claude Code


Note

Medium Risk
Breaking click_stack_list_alerts signature affects all Rust consumers; changes are API-model alignment with broad test coverage and low runtime risk beyond compile-time migration.

Overview
Syncs the ClickHouse Cloud API crate with new ClickStack OpenAPI fields. click_stack_list_alerts is a breaking change: callers must pass four filter arguments (tag, search, source, state); empty/None preserves unfiltered list behavior, with repeated query params and new ClickStackListAlertsSource / ClickStackListAlertsState enums.

Metric and PromQL source request/response types gain optional min_auto_granularity, plumbed through TryFrom for write-back. ClickStackCASLPermissionSubject adds App. clickhousectl alert list still sends no filters; tests and changelog document migration.

Reviewed by Cursor Bugbot for commit 307179e. Bugbot is set up for automated code reviews on this repo. Configure here.

…pp subject

- click_stack_list_alerts gains tag/search/source/state filters (repeated
  query parameters for the array ones), with new ClickStackListAlertsSource
  and ClickStackListAlertsState enums. Breaking signature change.
- ClickStackMetricSource, ClickStackPromqlSource and their Response types
  gain optional min_auto_granularity; TryFrom carries it back.
- ClickStackCASLPermissionSubject adds App.
- CLI: `cloud clickstack alert list` passes no filters; a request-shape test
  pins that no filter parameter is sent.

Fixes #1466

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

1 participant