Resolve remaining OpenAPI drift from #168 (postgres prometheus + PgConfig)#186
Open
sdairs wants to merge 2 commits into
Open
Resolve remaining OpenAPI drift from #168 (postgres prometheus + PgConfig)#186sdairs wants to merge 2 commits into
sdairs wants to merge 2 commits into
Conversation
Picks up the postgres prometheus endpoints, PgConfig.ssl_min_protocol_version, and the scaling_schedule PATCH-to-DELETE swap from the live ClickHouse Cloud spec. Each is wired into the typed client in the follow-up commits. Closes the snapshot portion of #168. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three drift items the snapshot now exposes: - Add `postgres_instance_prometheus_get` and `postgres_org_prometheus_get` to the typed client, mirroring `organization_prometheus_get` (text/plain response, `Result<String, Error>`). Both endpoints are Beta — added to `BETA_OPERATIONS`. - Add `PgConfig.ssl_min_protocol_version` with a new inline `PgConfigSslMinProtocolVersion` enum (`TLSv1`/`TLSv1.1`/`TLSv1.2`/ `TLSv1.3`), matching how `default_transaction_isolation` and `wal_compression` are modelled. - Swap `scaling_schedule_replace` (PATCH, removed from the spec) for `scaling_schedule_delete` (DELETE). Drop the now-unused `ScalingSchedulePatchRequest` model and update `BETA_OPERATIONS`. wiremock coverage added for each new client method. The three spec-coverage tests that were red on PR #178 (`client_methods_cover_every_openapi_operation`, `beta_operations_match_spec`, `struct_fields_cover_every_spec_property`) now pass. Closes #168. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
sdairs
added a commit
that referenced
this pull request
May 16, 2026
The scalingSchedule endpoint dropped its PATCH operation; only GET, POST, and DELETE remain. The library-side swap (replace_replace → schedule_delete, plus the dropped ScalingSchedulePatchRequest) now lives in the issue-168-postgres-prometheus-and-pg-config base branch (PR #186); this commit just reworks the integration round-trip to delete + assert 404. 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
Refreshes the OpenAPI snapshot and resolves the remaining drift items called out by #168 that PR #178's spec-coverage tests fail on. Splits cleanly from #178 so the scaling_schedule integration coverage and the broader library/snapshot drift stay independent concerns.
Three concrete additions on top of the snapshot refresh:
postgres_instance_prometheus_get/postgres_org_prometheus_get— typed client methods mirroringorganization_prometheus_get(text/plain,Result<String, Error>). Both Beta, added toBETA_OPERATIONS.PgConfig.ssl_min_protocol_version— new field plus inlinePgConfigSslMinProtocolVersionenum (TLSv1/TLSv1.1/TLSv1.2/TLSv1.3), modelled like the other inline PgConfig enums.scaling_schedule_replace(PATCH) →scaling_schedule_delete(DELETE) — the live spec dropped PATCH. Also drops the now-unusedScalingSchedulePatchRequestmodel and updatesBETA_OPERATIONS. Overlaps with the equivalent commits in Add scaling_schedule round-trip coverage to service suite #178; Add scaling_schedule round-trip coverage to service suite #178 should rebase on top of this and drop its now-redundant library changes (its integration test stays).wiremockcoverage added for each new client method.Why this unblocks #178
#178's
spec_coverage_test.rswas failing on three assertions:client_methods_cover_every_openapi_operation— missingpostgres_instance_prometheus_get/postgres_org_prometheus_getbeta_operations_match_spec— same two ops absent fromBETA_OPERATIONSstruct_fields_cover_every_spec_property—PgConfig.ssl_min_protocol_versionmissingAll three pass with this PR; rebasing #178 onto an updated
md/add-clickpipes-supportturns it green.Test plan
cargo build -p clickhouse-cloud-apicargo clippy -p clickhouse-cloud-api --tests(no new warnings)cargo test -p clickhouse-cloud-api— 118+86+6 pass, ignored live tests still skippedcargo build(whole workspace) +cargo test -p clickhousectlcleanpython3 scripts/regenerate-beta-lists.pydiffs clean againstmeta.rs🤖 Generated with Claude Code