• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / cli / 27149724318
64%

Build:
DEFAULT BRANCH: develop
Ran 08 Jun 2026 03:53PM UTC
Jobs 1
Files 223
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Jun 2026 03:51PM UTC coverage: 64.314% (+0.3%) from 64.023%
27149724318

push

github

web-flow
fix(cli): skip pg_dump in db pull when using pg-delta diff engine (#5255)

## What

Switches `supabase db pull --diff-engine pg-delta` to drive its initial
pull from pg-delta's catalog diff instead of `pg_dump`, and lands the
supporting plumbing (remote TLS handling, debug bundles, and a local
pg-delta dev workflow) needed to make that path reliable against Cloud.

Closes CLI-1472.

## Why

The legacy initial-pull pipeline is `pg_dump` → restore into a local
shadow → diff. That round-trip silently destroys ownership for any
object the local `postgres` role can't assume: `pg_dump` emits `ALTER
... OWNER TO supabase_admin` (etc.), the restore runs as a non-superuser
so the owner is dropped, and every restored object then reports `owner =
postgres`. pg-delta's supabase integration filter drops platform-managed
objects by `owner ∈ SUPABASE_SYSTEM_ROLES`, so once the owner signal is
gone those objects leak into the user's migration file and break
`supabase db reset` (CLI-1469 FDW ACLs, CLI-1470 Wasm wrappers).

pg-delta already speaks `pg_catalog` directly via `extractCatalog`,
preserving ownership, so diffing the remote catalog against an empty
shadow produces a clean initial migration without `pg_dump` in the loop.

## What changed

### Initial-pull routing
- `db pull` no longer runs `dumpRemoteSchema` on the initial pull when
the pg-delta diff engine is selected; the shadow diff is the sole
producer of the migration file (`internal/db/pull/pull.go`,
`cmd/db.go`).
- `shouldUseDeclarativePgDeltaPull` makes explicit `--diff-engine
pg-delta` keep the migration-file workflow even when
`[experimental.pgdelta] enabled = true` would otherwise default to the
declarative export path.
- New `swallowInitialInSync` / `ensureMigrationWritten` helpers
distinguish "pg-delta produced no statements" from "pg_dump already
wrote content", so an empty pg-delta result still surfaces `No schema
changes found` correctly.

### Diff plumbing
- `DiffDatabase` now returns a `Datab... (continued)

10386 of 16149 relevant lines covered (64.31%)

7.07 hits per line

Coverage Regressions

Lines Coverage ∆ File
43
6.15
-0.93% internal/db/diff/pgdelta.go
33
56.68
1.91% internal/db/pull/pull.go
17
54.55
6.06% internal/db/diff/diff.go
9
87.67
-3.03% internal/utils/edgeruntime.go
2
96.97
29.11% internal/db/declarative/debug.go
2
80.61
0.0% internal/storage/rm/rm.go
Jobs
ID Job ID Ran Files Coverage
1 27149724318.1 08 Jun 2026 03:53PM UTC 223
64.31
GitHub Action Run
Source Files on build 27149724318
  • Tree
  • List 223
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27149724318
  • 48218f36 on github
  • Prev Build on develop (#27133540129)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc