Repository navigation
Conversation
Move `cloud/services.rs` to `cloud/services/mod.rs` and `cloud/service_query.rs` to `cloud/services/query_key.rs`, so blame follows both files into the new layout. Only the module declaration and the `service_query` paths change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
) Move the `service` command code out of `cloud/services/mod.rs` into one file per command family, each with the tests for its code: - `cli.rs`: clap definitions and private endpoint ID value parser - `client.rs`: `CloudClient` wrappers - `lifecycle.rs`: list, get, create, update, delete, start, stop, wake, scale, reset-password and prometheus - `settings.rs`, `scaling_schedule.rs`, `endpoints.rs` - `upgrade_window.rs`: upgrade window, replica-aware routing and profiles - `query.rs`: `service query` and `service repair-query-key` `mod.rs` keeps `PERMISSIONS`, the `run` dispatch and re-exports of the command enums. Only visibility and imports change; no behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A large Cloud domain can now be a directory: `PERMISSIONS` and dispatch in `mod.rs`, clap definitions in `cli.rs`, `CloudClient` wrappers in `client.rs`, and one file per command family with its tests. Point the `run_service_query` exception at `services/client.rs`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sdairs
force-pushed
the
claude/1157-split-cloud-services
branch
from
October 30, 2026 17:27
b519ead to
f55058c
Compare
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 #1157 (1 of 5:
services). Stacked on #1165.Summary
This splits
src/cloud/services.rs(9.6k lines) intosrc/cloud/services/. Behaviour is unchanged.mod.rsPERMISSIONS,rundispatch, re-exportscli.rsclient.rsimpl CloudClientwrapperslifecycle.rssettings.rsscaling_schedule.rsupgrade_window.rsendpoints.rsquery.rsservice queryandrepair-query-keyquery_key.rsgit mvofservice_query.rs, unchangedCommits
git mvs, plus path edits.services.rs→services/mod.rs(99%) andservice_query.rs→services/query_key.rs(100%), so blame follows both files.moddeclarations,uselists and visibility, plus a few signature rewraps rustfmt made after addingpub(super). Review it withgit show --color-moved=dimmed-zebra..git-blame-ignore-revsentry for commit 2. This SHA must be updated if the stack is rebased before merge.AGENTS.md, theadd-cli-commandandcli-help-textskills, anddocs/development.mdnow describesrc/cloud/<domain>/modules.Visibility widenings
runbuilds are nowpub(super).build_service_state_patch_requestandservice_delete_errorarepub(super)for the wrappers.CloudClient::{configured_query_host, run_service_query, run_service_query_bearer}arepub(super).ServiceSettingTarget::partsis nowpub(in crate::cloud), becauseshared.rsuses it.Tests
--no-default-featurescheck,cargo test -p clickhousectland the Python classifier tests all pass.src/cloud/is a prefix rule.Merge 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 moves and visibility adjustments only; PR claims unchanged behavior and matching test counts.
Overview
Refactors the monolithic
src/cloud/services.rsintosrc/cloud/services/, splitting clap definitions,CloudClientwrappers, dispatch/permissions, and handlers into separate files (cli.rs,client.rs,lifecycle.rs,query.rs,settings.rs, etc.) without changing CLI behavior.Moves
service_query.rsintoservices/query_key.rsand drops the standaloneservice_querymodule fromcloud/mod.rs. Several helpers are widened topub(super)(orpub(in crate::cloud)forServiceSettingTarget::parts) so the split modules can share the same code paths as before.Updates contributor docs (
AGENTS.md, add-cli-command/cli-help-text skills,docs/development.md) to describe thesrc/cloud/<domain>/layout for large domains, and adds a.git-blame-ignore-revsentry for the bulk move commit (merge with a merge commit so blame stays valid).Reviewed by Cursor Bugbot for commit f55058c. Bugbot is set up for automated code reviews on this repo. Configure here.