Skip to content

fix(api): refresh drift snapshot and preserve AWS backup external IDs - #1100

Merged
sdairs merged 1 commit into
codex/query-api-endpoint-contractfrom
codex/drift-1088-backup-api
Oct 21, 2026
Merged

sdairs merged 1 commit into
codex/query-api-endpoint-contractfrom
codex/drift-1088-backup-api

Conversation

@sdairs

@sdairs sdairs commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

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_test intentionally 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 in vendored_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 both control-plane:organization:create-service and control-plane:service:manage. The beta organization notifications list operation appears in the snapshot and in meta (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 uses Option<Option<String>> with a custom deserializer so callers can omit the field (preserve), send a string (replace), or send null (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.

@sdairs
sdairs added this pull request to stack #1095 October 20, 2026 11:34
@sdairs
sdairs marked this pull request as ready for review October 20, 2026 12:31
@sdairs
sdairs requested a review from iskakaushik as a code owner October 20, 2026 12:31
@sdairs
sdairs merged commit 992f6e5 into main Oct 21, 2026
9 of 11 checks passed
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 -->
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.

2 participants