Remove storageSize from Postgres create/update requests#236
Merged
Conversation
The Cloud OpenAPI spec dropped storageSize from the Postgres request bodies (PostgresServicePostRequest, PostgresServicePatchRequest, BasePostgresService, PostgresServiceListItem); it remains only on the PostgresService response. models.rs was stale relative to the already- refreshed vendored snapshot. - Drop storage_size from the four stale request/list model structs, keep it on PostgresService (still returned and displayed in `get`). - Remove the required --storage-gb flag from `postgres create` and the optional one from `postgres update`, plus option structs, request builders, and dispatch. - Update unit/wiremock/integration tests and README examples. Closes #235 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sdairs
added a commit
that referenced
this pull request
Jun 5, 2026
Bring models.rs in line with the vendored OpenAPI snapshot, clearing the 5 findings surfaced by the new struct_fields_have_no_extras_vs_spec detector (#237). EXTRA_FIELD_EXEMPTIONS stays empty — these are fixed, not exempted. - PostgresServicePatchRequest: drop name/provider/region/postgresVersion; the live spec only allows size/haType/tags. The `postgres update` CLI surface loses the matching --name/--region/--provider/--pg-version flags (same class of stale field as the storageSize cleanup in #235/#236). - ScimEnterpriseManager: drop the code-only $ref attribute absent from the ClickHouse spec. Updates the affected library and CLI tests plus the README update example. struct_fields_have_no_extras_vs_spec now passes. 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.
What
The ClickHouse Cloud OpenAPI spec no longer includes
storageSizeon the Postgres request bodies. It remains only on thePostgresServiceresponse.clickhouse-cloud-api/models.rsstill carried the field on the request structs — stale relative to the vendored snapshot (clickhouse_cloud_openapi.json), which is already correct. The CLI also exposed a required--storage-gbflag onpostgres create, forcing users to pass a value the API no longer accepts.Changes
models.rs): removestorage_sizefromPostgresServicePostRequest,PostgresServicePatchRequest,BasePostgresService, andPostgresServiceListItem. Kept onPostgresService(still returned by the API and rendered inpostgres get).--storage-gbflag frompostgres create(was required) andpostgres update(was optional), plus the option structs, request builders, andmain.rsdispatch.postgres create/updateexamples and the options table; create example now uses--size c6gd.xlarge --pg-version 18.Verified the live spec confirms
storageSizeis gone from the request schemas (present only onPostgresService). The vendored snapshot already reflected this, so no snapshot refresh was needed.cargo build,cargo clippy --all-targets, and the unit/snapshot/wiremock tests pass.Closes #235
🤖 Generated with Claude Code
Note
Medium Risk
Changes required CLI flags and create/update API payloads for managed Postgres; users and automation must stop passing
--storage-gb, but read paths and response fields are unchanged.Overview
Aligns Postgres create/update with the Cloud API by dropping
storageSizefrom request payloads and the CLI’s--storage-gbflag (previously required on create, optional on update).clickhouse-cloud-api: removesstorage_sizefromPostgresServicePostRequest,PostgresServicePatchRequest,BasePostgresService, andPostgresServiceListItem; it stays onPostgresServiceresponses sopostgres getcan still show storage.clickhousectl: wires create/update without storage; README examples and the options table drop storage and refresh sample size/version.Tests (clap, wiremock, serialization, integration/CDC) no longer send or assert
storageSizeon writes.Reviewed by Cursor Bugbot for commit 584d6d4. Bugbot is set up for automated code reviews on this repo. Configure here.