Skip to content

Remediate ClickHouse Cloud OpenAPI drift - #343

Open
sdairs wants to merge 2 commits into
mainfrom
codex/issue-323-openapi-drift
Open

Remediate ClickHouse Cloud OpenAPI drift#343
sdairs wants to merge 2 commits into
mainfrom
codex/issue-323-openapi-drift

Conversation

@sdairs

@sdairs sdairs commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • refresh the vendored ClickHouse Cloud OpenAPI document and remove five obsolete ClickStack connection client methods
  • add the current beta UDF client and typed model surface, including tolerant response models and strict request unions
  • add the ClickPipe schema-discovery metadata, SCIM enterprise extension, and Degraded ClickPipe state
  • regenerate beta-operation metadata and track two inline UDF error-response enum constraints under Model acknowledged OpenAPI enum constraints as typed Rust values #296
  • replace removed client tests with focused UDF wiremock and model compatibility coverage

Why

The live Cloud OpenAPI document moved beyond the snapshot recorded by #323: ClickStack connection operations were removed and a beta UDF API was added. The library and snapshot must move together so the shared analyzer, generated metadata, and public Rust surface remain aligned.

Impact

clickhouse-cloud-api now covers the current live spec with direction-aware request strictness and tolerant all-Option response models. Removed ClickStack connection methods no longer expose endpoints absent from the API.

Closes #323.

Validation

  • cargo fmt --all --check
  • cargo build -p clickhouse-cloud-api -p clickhouse-openapi-analyzer --all-targets
  • cargo test -p clickhouse-cloud-api -p clickhouse-openapi-analyzer
  • cargo clippy -p clickhouse-cloud-api -p clickhouse-openapi-analyzer --all-targets -- -D warnings
  • python3 -m unittest discover -s scripts/tests -p 'test_*.py'
  • cargo check --workspace --all-features
  • python3 scripts/check-openapi-drift.py --dry-run — 0 actionable drift

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the clickhouse-cloud-api crate (and the shared OpenAPI analyzer metadata) to match the current live ClickHouse Cloud OpenAPI spec: it removes obsolete ClickStack connection endpoints, adds the new beta UDF API surface (client methods + models), and extends models for ClickPipes schema discovery and SCIM enterprise extension compatibility.

Changes:

  • Removed five stale ClickStack connection client methods and updated beta-operation metadata accordingly.
  • Added beta UDF client methods plus new request/response models (tolerant response structs, strict discriminated request unions).
  • Added model updates + tests for ClickPipe schema discovery meta, SCIM enterprise extension, and Degraded ClickPipe state.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
crates/clickhouse-openapi-analyzer/src/config.rs Extends acknowledged unsupported enum pointers for UDF attach 424 error response enums.
crates/clickhouse-cloud-api/src/client.rs Removes ClickStack connection endpoints; adds UDF client endpoints (CRUD, attachments, versions, upload session).
crates/clickhouse-cloud-api/src/models.rs Adds Degraded ClickPipe state; adds ClickPipe schema discovery meta; adds SCIM enterprise extension field; introduces UDF models (requests + tolerant responses).
crates/clickhouse-cloud-api/src/meta.rs Updates BETA_OPERATIONS to drop removed ClickStack ops and add UDF operations.
crates/clickhouse-cloud-api/tests/client_test.rs Replaces ClickStack connection wiremock tests with UDF wiremock coverage (pagination, request shapes, attach/detach, etc.).
crates/clickhouse-cloud-api/tests/models_test.rs Adds compatibility tests for new tolerant response models, schema discovery meta, SCIM enterprise extension, and UDF request strictness.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/clickhouse-cloud-api/src/models.rs
Comment thread crates/clickhouse-cloud-api/tests/client_test.rs
Comment thread crates/clickhouse-cloud-api/tests/models_test.rs
@sdairs
sdairs temporarily deployed to cloud-integration August 3, 2026 18:31 — with GitHub Actions Inactive
@sdairs
sdairs marked this pull request as ready for review August 3, 2026 18:48
@sdairs
sdairs requested review from iskakaushik and rndD as code owners August 3, 2026 18:48

@iskakaushik iskakaushik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

OpenAPI drift: 23 gaps between live spec and library

3 participants