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

supabase / cli / 29819898249
65%

Build:
DEFAULT BRANCH: develop
Ran 21 Jul 2026 09:53AM UTC
Jobs 1
Files 230
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

21 Jul 2026 09:44AM UTC coverage: 65.234% (+0.2%) from 65.08%
29819898249

push

github

web-flow
fix(cli): repair remote db pull with pg-delta and per-connection role step-down (#5895)

## Summary

Remote `db pull --linked` with the pg-delta engine reported **"No schema
changes found"** on every hosted project, and the migra fallback failed
at the final migration-history write with `permission denied for
database postgres` (Slack report, supabase/cli#5826). Three stacked
causes, all addressed here:

**1. pg-delta required superuser to extract (fixed upstream, version
bump here).** Up to alpha.31, extraction read
`pg_catalog.pg_user_mapping` (superuser-only), so extracting as the temp
`cli_login_postgres` role failed with SQLSTATE 42501 on every hosted
project. It only worked locally because local connections use
`supabase_admin`. `@supabase/pg-delta@1.0.0-alpha.32` reads the
world-readable `pg_user_mappings` view instead; this PR bumps the
default pinned version (Go `DefaultPgDeltaNpmVersion` + TS
`LEGACY_DEFAULT_PG_DELTA_NPM_VERSION`).

**2. pg-delta script crashes were swallowed as an empty diff.** The Deno
templates force the edge-runtime worker to exit by throwing on both the
success and failure paths, and both runners (Go `RunEdgeRuntimeScript`,
TS `legacy-edge-runtime-script.layer.ts`) suppress any non-zero exit
whose stderr contains "main worker has been destroyed" — making a crash
indistinguishable from a genuinely empty diff. The template catch blocks
now print a `PGDELTA_SCRIPT_ERROR` sentinel to stderr, and both runners
treat its presence as a hard failure that surfaces the collected stderr
(so users see the real error instead of "No schema changes found").

**3. alpha.32 changed the plan API.** Plan statements moved into
execution-aware `units` (+ `sessionStatements`); the diff template's
`result?.plan.statements ?? []` silently produced an empty diff. The
template now uses `flattenPlanStatements(result.plan)`. TS template
embeds regenerated from the Go sources (byte-equality test unchanged).

**4. The TS role step-down was lost mid-c... (continued)

11247 of 17241 relevant lines covered (65.23%)

10.5 hits per line

Coverage Regressions

Lines Coverage ∆ File
59
19.44
13.29% internal/db/diff/pgdelta.go
45
54.17
-3.19% internal/db/pull/pull.go
25
73.65
0.48% internal/utils/misc.go
23
24.42
14.96% internal/db/diff/pgadmin.go
7
88.16
0.49% internal/utils/edgeruntime.go
6
72.82
2.77% internal/db/diff/diff.go
5
87.5
0.0% internal/db/diff/pgdelta_debug.go
Jobs
ID Job ID Ran Files Coverage
1 29819898249.1 21 Jul 2026 09:53AM UTC 230
65.23
GitHub Action Run
Source Files on build 29819898249
  • Tree
  • List 230
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29819898249
  • b08e6e1f on github
  • Prev Build on gh-readonly-queue/develop/pr-5903-d90c85c95a0cb8c8b30b25f439d877c16db20904 (#29666568199)
  • Next Build on develop (#29836104208)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc