Skip to content

Commit 57217ea

Browse files
gustavobertoiclaude
andcommitted
fix(db): repair main after the #103/#105 semantic merge conflict
#103 (db reset/pull) and #105 (redis/minio dumpers) each passed CI alone but broke `main` when both merged — a semantic conflict git didn't flag: - #105 changed `resolveTenant` to take a `kind` and return `engine,label` (5 args / 6 returns); #103's `reset.go` still called the 4-arg form. - #105 replaced the `defaultPgDumper()` helper with `SelectDumper(d, kind)`; #103's `db pull` still called the removed helper. Both call sites now use the merged signatures (pg kind, extra returns discarded). Build, `go vet`, full `go test ./internal/...`, and `make determinism` all green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 38b68ad commit 57217ea

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎internal/cli/db.go‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,12 @@ func newDbPullCmd(g *GlobalOpts) *cobra.Command {
253253
return err
254254
}
255255
defer closeFn()
256-
dumper := defaultPgDumper()
256+
// db pull is Postgres-only; SelectDumper replaced the defaultPgDumper
257+
// helper when snapshot/restore gained Redis+MinIO dumpers (#105).
258+
dumper, err := orchestrate.SelectDumper(d, "pg")
259+
if err != nil {
260+
return err
261+
}
257262
if err := dumper.Preflight(cmd.Context()); err != nil {
258263
return err
259264
}

‎internal/orchestrate/reset.go‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ const terminateBackendsSQL = `SELECT pg_terminate_backend(pid) FROM pg_stat_acti
5353
// terminate → DROP → re-provision DDL runs inside the flock; the loopback overlay
5454
// is applied outside it (engineTarget self-locks the port allocation).
5555
func Reset(ctx context.Context, d UpDeps, opt ResetOptions) (ResetResult, error) {
56-
proj, dbName, inst, err := resolveTenant(d, opt.Project, opt.Database, opt.Instance)
56+
// db reset is Postgres-only; pass the "pg" kind and ignore the engine/label
57+
// returns added when snapshot/restore gained Redis+MinIO dumpers (#105).
58+
proj, dbName, inst, _, _, err := resolveTenant(d, "pg", opt.Project, opt.Database, opt.Instance)
5759
if err != nil {
5860
return ResetResult{}, err
5961
}

0 commit comments

Comments
 (0)