Skip to content

Extract the complete Services CLI domain - #400

Merged
sdairs merged 1 commit into
issue-382-organization-cli-domainfrom
issue-387-services-cli-domain
Aug 13, 2026
Merged

Extract the complete Services CLI domain#400
sdairs merged 1 commit into
issue-382-organization-cli-domainfrom
issue-387-services-cli-domain

Conversation

@sdairs

@sdairs sdairs commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Closes #387

Summary

  • Extract the full service, query-endpoint, and private-endpoint clap/runtime/client surface into one Services domain module.
  • Preserve explicit organization and API-key cleanup/provisioning workflows plus Query API byte-stream behavior.
  • Add complete top-level parser/classification coverage and minimal/maximal model-field assertions for body builders.
  • Remove moved service code from generic cloud CLI, commands, client, and dispatch modules without changing behavior.

Tests

  • cargo fmt --all --check
  • cargo check --workspace --all-features
  • cargo test -p clickhousectl
  • cargo clippy -p clickhousectl --all-targets -- -D warnings

@sdairs
sdairs requested review from iskakaushik and rndD as code owners August 7, 2026 21:41
@sdairs
sdairs temporarily deployed to cloud-integration August 7, 2026 21:41 — with GitHub Actions Inactive
@sdairs sdairs changed the title Extract services CLI domain Extract the complete Services CLI domain Aug 7, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 7, 2026

Copy link
Copy Markdown

Macroscope skipped reviewing this pull request. Per-review cost limit exceeded (workspace setting).

This review would cost an estimated $14.18, which exceeds your per-review limit of $10.00.

The top 3 files driving up this estimate:

File Diff Size Estimate
crates/clickhousectl/src/cloud/services.rs 146.63KB $7.33
crates/clickhousectl/src/cloud/commands.rs 79.60KB $3.98
crates/clickhousectl/src/cloud/cli.rs 38.43KB $1.92

Tip

To get this pull request reviewed, you can:

  1. Comment @macroscope-app on this PR to request a manual review (monthly spend limits still apply).
  2. Exclude the file(s) above from review by adding a pattern to your .macroscope/ignore.md — note that creating this file replaces Macroscope's built-in default ignores rather than extending them.
  3. Raise your cost limit in your workspace billing settings.

Turn off this reminder going forward

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 extracts the full ClickHouse Cloud Services CLI domain (service / query-endpoint / private-endpoint) into a dedicated cloud::services module, consolidating clap definitions, dispatch/runtime handlers, request builders, CloudClient wrappers, and associated tests while preserving existing behavior.

Changes:

  • Moved ServiceCommands, QueryEndpointCommands, and PrivateEndpointCommands clap surface + write classification into cloud::services, and delegated dispatch via services::run(...).
  • Relocated all service/query-endpoint/private-endpoint handlers and request builders out of cloud::commands into the new services domain module.
  • Relocated the corresponding CloudClient wrapper methods from cloud::client into a services-domain impl CloudClient block and moved service-related parsing/classification + builder tests alongside the domain.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/clickhousectl/src/cloud/mod.rs Wires the new services domain module and routes CloudCommands::Service dispatch through it.
crates/clickhousectl/src/cloud/commands.rs Removes service/query-endpoint/private-endpoint logic, leaving ClickPipes and other non-service cloud command handlers.
crates/clickhousectl/src/cloud/client.rs Removes service/query-endpoint/private-endpoint CloudClient wrapper methods now owned by the services domain module.
crates/clickhousectl/src/cloud/cli.rs Re-exports services clap types via cloud::cli and delegates service write classification to ServiceCommands::is_write().
crates/clickhousectl/src/cloud/services.rs New consolidated Services domain module containing clap types, handlers/builders, CloudClient wrappers, and moved parsing/classification/builder tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@sdairs
sdairs force-pushed the issue-387-services-cli-domain branch from 84b4a9a to 97e9140 Compare August 8, 2026 18:37
@sdairs
sdairs had a problem deploying to cloud-integration August 8, 2026 18:37 — with GitHub Actions Failure
@sdairs
sdairs had a problem deploying to cloud-integration August 8, 2026 18:45 — with GitHub Actions Failure
@sdairs
sdairs force-pushed the issue-387-services-cli-domain branch from 97e9140 to 5843e58 Compare August 13, 2026 11:37
@sdairs
sdairs had a problem deploying to cloud-integration August 13, 2026 11:38 — with GitHub Actions Failure
@sdairs
sdairs had a problem deploying to cloud-integration August 13, 2026 11:48 — with GitHub Actions Failure
@sdairs
sdairs force-pushed the issue-387-services-cli-domain branch from 5843e58 to 8df91b9 Compare August 13, 2026 18:29

@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

@sdairs
sdairs merged commit faf940a into main Aug 13, 2026
4 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.

Extract the complete Services CLI domain

3 participants