Skip to content

fix: pgdump-cluster - #68

Merged
RambokDev merged 19 commits into
devfrom
fix/pgdump-cluster
Jun 27, 2026
Merged

fix: pgdump-cluster#68
RambokDev merged 19 commits into
devfrom
fix/pgdump-cluster

Conversation

@RambokDev

Copy link
Copy Markdown
Contributor

No description provided.

RambokDev and others added 19 commits June 26, 2026 11:40
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The legacy_tmp_dir Option was assigned-but-never-read, tripping
unused_variables/unused_assignments. Replace the mut + reassignment
with a bind-once (PathBuf, Option<TempDir>) tuple so the TempDir is
still held for RAII through pg_restore, with no warnings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PostgresDumpFormat re-export is consumed only by the in-crate test
suite; guard it with cfg_attr(not(test), allow(unused_imports)) so
production cargo build stays warning-free.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replaced by the upcoming postgresql-cluster (pg_dumpall) mode. Reverts
the include_globals bundle/globals system to the pre-feature baseline.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…atabase)

Move the single cluster.rs + cluster_database.rs into a cluster/ folder:
- cluster/backup.rs   (run = pg_dumpall)
- cluster/restore.rs  (run = psql replay)
- cluster/database.rs (PostgresClusterDatabase trait impl)
- cluster/mod.rs

Free fns renamed to run() to match postgres/{backup,restore}.rs convention.
No behavior change; cluster tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Split the flat postgres_cluster.rs into a cluster/ test module matching the
src/domain/postgres/cluster/ layout:
- cluster/backup.rs   (produces_sql, requires_superuser)
- cluster/restore.rs  (round_trip_preserves_ownership, requires_superuser — new)
- cluster/database.rs (factory routing -> .sql, no container)
- cluster/mod.rs      (shared start_cluster/env_for helpers)

Adds restore-side superuser pre-check coverage and fast no-container factory
routing tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 054ad565-cfe7-4566-8f33-891ab4e07b05

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pgdump-cluster

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@RambokDev
RambokDev merged commit 01f5d34 into dev Jun 27, 2026
1 check passed
@RambokDev
RambokDev deleted the fix/pgdump-cluster branch June 27, 2026 18:52
RambokDev added a commit that referenced this pull request Jun 27, 2026
* fix: pgdump-cluster (#68)

* feat: add as_str/from_str to PostgresDumpFormat

* feat: resolve pg_dumpall/psql binary names

* feat: add include_globals field to database config

* feat: add pg_dumpall/psql globals dump and apply

* feat: add postgres backup bundle (manifest + build + resolve)

* feat: bundle globals into postgres backup when include_globals is set

* feat: replay globals before pg_restore when backup archive is a bundle

* refactor: bind FD restore tempdir guard once to clear unused warnings

* docs: demonstrate include_globals in sample databases.json

* chore: silence test-only re-export warning in non-test builds

* revert: remove include_globals feature, restore plain pg_dump/pg_restore

* feat: add pg_dumpall/psql binary names and is_superuser check

* feat: add postgresql-cluster db type and config parsing

* feat: pg_dumpall cluster backup and psql restore

* feat: route postgresql-cluster through PostgresClusterDatabase

* docs: add postgresql-cluster sample to databases.json

* refactor: split cluster mode into cluster/ module (backup, restore, database)

* test: mirror cluster tests into src/tests/domain/cluster/

* feat: add-gcs-storage-provider (#70)

* fix: refactoring

* chore: add google-cloud-storage and google-cloud-auth deps

* feat: add GCS provider config model

* feat: add GCS credential, client, and stream-source helpers

StreamSource bridges build_stream's Send-only byte stream into the SDK's
StreamingSource (which send_buffered requires to be Send+Sync+'static) via a
bounded mpsc channel, avoiding any change to the shared UploadStream type.

* feat: implement GCS StorageProvider upload

* feat: register google-cloud-storage provider in factory

* test: GCS upload roundtrip against fake-gcs-server

* fix: format GCS bucket as projects/_/buckets/<name> in upload_with_client

write_object rejects the bare bucket id with "malformed bucket name"; the
production provider passed config.bucket_name unformatted, so real uploads
would always fail. Format once in upload_with_client so prod and the
fake-gcs-server test share the corrected path.

* style: cargo fmt GCS provider files

* fix: gcs

* fix: azure (#71)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant