Resolve OpenAPI drift: slow query patterns, Postgres metrics, RPE update (#224)#273
Open
sdairs wants to merge 2 commits into
Open
Resolve OpenAPI drift: slow query patterns, Postgres metrics, RPE update (#224)#273sdairs wants to merge 2 commits into
sdairs wants to merge 2 commits into
Conversation
…ate (#224) Issue #224 was filed against an older live spec; since then the spec drifted further and two of its items were already fixed. This clears the full current drift so the daily check goes green. clickhouse-cloud-api: - Add 5 client methods: slow_query_patterns_get_list, slow_query_pattern_get, postgres_instance_metrics_get, service_clickhouse_setting_delete, click_pipe_reverse_private_endpoint_update. - Add 9 model types: PostgresSlowQueryPattern, PostgresQueryExecution, PostgresSlowQueryPatternDetail, PostgresMetrics, PostgresMetric, PostgresMetricSeries, PostgresMetricDataPoint, License, UpdateReversePrivateEndpoint. - Add 12 newly-spec'd struct fields (exactlyOnce, skipCertVerification, disableTls across ClickPipe source structs; name on PostgresServicePatchRequest). - Remove 2 fields dropped upstream (seekSnapshot on PubSub sources). - Flip ClickPipeMutateDestination.roles to Option<Vec<String>> to match spec. - Add the 4 newly-Beta operations to BETA_OPERATIONS. - Drop 3 now-stale OPTIONALITY_EXEMPTIONS (spec now agrees with the model). - Refresh the vendored OpenAPI snapshot. clickhousectl: - Update request builders for the changed struct fields (behaviour-preserving defaults; CLI flag exposure of the new fields is a separate follow-up). check-openapi-drift.py --dry-run now reports zero across every category. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0bdbb2f. Configure here.
The spec dropped `seekSnapshot` and removed `snapshot` from the PubSub seekType enum (now latest/earliest/timestamp). The field removal landed in this PR but the Snapshot variant was left on ClickPipePostPubSubSourceSeektype / ClickPipePubSubSourceSeektype, where it serialized to "snapshot" — a value the API now rejects. Co-Authored-By: Claude Opus 4.8 (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.

Resolves #224.
Issue #224 was auto-filed by the daily drift check against an older live spec. Since then the spec drifted further (and two of #224's items — the
CustomPrivateDnsMappingtype and thecustomPrivateDnsMappingsfields — were already fixed in a prior PR). This PR clears the full current drift so the daily check goes green and #224 closes cleanly. Library-only, per CLAUDE.md; the only CLI changes are construction sites that wouldn't otherwise compile.clickhouse-cloud-api
5 client methods (
client.rs)slow_query_patterns_get_list,slow_query_pattern_get— Postgres slow query patterns (Beta)postgres_instance_metrics_get— Postgres metrics (Beta)service_clickhouse_setting_delete— delete a ClickHouse setting (Beta)click_pipe_reverse_private_endpoint_update— PATCH a reverse private endpoint9 model types (
models.rs)PostgresSlowQueryPattern,PostgresQueryExecution,PostgresSlowQueryPatternDetailPostgresMetrics,PostgresMetric,PostgresMetricSeries,PostgresMetricDataPointLicense,UpdateReversePrivateEndpoint12 added struct fields —
exactlyOnce,skipCertVerification,disableTlsacross ClickPipe source structs;nameonPostgresServicePatchRequest. Optionality resolved per spec (requiredarray +Optional-description heuristic).2 removed fields —
seekSnapshotdropped upstream fromClickPipePostPubSubSource/ClickPipePubSubSource.1 optionality fix —
ClickPipeMutateDestination.roles→Option<Vec<String>>.Metadata/tests — 4 newly-Beta ops added to
BETA_OPERATIONS; 3 now-staleOPTIONALITY_EXEMPTIONSremoved (spec now agrees with the model); vendored OpenAPI snapshot refreshed.clickhousectl
Request builders updated for the changed struct fields with behaviour-preserving defaults. Exposing the new endpoints/fields as CLI commands/flags is intentionally a separate follow-up.
Verification
cargo build(workspace),cargo build -p clickhouse-cloud-api --features deprecated-fieldscargo test— full suite passes, including all 8 live-spec coverage tests (--ignored)cargo clippy --all-targetsand--all-features— cleanpython3 scripts/check-openapi-drift.py --dry-run— 0 across every category🤖 Generated with Claude Code