Repository navigation
fix(api): refresh drift snapshot and preserve AWS backup external IDs - #1100
Merged
sdairs merged 1 commit intoOct 21, 2026
Merged
Conversation
This was referenced Oct 20, 2026
sdairs
marked this pull request as ready for review
October 20, 2026 12:31
iskakaushik
approved these changes
Oct 20, 2026
sdairs
added a commit
that referenced
this pull request
Oct 21, 2026
`cloud backup bucket create/update --file` now has explicit coverage and documentation for AWS `iamRoleExternalId`. Update input distinguishes omission (preserve), string (replace), and `null` (clear); unknown fields and invalid types still fail before HTTP. The existing typed file-input path carries the API field without adding a flag or duplicating request serialization. Fixes #1106. Refs #1088. Depends on the immediately preceding backup API layer, itself above #1099 in native stack #1095. No new library method is omitted. The AWS create example follows the live schema's required string field. Validation: builder tests cover create requiredness, all update states and strict unknown-field checks; real-binary wiremock coverage pins POST/PATCH bodies. The cloud-service guide includes clearing through stdin. No paid provisioning was attempted. Stack dependency: #1100. Final API coverage: #1104; final CLI layer: #1105. Combined-stack validation at `dc45f645f20fa7b0d3639d732531d947726b68a5`: `cargo fmt --all --check`; both CLI Clippy configurations; `cargo check -p clickhousectl --no-default-features`; API/analyzer all-target Clippy; `cargo check --workspace --all-features`; 817 API/analyzer tests; 2,351 CLI tests; 96 Python/classifier tests. All passed. Live/resource-creating tests retain their existing ignore gates. No paid Cloud integration label or provisioning lifecycle was triggered. Exact-head CI at `1b36b75c7b67bdc5ec7596c273b41f494770ca96`: [full CLI job](https://github.com/ClickHouse/clickhousectl/actions/runs/39415845906), format, MSRV and Cloud integration decision pass. Live suites were not selected for this CLI-only layer. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Test and documentation only; no production CLI or API behavior changes in this diff. > > **Overview** > Adds **tests and docs** for AWS **`iamRoleExternalId`** on `cloud backup bucket create/update --file`, without changing CLI request-building logic in this diff. > > Unit tests now expect the field in AWS create/update JSON fixtures and add **`aws_backup_bucket_external_id_preserves_update_states_and_unknown_field_checks`**: update accepts omit/string/`null`, rejects bad types and typos, and create rejects missing or null external IDs. A **wiremock** test asserts the real binary sends matching **POST/PATCH** bodies for create (with external ID) and update (omit, replace, or clear). > > The **cloud-service** guide documents `iamRoleExternalId` in the AWS field table and explains preserve/replace/clear semantics with a stdin example. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1b36b75. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.
AWS backup-bucket payloads now include
iamRoleExternalId, and the live OpenAPI adds organization notification listing and an additional service-create permission. Refresh the snapshot, regenerate operation metadata and the beta list, and model external IDs on the four AWS bucket types.The update request preserves omission, a replacement string, and explicit
null(clear) independently. Its custom deserializer retains unknown-field tracking for strict CLI file input. Create/properties require the string under the repository's spec requiredness policy; response fields remain optional. The library README documents caller migration.Refs #1088. Stacked directly above #1099, preserving its Query API response-envelope fix and all earlier layers. BigQuery and notifications are separate API/CLI follow-ups;
spec_coverage_testintentionally reports their remaining drift on this intermediate layer.Validation: three focused external-ID model tests and four backup client wiremock tests pass. No live resources or credentials were created.
Stack dependency: #1099. Final API coverage: #1104; final CLI layer: #1105.
Combined-stack validation at
dc45f645f20fa7b0d3639d732531d947726b68a5:cargo fmt --all --check; both CLI Clippy configurations;cargo check -p clickhousectl --no-default-features; API/analyzer all-target Clippy;cargo check --workspace --all-features; 817 API/analyzer tests; 2,351 CLI tests; 96 Python/classifier tests. All passed. Live/resource-creating tests retain their existing ignore gates. No paid Cloud integration label or provisioning lifecycle was triggered.Exact-head CI at
ae6fffc5497229328a6f44458d4440a05cf72cf4: format and MSRV pass; API build and Clippy pass. The API test job fails only invendored_openapi_snapshot_matches_rust_api, with the expected 17 BigQuery/notifications findings covered by #1102/#1104. The dependent final API layer #1104 passes its full job. The rendering step is skipped after this expected test failure. Cloud integration decision requires authorization; no provisioning label was applied.Note
Medium Risk
Changes AWS backup-bucket request shapes (required external ID on create) and PATCH semantics for IAM trust configuration; incorrect callers could break backup setup or fail API authorization checks after the new service-create permission is documented.
Overview
Refreshes the vendored ClickHouse Cloud OpenAPI snapshot and regenerates operation metadata. Service create (
INSTANCE_CREATE) now documents bothcontrol-plane:organization:create-serviceandcontrol-plane:service:manage. The beta organization notifications list operation appears in the snapshot and inmeta(notification_get_list); a full Rust client for it is left to a follow-up layer.AWS backup buckets gain
iam_role_external_id(iamRoleExternalId) on response and request types. Responses accept missing or null external IDs; create/properties require a string. Patch usesOption<Option<String>>with a custom deserializer so callers can omit the field (preserve), send a string (replace), or sendnull(clear). The README describes migration for struct-literal callers.Adds focused serde tests and updates wiremock backup-bucket client tests for the new field and wire shapes.
Reviewed by Cursor Bugbot for commit ae6fffc. Bugbot is set up for automated code reviews on this repo. Configure here.