Resolve OpenAPI drift: object storage ingestion controls, pg autovacuum config, horizontal autoscaling fields (#287)#288
Merged
Conversation
…um, horizontal autoscaling (#287) Add the 21 struct fields the live spec has grown since the last snapshot refresh, so API data for them is no longer silently dropped: - ClickPipe{,Post,Patch}ObjectStorageSource: skipInitialLoad, startAfter (nullable -> Option, no exemptions needed) - ScalingScheduleEntry{,Request}: numReplicas, replicaMemoryGb (optional via the schemas' required arrays) - ServicePostRequest: minReplicas, maxReplicas, replicaMemoryGb — the horizontal-autoscaling trio, Option<f64> to match the numReplicas sibling, with OPTIONALITY_EXEMPTIONS entries (mutually exclusive with the vertical scaling fields, so must be omittable) - PgConfig: 8 autovacuum_* fields as Option<serde_json::Value> (string- or-number union like every other pgConfig setting), with exemption entries under the existing #163 partial-update rationale Refresh the vendored snapshot, update the exhaustive struct literals with behaviour-preserving defaults (CLI flag exposure is a separate follow-up), extend serde tests for all new fields, and exercise autovacuum_max_workers in the Postgres config integration round-trip. The scaling/horizontal fields are org-feature-gated and skipInitialLoad/startAfter change pipe ingestion behaviour, so those get serde coverage only. Closes #287 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 7, 2026
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 #287 (library-only, per the drift workflow in CLAUDE.md — CLI flag exposure tracked separately).
What
The daily drift check found 21 spec properties with no matching struct field, so API response data for them was silently dropped. This adds all 21 and refreshes the vendored snapshot:
ClickPipe{,Post,Patch}ObjectStorageSourceskipInitialLoad,startAfterOption<bool>/Option<String>(nullable in spec)ScalingScheduleEntry{,Request}numReplicas,replicaMemoryGbOption<i64>/Option<f64>(optional viarequired[])ServicePostRequestminReplicas,maxReplicas,replicaMemoryGbOption<f64>matching thenumReplicassiblingPgConfigautovacuum_*settingsOption<serde_json::Value>(string-or-number union like every other pgConfig field)Optionality exemptions
ServicePostRequest.{minReplicas,maxReplicas,replicaMemoryGb}: the description heuristic infers required, but the horizontal-autoscaling trio is mutually exclusive withnumReplicas/min/maxReplicaMemoryGb/min/maxTotalMemoryGb, so it must be omittable — same rationale as the existingnumReplicasentry.PgConfig.autovacuum_*: covered by the existing partial-update rationale from Cover postgres_instance_config_post + postgres_instance_config_patch #163.Tests
models_test.rsfor all new fields (camelCase wire names, omitted-when-None, string-or-int pgConfig values).autovacuum_max_workersalongsidemax_connections.numReplicas/replicaMemoryGb/horizontal autoscaling require org-level feature enablement) orskipInitialLoad/startAfter(they change ClickPipe ingestion behaviour); those have serde coverage only.commands.rs,support.rs, andintegration_test.rsupdated with behaviour-preserving defaults.Verification
python3 scripts/check-openapi-drift.py --dry-run→ "No drift. Library fully covers the live spec."cargo test -p clickhouse-cloud-api/cargo test -p clickhousectl— all greencargo clippy --workspace --all-targets— no warningscargo check -p clickhouse-cloud-api --features deprecated-fields— both feature configs compile🤖 Generated with Claude Code