Skip to content

Resolve remaining OpenAPI drift from #168 (postgres prometheus + PgConfig)#186

Open
sdairs wants to merge 2 commits into
md/add-clickpipes-supportfrom
issue-168-postgres-prometheus-and-pg-config
Open

Resolve remaining OpenAPI drift from #168 (postgres prometheus + PgConfig)#186
sdairs wants to merge 2 commits into
md/add-clickpipes-supportfrom
issue-168-postgres-prometheus-and-pg-config

Conversation

@sdairs
Copy link
Copy Markdown
Collaborator

@sdairs sdairs commented May 16, 2026

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 mirroring organization_prometheus_get (text/plain, Result<String, Error>). Both Beta, added to BETA_OPERATIONS.
  • PgConfig.ssl_min_protocol_version — new field plus inline PgConfigSslMinProtocolVersion enum (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-unused ScalingSchedulePatchRequest model and updates BETA_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).

wiremock coverage added for each new client method.

Why this unblocks #178

#178's spec_coverage_test.rs was failing on three assertions:

  • client_methods_cover_every_openapi_operation — missing postgres_instance_prometheus_get / postgres_org_prometheus_get
  • beta_operations_match_spec — same two ops absent from BETA_OPERATIONS
  • struct_fields_cover_every_spec_propertyPgConfig.ssl_min_protocol_version missing

All three pass with this PR; rebasing #178 onto an updated md/add-clickpipes-support turns it green.

Test plan

  • cargo build -p clickhouse-cloud-api
  • cargo clippy -p clickhouse-cloud-api --tests (no new warnings)
  • cargo test -p clickhouse-cloud-api — 118+86+6 pass, ignored live tests still skipped
  • cargo build (whole workspace) + cargo test -p clickhousectl clean
  • python3 scripts/regenerate-beta-lists.py diffs clean against meta.rs

🤖 Generated with Claude Code

sdairs and others added 2 commits May 16, 2026 13:39
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 sdairs requested a review from iskakaushik as a code owner May 16, 2026 12:40
@sdairs sdairs temporarily deployed to cloud-integration May 16, 2026 12:40 — with GitHub Actions Inactive
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>
@sdairs sdairs linked an issue May 16, 2026 that may be closed by this pull request
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.

OpenAPI drift: 14 gaps between live spec and library

1 participant