Extract organization, member, and invitation CLI domains - #399
Merged
sdairs merged 2 commits intoAug 13, 2026
Conversation
sdairs
temporarily deployed
to
cloud-integration
August 7, 2026 21:03 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the ClickHouse Cloud CLI by extracting the organization, member, and invitation command surface (clap contracts), dispatch, handlers, CloudClient wrappers, output helpers, and associated tests into a dedicated cloud::organizations module, aiming to preserve existing behavior while improving domain isolation.
Changes:
- Added
crates/clickhousectl/src/cloud/organizations.rsto host org/member/invitation clap enums, dispatch runners, handlers/builders, and domain-localimpl CloudClient. - Updated cloud runtime dispatch (
cloud/mod.rs) to route org/member/invitation commands through the new module. - Removed the extracted org/member/invitation logic from generic cloud modules (
cloud/commands.rs,cloud/client.rs,cloud/cli.rs) and relocated relevant tests.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/clickhousectl/src/cloud/organizations.rs | New domain module containing org/member/invitation CLI contracts, handlers, CloudClient wrappers, and tests. |
| crates/clickhousectl/src/cloud/mod.rs | Dispatch now delegates org/member/invitation execution to cloud::organizations. |
| crates/clickhousectl/src/cloud/commands.rs | Removed org/member/invitation handlers/builders and related tests after extraction. |
| crates/clickhousectl/src/cloud/client.rs | Removed org/member/invitation CloudClient wrapper methods moved into cloud::organizations. |
| crates/clickhousectl/src/cloud/cli.rs | Re-exported org/member/invitation clap enums from cloud::organizations and delegated write classification to the extracted enums. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
sdairs
force-pushed
the
issue-382-organization-cli-domain
branch
from
August 8, 2026 18:37
b75a3d7 to
59522a4
Compare
sdairs
had a problem deploying
to
cloud-integration
August 8, 2026 18:37 — with
GitHub Actions
Failure
sdairs
had a problem deploying
to
cloud-integration
August 8, 2026 18:45 — with
GitHub Actions
Failure
sdairs
force-pushed
the
issue-382-organization-cli-domain
branch
from
August 13, 2026 11:37
59522a4 to
7795be6
Compare
sdairs
had a problem deploying
to
cloud-integration
August 13, 2026 11:37 — with
GitHub Actions
Failure
sdairs
force-pushed
the
issue-382-organization-cli-domain
branch
from
August 13, 2026 18:29
7795be6 to
ca24d6f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #382
Summary
Tests
cargo fmt --allcargo check --workspace --all-featurescargo test -p clickhousectlcargo clippy -p clickhousectl --all-targets -- -D warnings