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

supabase / cli / 27400982704
65%
develop: 65%

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/develop/pr-5566-c66add07bf1044c51e62596f491fe9ce48956b81
DEFAULT BRANCH: develop
Ran 12 Jun 2026 07:22AM UTC
Jobs 1
Files 225
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

12 Jun 2026 07:18AM UTC coverage: 64.895% (+0.2%) from 64.676%
27400982704

push

github

web-flow
fix(cli): auto-retry db dump/pull via the IPv4 pooler on IPv6-only networks (#5493)

Closes
[CLI-1593](https://linear.app/supabase/issue/CLI-1593/improve-db-dump-ipv6-error-guidance)

## What

`supabase db dump` and `db pull` run `pg_dump` inside a Docker
container. Supabase direct database hosts (`db.<ref>.supabase.co:5432`)
are **IPv6-only** unless the IPv4 add-on is enabled, so on environments
without working IPv6 in the container (very common on Docker Desktop for
macOS) the operation failed with an opaque `error running container:
exit 1`.

This PR makes that path **self-healing**: when a remote dump/pull fails
because the direct host is unreachable over IPv6, the CLI transparently
resolves the project's **IPv4 transaction pooler**, warns the user, and
retries once. If no pooler is available it falls back to an actionable
error message pointing at `--db-url`.

## Why

The host running the CLI often *does* have IPv6 (so the pre-flight dial
succeeds and the direct config is selected), but the `pg_dump`
**container** does not — so the failure only surfaces deep inside the
container as a libpq/getaddrinfo error, hidden behind the generic
container exit code. Users were left stuck with no hint, even though a
working IPv4 pooler existed for their project.

## Behavior

```mermaid
flowchart TD
    A["db dump / db pull (remote)"] --> B["Run pg_dump in Docker container<br/>(tee stderr for classification)"]
    B --> C{Succeeded?}
    C -->|yes| OK["Write dump ✓"]
    C -->|no| D{"stderr is an<br/>IPv6 connectivity error?"}
    D -->|no| SUG["Classify error → actionable suggestion"]
    D -->|yes| E{"Host is a direct<br/>db.&lt;ref&gt;.supabase.co?"}
    E -->|no| SUG
    E -->|yes| F{"IPv4 pooler<br/>config resolvable?"}
    F -->|no| SUG2["Suggest --db-url with the<br/>transaction pooler URL"]
    F -->|yes| G["Warn user · reset output ·<br/>retry once via IPv4 pooler"]
    G --> H{Retry succeeded?}
    H -->|yes| OK2["Write dump ✓<br/>(transparent recov... (continued)

10681 of 16459 relevant lines covered (64.89%)

7.21 hits per line

Coverage Regressions

Lines Coverage ∆ File
62
46.38
3.29% internal/utils/flags/db_url.go
43
54.85
-1.83% internal/db/pull/pull.go
15
93.64
0.19% internal/utils/connect.go
14
62.69
5.31% internal/db/dump/dump.go
4
94.74
-0.92% internal/testing/apitest/docker.go
Jobs
ID Job ID Ran Files Coverage
1 27400982704.1 12 Jun 2026 07:22AM UTC 225
64.89
GitHub Action Run
Source Files on build 27400982704
  • Tree
  • List 225
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27400982704
  • 06162257 on github
  • Prev Build on gh-readonly-queue/develop/pr-5548-23a3f6ce1b6e7d43b49a7120e46adfe9307aef10 (#27400173235)
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