Repository navigation
Conversation
Match the client/services.rs and models/services.rs module names. Pure rename (100% similarity); only the `mod` line in convert.rs changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the Client endpoint methods out of client/organizations.rs into private per-domain files that mirror src/models/: - client/byoc.rs: the eight organization_byoc_infrastructure_* methods (create, validate, get, progress_get, private_endpoint_config_get, tags_get, delete, update) - client/invitations.rs: invitation_get_list, invitation_create, invitation_get, invitation_delete - client/members.rs: member_get_list, member_get, member_update, member_delete - client/rbac.rs: organization_roles_get_list, organization_role_post, organization_role_get, organization_role_patch, organization_role_delete organizations.rs keeps balances, organization get/list/update, quotas, notifications, the deprecated private endpoint config list, Prometheus and usage cost. Methods are moved verbatim and keep their relative order; each new file repeats organizations.rs's three `use` lines. No visibility changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
client/byoc.rs, client/invitations.rs, client/members.rs and client/rbac.rs map to the organization suite only, like their models/invitations.rs, models/members.rs and models/rbac.rs counterparts. Of the live suites, only integration_org_test calls the BYOC, invitation, member and role methods; common/support.rs's cleanup calls invitation_delete, member_update and organization_role_delete only for resources that integration_org_test registers; and the clickhousectl commands the live CLI tests spawn (`cloud service query`, `cloud clickpipe create postgres`) do not reach these methods. organizations.rs keeps service+organization for organization_get, organization_get_list, organization_update and usage_cost_get, which integration_test calls. convert/services.rs keeps convert/service.rs's service+clickpipes mapping; the old path stays mapped so diffs that name it remain classified. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Part of #1173 (2 of 6: align
client/andconvert/withmodels/). Stacked on #1176.Summary
This splits
src/client/organizations.rs(883 lines) into per-domain files that matchsrc/models/, and renamessrc/convert/service.rstosrc/convert/services.rsto matchclient/services.rsandmodels/services.rs. Behaviour and the public API are unchanged: every method is still onClient, and all crate-root andmodels::*paths are unchanged.client/organizations.rsclient/byoc.rsorganization_byoc_infrastructure_*methods (create, validate, get, progress, private endpoint config, tags, delete, update)client/invitations.rsinvitation_get_list,invitation_create,invitation_get,invitation_deleteclient/members.rsmember_get_list,member_get,member_update,member_deleteclient/rbac.rsorganization_roles_get_list,organization_role_{post,get,patch,delete}convert/services.rsgit mvofconvert/service.rs, unchangedQuotas and the organization private endpoint config list stay in
organizations.rs. The issue scopes this step to BYOC, invitations, members and roles.Commits
git mv.convert/service.rs→convert/services.rs(100%), plus themod services;line inconvert.rs.organizations.rsand kept their order and blank lines. I compared the sorted line multisets before and after this commit. The only added lines are the threeuselines,impl Client {and}in each new file, plus fourmodlines inclient.rs. Visibility did not change. Review it withgit show --color-moved=dimmed-zebra.client/{byoc,invitations,members,rbac}.rsmap to theorganizationsuite only. Among the live suites, onlyintegration_org_testcalls these methods. Thecommon/support.rscleanup touches them only for resources thatintegration_org_testregisters. The live CLI tests (cloud service query,cloud clickpipe create postgres) don't reach them.organizations.rskeepsservice+organization, becauseintegration_testcallsorganization_get,organization_get_list,organization_updateandusage_cost_get.convert/services.rsinheritsservice+clickpipes. The oldconvert/service.rsentry stays, following the classifier's rule to retain mappings for renamed paths.classify-install-integration.pyneeds no change: API-crate paths are not install candidates..git-blame-ignore-revsentry for commit 2. This SHA must be updated if the stack is rebased before merge.No docs change was needed.
AGENTS.mdand the crate README name these modules only assrc/client/*.rsandsrc/convert/*.rs.Visibility widenings
None.
Tests
python3 scripts/check-openapi-drift.py --dry-rungave identical output before and after (no actionable drift).cargo fmt --all(no changes)--all-targets)cargo clippy -p clickhousectl, plus the--all-targets --no-default-featuresconfigurationcargo check -p clickhousectl --no-default-featuresandcargo check --workspace --all-featurescargo test -p clickhouse-cloud-api -p clickhouse-openapi-analyzer;spec_coverage_testandmodel_facade_testare untouchedMerge with a merge commit, not a squash. The
.git-blame-ignore-revsentry names this PR's move commit. A squash merge would leave it pointing at a commit that isn't on main, and git would silently ignore it.🤖 Generated with Claude Code
Note
Low Risk
Mechanical file splits and a rename only; HTTP paths, method signatures, and crate exports are unchanged per the PR description.
Overview
Reorganizes the ClickHouse Cloud API crate so client and convert layout matches models, without changing behavior or public
Clientmethod names.client/organizations.rsis slimmed down by moving wholeimpl Clientblocks into four new modules:byoc,invitations,members, andrbac. Core org operations (balances, get/list/update, quotas, notifications, Prometheus, usage cost, deprecated private endpoint list) stay inorganizations.rs.client.rsdeclares the new submodules.convert/service.rsis renamed toconvert/services.rs(withmod servicesinconvert.rs) to align withclient/servicesandmodels/services.Supporting updates: cloud integration classifier mappings and tests for the new paths, plus a
.git-blame-ignore-revsentry for the pure-move commit (merge with a merge commit so that SHA stays valid).Reviewed by Cursor Bugbot for commit 0547f91. Bugbot is set up for automated code reviews on this repo. Configure here.