Skip to content

Remove deprecated cloud service client command#148

Merged
sdairs merged 9 commits into
issue-138-name-resources-after-prfrom
issue-147-deprecate-cloud-client
May 14, 2026
Merged

Remove deprecated cloud service client command#148
sdairs merged 9 commits into
issue-138-name-resources-after-prfrom
issue-147-deprecate-cloud-client

Conversation

@sdairs
Copy link
Copy Markdown
Collaborator

@sdairs sdairs commented May 12, 2026

Summary

  • Removes the cloud service client subcommand: cloud service query now covers the cloud query path over HTTP without needing a local clickhouse binary or service password.
  • Drops the helper ensure_version_installed() that downloaded the matching ClickHouse binary just for cloud service client.
  • Bumps rpassword 7.5.0 → 7.5.2 (separate commit) to unblock macOS builds — 7.5.0 referenced the Linux-only libc::__errno_location.

Closes #147.

Note

Based on #146 so it merges clean once that lands. Retarget to main after #146 merges.

Test plan

  • cargo build (workspace, macOS)
  • cargo test (249 passed)
  • cargo clippy -p clickhousectl --all-targets (no new warnings)
  • CLI test is_write_command_read_only_commands still passes with the variant gone

🤖 Generated with Claude Code

sdairs and others added 2 commits May 12, 2026 19:14
`cloud service query` now covers the cloud query path over HTTP without
needing a local clickhouse binary or service password, so the
`cloud service client` subcommand and its binary-download helper are no
longer needed.

Closes #147.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
rpassword 7.5.0 referenced `libc::__errno_location` (Linux-only), which
broke `cargo build` on macOS. 7.5.2 restores macOS support.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sdairs sdairs requested a review from iskakaushik as a code owner May 12, 2026 18:17
@sdairs sdairs temporarily deployed to cloud-integration May 12, 2026 18:17 — with GitHub Actions Inactive
README still framed `cloud service query` as the successor to `cloud
service client` on a deprecation path, and the cloud service CONTEXT
FOR AGENTS pointed at `client`. Rewrite both to stand on their own.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sdairs sdairs temporarily deployed to cloud-integration May 12, 2026 18:37 — with GitHub Actions Inactive
Refreshes the OpenAPI snapshot and brings the typed client in sync with the
new horizontal-autoscaling / scaling-schedule feature on ClickHouse Cloud.
Also fixes a resolver bug exposed by a spec convention transition: the
OpenAPI team is starting to add `required[]` arrays to schemas but only
listing newly-introduced fields, which the previous required[]-exclusive
interpretation mis-classified as flipping every other field to optional.

- Adds 7 new model types: `CurrentScaling`, `ScalingSchedule`,
  `ScalingScheduleBaseConfig`, `ScalingScheduleEntry`,
  `ScalingScheduleEntryRequest`, `ScalingSchedulePatchRequest`,
  `ScalingSchedulePostRequest`.
- Adds 5 new fields to `Service` and `ServiceScalingPatchResponse`
  (`currentScaling`, `scalingSchedule`, `minReplicas`, `maxReplicas`,
  `replicaMemoryGb`) and 3 to `ServiceReplicaScalingPatchRequest`.
- Adds 3 new client methods: `scaling_schedule_get`,
  `scaling_schedule_upsert`, `scaling_schedule_replace`.
- Introduces `PARTIAL_REQUIRED_SCHEMAS` (mirrored in Rust and Python
  resolvers) so schemas whose `required[]` only lists new fields fall back
  to the description heuristic for older fields. Currently `Service` and
  `ServiceScalingPatchResponse`.
- Python drift checker now parses `NON_OPENAPI_CLIENT_METHODS` and
  `OPTIONALITY_EXEMPTIONS` from `spec_coverage_test.rs` to stay in sync
  with the Rust test's intentional divergences.

Closes #149.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
sdairs and others added 4 commits May 13, 2026 13:49
Adds `BETA_OPERATIONS` (and `is_beta_operation`) to `clickhouse_cloud_api`,
sourced from `x-badges` Beta markers in the OpenAPI spec. Consumers — the
CLI in this repo, and any external user of the library — can now derive a
"(Beta)" affordance from spec metadata rather than maintaining a parallel
list by hand.

- New `meta.rs` module with a sorted constant of 36 snake-case operation
  names plus a `binary_search`-backed helper.
- `spec_coverage_test.rs` gains `beta_operations_match_spec` (snapshot)
  and `_live` variants. Drift produces a clear failure pointing at the
  regenerator script.
- `scripts/regenerate-beta-lists.py` reads the snapshot and prints the
  array body — run after each `clickhouse_cloud_openapi.json` refresh.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`check-openapi-drift.py` now parses `BETA_OPERATIONS` out of `meta.rs`
and diffs it against `x-badges` Beta markers in the live spec. The
"Beta Status Changes" issue section calls out newly-Beta operations
(that need adding to the constant) and graduations (that need removing),
and the count rolls into the summary table.

This catches stability transitions that the snapshot-driven Rust test
cannot — e.g. an existing operation flipping from GA to Beta or vice
versa on the published spec before we refresh the snapshot.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Postgres subcommand's help text already advertised "(beta)" via a
hand-written doc comment. Capitalise it to `(Beta)` (matching how the
OpenAPI spec's `x-badges` renders it) and add a test that asserts the
label is present iff `clickhouse_cloud_api::is_beta_operation` reports
the underlying operation as Beta. If Postgres ever graduates, the daily
drift check flags it, we delete the suffix, and the test keeps passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reverts commit e11d3bd. The label-and-test approach was overbuilt for
what it solved: the CLI never actually consults `is_beta_operation` at
runtime — clap renders help text from compile-time metadata, and
nothing in the CLI declares which client method each subcommand wraps.
The test held a literal string accountable to spec metadata without the
CLI ever consuming that metadata, which is rigour without leverage on a
surface that has one beta-backed command today.

The library-side `BETA_OPERATIONS` constant and the daily drift checker
remain. Those are the genuine consumers: external Rust callers of
`clickhouse-cloud-api` get a programmatic stability signal, and the
drift check flags upstream Beta/GA transitions. The Postgres help text
goes back to a hand-written `(beta)` doc comment — the same it was
before this stack.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sdairs sdairs linked an issue May 13, 2026 that may be closed by this pull request
…ng-schedule

Resolve OpenAPI drift and add scaling-schedule API coverage
@sdairs sdairs temporarily deployed to cloud-integration May 14, 2026 16:49 — with GitHub Actions Inactive
@sdairs sdairs merged commit b4151e9 into issue-138-name-resources-after-pr May 14, 2026
12 checks passed
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.

deprecate cloud client

2 participants