Add ClickStack cloud commands (closes #118)#144
Draft
sdairs wants to merge 4 commits into
Draft
Conversation
Wires up `cloud clickstack {dashboard|alert|source|webhook}` with full CRUD on
top of the existing typed library client, which already covered all 12
endpoints. Dashboard create/update take --from-file JSON (tile layout is too
nested for flags); alert create/update are flag-based with --channel-type
selecting email or webhook. Adds untagged-enum round-trip tests for the
trickier model shapes and a live-API integration test that provisions a
service and exercises CRUD before tearing down.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Spec drift commit b3e6b64 (merged to main after this branch forked) added a required `threshold_max: Option<f64>` field to both ClickStackCreateAlertRequest and ClickStackUpdateAlertRequest. The full field-init (no ..Default::default()) in clickstack.rs broke after rebase. Expose as --threshold-max so the surface stays complete. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2772123 to
ca2c830
Compare
Clippy 1.95 (CI default) flags the nested if-in-match pattern as collapsible_match. Local clippy 1.93 was too lenient to catch it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7.5.0 used Linux-only \`__errno_location\` and broke \`cargo build\` on Darwin (local dev + CI Install Test on macos-14/15). 7.5.2 fixes the libc call. Constraint tightened to "7.5.2" so cargo can't pick the broken release again. Closes #145. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
cloud clickstack {dashboard|alert|source|webhook}covering all 12 ClickStack endpoints.--from-file <path>JSON (also accepts-for stdin) with optional--name/--tagoverrides — tile layout is too nested for flags.--channel-typeselectsemail(requires--email) orwebhook(requires--webhook-id).cloud_clickstack_crud_lifecycle(gated by#[ignore]) provisions a service, runs full dashboard + alert CRUD, lists sources/webhooks, and tears down via the existingCleanupRegistry. Wired into.github/workflows/cloud-integration.yml.ClickStackAlertChannelemail/webhook variants, dashboard create with markdown tile,ClickStackSource/ClickStackWebhookvariant dispatch).Notes for reviewers
clickhouse-cloud-apifrom a prior spec refresh; this PR is CLI + tests only.spec_coverage_testconfirms no drift.cargo test -p clickhouse-cloud-api --test integration_clickstack_test -- --ignored --nocapturepasses in CI before approving.integration_clickstack_test.rs.Test plan
cargo build --workspace— green locallycargo test --workspace— 261 CLI tests + 93 model tests + spec_coverage all green locallycargo clippy -p clickhousectl -- -D warningsand-p clickhouse-cloud-api -- -D warnings— both green locally (matches CI)cargo test -p clickhouse-cloud-api --test integration_clickstack_test -- --ignored --nocaptureruns in CI on this PR via the existingcloud-integration.ymlworkflow (paths-trigger coverscrates/clickhouse-cloud-api/tests/**)cloud clickstack source list <svc-id>, dashboard create/list/delete with a fixture JSON, alert create with bothemailandwebhookchannels🤖 Generated with Claude Code