Repository navigation
Conversation
Move `cloud/postgres.rs` to `cloud/postgres/mod.rs` unchanged, so blame follows the file into the new layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
) Move the `postgres` command code out of `cloud/postgres/mod.rs` into one file per command family, each with the tests for its code: - `cli.rs`: clap definitions and parse tests - `client.rs`: `CloudClient` wrappers, in one `impl` block - `lifecycle.rs`: list, get, create, update, delete, certs, reset-password and restart, with the list filter and access-rule parsers - `config.rs`: runtime config get, replace and patch, and the config file loaders - `query.rs`: `postgres query` - `observability.rs`: logs, metrics, slow queries, prometheus and backups - `topology.rs`: read replicas, restore, promote and switchover `mod.rs` keeps `PERMISSIONS`, the `run` dispatch and re-exports of the command enums. Only visibility and imports change, and the section banners that described the old single-file layout are dropped; no behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sdairs
force-pushed
the
claude/1157-split-cloud-postgres
branch
from
October 30, 2026 17:27
7b7ea44 to
87f409b
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 (2 of 5:
postgres). Stacked on #1168.Summary
This splits
src/cloud/postgres.rsintosrc/cloud/postgres/, following the pattern #1168 set. Behaviour is unchanged.mod.rsPERMISSIONS,run, re-exportscli.rsclient.rsimpl CloudClientwrappers (the two blocks are merged into one)lifecycle.rsconfig.rsquery.rsobservability.rstopology.rsCommits
git mvtopostgres/mod.rs, at 100% similarity.mod/uselines, visibility, three rustfmt signature rewraps, the mergedimpl CloudClient {line, and four section banners dropped because they no longer apply (Helpers, Option structs, Handlers, Tests)..git-blame-ignore-revsentry. The SHA needs updating on rebase.add-cli-commandCloud reference now points atpostgres/andpostgres/client.rs.Notes
list_postgres_servicesis nowpub(in crate::cloud), becauseshared.rsuses it. The slow-query, logs and backup query structs and their fields arepub(super).access_ruletest helper is shared by three test modules throughpub(in crate::cloud::postgres), so it isn't duplicated.#[cfg(doc)] usekeeps one intra-doc link resolving.Tests
--no-default-featurescheck, the Python classifier tests andgit diff --checkall pass.local_postgres_client_input_testflake failed once and passed on rerun.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
Pure module reorganization with unchanged test counts and no intentional logic changes; merge should use a merge commit so the blame-ignore SHA stays valid.
Overview
Refactors the monolithic
cloud postgresimplementation intosrc/cloud/postgres/, matching the layout introduced forcloud servicesin the same effort (#1157). Behaviour and CLI surface stay the same; this is a move/split only.The former single file is broken out by concern:
cli.rs(clap + parse tests),client.rs(mergedCloudClientAPI wrappers),lifecycle.rs(CRUD, certs, passwords, filters/access rules),config.rs, plusquery.rs,observability.rs, andtopology.rsfor query, metrics/logs/backups, and replica/restore/role commands.mod.rskeepsPERMISSIONS, dispatch viarun(), and re-exports.Minor visibility adjustments support the split (e.g.
list_postgres_servicesispub(in crate::cloud)for name resolution inshared.rs). Agent docs now referencepostgres/andconvert_postgres_by_id_resultinpostgres/client.rs, and.git-blame-ignore-revsrecords the bulk-move commit for blame.Reviewed by Cursor Bugbot for commit 87f409b. Bugbot is set up for automated code reviews on this repo. Configure here.