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

supabase / supabase-flutter / 24099181632
80%

Build:
DEFAULT BRANCH: main
Ran 07 Apr 2026 07:07PM UTC
Jobs 1
Files 70
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

07 Apr 2026 07:01PM UTC coverage: 81.121% (-0.1%) from 81.229%
24099181632

push

github

web-flow
feat(postgrest): add automatic retry for transient failures (#1338)

* feat(postgrest): add automatic retry for transient failures

Implements retry logic for the Flutter PostgREST client, mirroring the
Swift SDK (SDK-771) and supabase-js reference implementations.

Key behavior:
- Only retries idempotent methods: GET and HEAD
- Retry conditions: HTTP 520 or network/connection error
- Up to 3 retries with exponential backoff: 1s → 2s → 4s (capped at 30s)
- Adds X-Retry-Count: <n> header on each retry attempt
- Enabled by default; disable globally via PostgrestClient(retryEnabled: false)
- Per-request override via .retry(enabled: false/true)

Acceptance Criteria:
- [x] Retry logic only applies to GET and HEAD
- [x] HTTP 520 and network errors trigger retries; other status codes do not
- [x] Exponential backoff: 1s, 2s, 4s (capped at 30s)
- [x] X-Retry-Count header present on retried requests
- [x] retryEnabled: false on PostgrestClient disables globally
- [x] .retry(enabled: false/true) overrides per request
- [x] All existing tests pass
- [x] 11 new tests cover all retry scenarios

Linear: SDK-785

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(postgrest): resolve analyzer warnings in retry implementation

- Use initializing formal (this.retryEnabled) to fix prefer_initializing_formals
- Remove @visibleForTesting from retryDelay in PostgrestQueryBuilder and
  PostgrestRpcBuilder since they are called from production code in
  postgrest.dart; keep annotation only on PostgrestClient and PostgrestBuilder

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(postgrest): avoid mutating shared _headers map during execution

_execute() was writing Prefer, Accept-Profile, Content-Profile,
Content-Type, and X-Retry-Count directly into _headers. Because
_copyWith passes the same map reference when headers are not
overridden, sibling builders share the map, and awaiting a builder
more than once accumulates mutations.

Switch to a pe... (continued)

110 of 158 new or added lines in 9 files covered. (69.62%)

2 existing lines in 2 files now uncovered.

3489 of 4301 relevant lines covered (81.12%)

2.9 hits per line

Uncovered Changes

Lines Coverage ∆ File
30
66.48
0.19% packages/gotrue/lib/src/gotrue_client.dart
9
82.86
-12.06% packages/postgrest/lib/src/postgrest_query_builder.dart
7
72.38
0.69% packages/postgrest/lib/src/postgrest_builder.dart
2
90.8
-2.14% packages/postgrest/lib/src/postgrest_transform_builder.dart

Coverage Regressions

Lines Coverage ∆ File
1
66.48
0.19% packages/gotrue/lib/src/gotrue_client.dart
1
90.8
-2.14% packages/postgrest/lib/src/postgrest_transform_builder.dart
Jobs
ID Job ID Ran Files Coverage
1 24099181632.1 07 Apr 2026 07:07PM UTC 70
81.12
GitHub Action Run
Source Files on build 24099181632
  • Tree
  • List 70
  • Changed 10
  • Source Changed 10
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24099181632
  • fb1da8b2 on github
  • Prev Build on main (#24097695171)
  • Next Build on main (#24100186148)
  • Delete
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