Extract the complete Services CLI domain - #400
Conversation
|
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:
Tip To get this pull request reviewed, you can:
|
There was a problem hiding this comment.
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, andPrivateEndpointCommandsclap surface + write classification intocloud::services, and delegated dispatch viaservices::run(...). - Relocated all service/query-endpoint/private-endpoint handlers and request builders out of
cloud::commandsinto the new services domain module. - Relocated the corresponding
CloudClientwrapper methods fromcloud::clientinto a services-domainimpl CloudClientblock 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.
84b4a9a to
97e9140
Compare
97e9140 to
5843e58
Compare
5843e58 to
8df91b9
Compare
Closes #387
Summary
Tests
cargo fmt --all --checkcargo check --workspace --all-featurescargo test -p clickhousectlcargo clippy -p clickhousectl --all-targets -- -D warnings