Remediate current ClickHouse Cloud OpenAPI drift - #415
Conversation
| clickhouse_max_insert_threads: clickhouse_max_insert_threads.map(i64::from), | ||
| object_storage_use_cluster_function, | ||
| clickhouse_parallel_view_processing, | ||
| kafka_read_committed: false, |
There was a problem hiding this comment.
🟠 High cloud/clickpipes.rs:1654
Updating any unrelated ClickPipe setting unconditionally disables kafka_read_committed on pipes where it was enabled. Because this command has no argument for that setting but always serializes kafka_read_committed: false, preserve the existing value (for example by fetching it) or expose it as an intentional input instead of hard-coding false.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @crates/clickhousectl/src/cloud/clickpipes.rs around line 1654:
Updating any unrelated ClickPipe setting unconditionally disables `kafka_read_committed` on pipes where it was enabled. Because this command has no argument for that setting but always serializes `kafka_read_committed: false`, preserve the existing value (for example by fetching it) or expose it as an intentional input instead of hard-coding `false`.
There was a problem hiding this comment.
Pull request overview
Updates the vendored ClickHouse Cloud OpenAPI snapshot and brings the Rust API library (and one CLI integration point) back in sync with the current live spec, including new billing, Prometheus discovery, and Postgres log surfaces.
Changes:
- Refreshed the vendored OpenAPI snapshot and updated beta-operation metadata.
- Added new client methods + models for active balances, Prometheus discovery, Postgres logs, plus drift fixes for Activity/UDF/quotas/ClickPipes.
- Updated tests to cover new models/endpoints and updated AGENTS.md guidance for the modularized workspace.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/clickhousectl/src/cloud/clickpipes.rs | Adapts ClickPipes schema discovery/settings update to new API models (includes a settings update behavior change). |
| crates/clickhouse-cloud-api/tests/models_test.rs | Extends model serialization/deserialization coverage for new/changed schemas and request shapes. |
| crates/clickhouse-cloud-api/tests/model_facade_test.rs | Ensures newly extracted models remain available through both root and models::* paths. |
| crates/clickhouse-cloud-api/tests/client_test.rs | Adds wiremock-backed client tests for new endpoints and updated request/response handling. |
| crates/clickhouse-cloud-api/src/models/udfs.rs | Adds the memoryLimitMib field to the UDF model. |
| crates/clickhouse-cloud-api/src/models/quotas.rs | Adds missing quota code enum variant for API keys per organization. |
| crates/clickhouse-cloud-api/src/models/postgres.rs | Introduces Postgres logs models and a typed sort-order enum. |
| crates/clickhouse-cloud-api/src/models/organizations.rs | Adds ActiveBalance/ActiveBalances and Prometheus discovery response models. |
| crates/clickhouse-cloud-api/src/models/clickpipes.rs | Adds new schema-discovery sources and the Kafka kafka_read_committed setting with request/response strictness. |
| crates/clickhouse-cloud-api/src/models/activity.rs | Updates ActivityType and Activity fields to match current spec drift. |
| crates/clickhouse-cloud-api/src/models.rs | Re-exports newly added models through the facade. |
| crates/clickhouse-cloud-api/src/meta.rs | Updates BETA_OPERATIONS to include new beta endpoints. |
| crates/clickhouse-cloud-api/src/client/postgres.rs | Adds postgres_logs_get_list client method. |
| crates/clickhouse-cloud-api/src/client/organizations.rs | Adds active_balances_get and organization_prometheus_discovery_get client methods. |
| crates/clickhouse-cloud-api/clickhouse_cloud_openapi.json | Refreshes the vendored OpenAPI document snapshot to current live spec. |
| AGENTS.md | Updates contributor guidance to reflect the modularized API/CLI/analyzer workspace and CI suite planning. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| clickhouse_max_insert_threads: clickhouse_max_insert_threads.map(i64::from), | ||
| object_storage_use_cluster_function, | ||
| clickhouse_parallel_view_processing, | ||
| kafka_read_committed: false, | ||
| clickhouse_max_download_threads: None, |
156f13c to
e27cea6
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e27cea6. Configure here.
| clickhouse_max_insert_threads: clickhouse_max_insert_threads.map(i64::from), | ||
| object_storage_use_cluster_function, | ||
| clickhouse_parallel_view_processing, | ||
| kafka_read_committed: false, |
There was a problem hiding this comment.
Settings update forces Kafka flag
High Severity
clickpipe_settings_update always puts kafka_read_committed: false on ClickPipeSettingsPutRequest, and that field is a non-optional bool that is always serialized. Any settings update therefore overwrites an existing true value even when the user only changes other flags. The OpenAPI settings PUT is described as sending key-value pairs for the fields being updated.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit e27cea6. Configure here.


Closes #372
Summary
Verification