Repository navigation
Conversation
Co-authored-by: Alasdair Brown <sdairs@users.noreply.github.com>
PostgresService, its create and patch requests gain ipAccessList with the
new PostgresIpAccessListEntry{,Response}, PostgresIpAccessListPatch and
PostgresIpAccessListRuleReference models, plus a TryFrom write-back.
PgSize follows the spec's local-SSD renames for c4/c4a/c4d and z3 sizes.
Co-authored-by: Alasdair Brown <sdairs@users.noreply.github.com>
Compile fix only: the CLI sends ip_access_list: None, so the wire request is unchanged; omission keeps create's allow-all default. Co-authored-by: Alasdair Brown <sdairs@users.noreply.github.com>
PgConfig and PgConfigResponse gain 22 settings, with closed enums for default_toast_compression, enable_parallel_hash, io_method and log_lock_waits, carried through the From write-back and the partial-schema optionality exemptions. Co-authored-by: Alasdair Brown <sdairs@users.noreply.github.com>
This was referenced Oct 21, 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.
Part 1 of 3 of the API side of the #1112 drift remediation. Refs #1112.
Plan
The live spec reported 290 actionable findings in three CLI command groups. While I worked, it gained 22 more
pgConfigsettings, which I included. Following theopenapi-drift-remediationskill, there's one API PR and one CLI PR per group. The six PRs form a single linear stack: the three API PRs first, then the three CLI PRs. Each CLI branch merges the branch below it, so every PR's diff shows only its own changes.cursor/openapi-drift-remediation-1112-c05dmainipAccessList, 22 newpgConfigsettings,PgSizerenamescursor/openapi-drift-1112-api-clickpipes-c05dsyncCroncursor/openapi-drift-1112-api-clickstack-c05dclick_stack_validate_webhook, permission/filter/heatmap unions, inline alert chart configs, stacked-line tiles, remaining fields and enum values, plus one analyzer rulecursor/openapi-drift-1112-cli-postgres-c05dpostgres create --ip-allow/--block-public-access,postgres update --add-ip-allow/--remove-ip-allow, IP rules inpostgres get, the newpgConfigkeyscursor/openapi-drift-1112-cli-clickpipes-c05dclickpipe create bigquery --sync-croncursor/openapi-drift-1112-cli-clickstack-c05dclickstack webhook validate, plus alert, dashboard and role validation for the new shapesspec_coverage_testand two analyzer entrypoint tests (executable_and_library_return_the_same_vendored_report,udf_payload_migration_remains_actionable_after_component_removal_and_snapshot_refresh) require a drift-free vendored snapshot. They fail on API 1 and API 2 by design and pass on API 3, wherepython3 scripts/check-openapi-drift.py --dry-runreports 0 actionable drift.Decisions I was unsure about
PgSizerenames are breaking. The spec renamed all 61 GCP sizes (c4-highmem-16→c4-highmem-lssd-16,z3-highlssd-8→z3-highmem-highlssd-8) and dropped the old names. I renamed the variants instead of keeping the old ones under an exemption, because nothing shows the API still accepts the old names. Old names in a response fall through toPgSize::Unknown, and a test pins that.PostgresIpAccessListPatch.add/removeare requiredVecs. The schema has norequired[]and no "Optional" marker, so the analyzer resolves both as required. This matches the existing ClickHouse-serviceIpAccessListPatch.pgConfigsettings that appeared after the issue was filed, as fix(api): refresh OpenAPI snapshot; snapshot permissions, saved-query GA, Prometheus labels, pgConfig GUCs (#1088) #1091 did, so the last API PR leaves no drift.permissions::generation_matches_committed_catalog_after_formattingrequiresmeta/operations.rsto match the vendored snapshot, so it moves with the snapshot. It adds theclickStackValidateWebhookdescriptor before its method exists, which only the snapshot-dependent tests above notice. API 3 adds the method and the beta entry.levela number (Option<f64>) and removesClickStackSelectItemLevel. The spec now types it as a plain number, and the old string enum couldn't parse a JSON number. That changes the CLI wire value from"0.95"to0.95.additionalPropertiesmap whose value is an inlineoneOf(MongoDB CASL conditions: string or{"$regex"}object) matches onlyserde_json::Value. No other Rust type could satisfy the analyzer.ClickStackAlertChartConfigOverlayis strict, because the analyzer resolves its fields as required. The composedClickStackAlert*ChartConfigtypes carry the same fields as optional (the spec rejectswhereon raw-SQL variants), and those are what callers build.--block-public-access, which sendsipAccessList: []. It isn't strictly needed for parity withcloud service create, but blocking public access is a security case worth one flag.source, even though the spec now makes it optional. The CLI's cross-field checks depend on knowing the source, and the spec doesn't say what an omitted source means.Follow-up issues
I can't open GitHub issues from this environment. These are the per-CLI-PR issues the skill asks for:
cloud postgres create --ip-allow IP_OR_CIDR:PORTS[=DESCRIPTION](repeatable) and--block-public-access;cloud postgres update --add-ip-allowand--remove-ip-allow RULE_ID_OR_SOURCE; IP rules incloud postgres get; the 22 newpgConfigkeys inconfig patch --setand file validation. Not exposed: editing a rule in place (addwith an existingid). Remove and re-add covers it with simpler syntax.cloud clickpipe create bigquery --sync-cron. Not exposed: changing it after creation, because the API has no BigQuery source update.cloud clickstack webhook validate; inline alerts and optionalchannel/channelsinalert create/update; stacked-line tiles, series heatmaps and all four filter types indashboard create/update/validate; strict role permissions. Not exposed: a typed write-back flow for roles or dashboards. The CLI keeps taking complete JSON bodies.Changes in this PR
clickhouse_cloud_openapi.jsonwith the live document and regeneratemeta/operations.rs.PgSize: 61 GCP variants renamed to the spec's local-SSD names. The README covers the migration.PostgresService.ip_access_list(response),PostgresServicePostRequest.ip_access_list(Noneallows all,Some(vec![])blocks public access) andPostgresServicePatchRequest.ip_access_list(PostgresIpAccessListPatch).PostgresIpAccessListEntrysplits into a strict request type and an all-Optionresponse type, with aTryFromwrite-back.PgConfig/PgConfigResponsegain 22 settings, including the closed enumsPgConfigDefaultToastCompression,PgConfigEnableParallelHash,PgConfigIoMethodandPgConfigLogLockWaits(each withVALUES). They're carried through theFromwrite-back and added to the PgConfig partial-schema optionality exemptions.ip_access_list: None. A subprocess test checks that neither request carriesipAccessList, including when the pre-update GET returns rules.Unknown, the new pgConfig enums, facade paths, a wiremock PATCH round trip, and a non-blocking live step inintegration_postgres_testthat adds a TEST-NET rule, reads its ID back, and removes it.Verification
cargo fmt --all, bothclickhousectlclippy configurations, library clippy,cargo check -p clickhousectl --no-default-featuresandcargo check --workspace --all-featuresare clean.cargo test -p clickhouse-cloud-api -p clickhouse-openapi-analyzer --no-fail-fast: only the three snapshot-dependent tests above fail, and they list only the ClickPipes and ClickStack findings.cargo test -p clickhousectlandpython3 -m unittest discover -s scripts/tests -p 'test_*.py'pass.run-cloud-integrationlabel, which I haven't applied.