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

supabase / supabase-flutter / 29287704963
87%

Build:
DEFAULT BRANCH: main
Ran 13 Jul 2026 09:51PM UTC
Jobs 9
Files 95
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

13 Jul 2026 09:48PM UTC coverage: 87.204% (+0.003%) from 87.201%
29287704963

push

github

web-flow
feat(postgrest): configurable auto-retry and request timeout (#1560)

## Summary

Makes the PostgREST client's automatic retry behavior configurable and
adds an optional per-request timeout that actually cancels a stalled
attempt. Previously the retry count and the retryable conditions were
hard-coded, and there was no way to bound the duration of a request.
Rebased on top of the request abort feature (#1368), whose
`AbortableRequest` support is what makes a real timeout possible.

All defaults preserve the current behavior, so the change is
non-breaking.

## Configurable auto-retry

New optional configuration on `PostgrestClient` (and per request via
`PostgrestBuilder.retry`):

- `retryEnabled` (default `true`): whether retries are performed for
retryable GET and HEAD requests.
- `retryCount` (default `3`): number of retry attempts for a retryable
request. A negative value throws an `ArgumentError`.
- `retryableStatusCodes` (default `{503, 520}`): HTTP status codes that
trigger a retry. The set is copied defensively so later mutation of the
caller's set does not change retry behavior.
- `PostgrestBuilder.retry({bool enabled = true, int? count, Duration?
requestTimeout})`: the per-request override now also accepts a `count`
and a `requestTimeout`. A `null` `requestTimeout` keeps the client-level
timeout.

The default retryable status codes are exposed as
`PostgrestClient.defaultRetryableStatusCodes`, since the client is where
retries are configured.

## Request timeout

`requestTimeout` is available on `PostgrestClient` and
`PostgrestClientOptions`, and can be overridden per request through
`PostgrestBuilder.retry`. It bounds how long a single request attempt
may take and is built on top of the abort mechanism from #1368, so it
actually cancels a stalled attempt through `AbortableRequest` rather
than leaving it running the way `Future.timeout` would. When `null` (the
default) no timeout is applied.

It is a per-attempt timeout, not a whole-operation d... (continued)

101 of 115 new or added lines in 10 files covered. (87.83%)

4743 of 5439 relevant lines covered (87.2%)

4.1 hits per line

Uncovered Changes

Lines Coverage ∆ File
7
82.26
2.36% packages/postgrest/lib/src/postgrest_builder.dart
4
89.04
5.48% packages/postgrest/lib/src/postgrest_query_builder.dart
3
90.2
-1.8% packages/postgrest/lib/src/postgrest_transform_builder.dart
Jobs
ID Job ID Ran Files Coverage
6 postgrest - 29287704963.6 13 Jul 2026 09:52PM UTC 10
85.33
GitHub Action Run
7 supabase - 29287704963.7 13 Jul 2026 09:51PM UTC 16
82.57
GitHub Action Run
8 supabase_flutter - 29287704963.8 13 Jul 2026 09:51PM UTC 10
79.31
GitHub Action Run
9 gotrue - 29287704963.9 13 Jul 2026 09:53PM UTC 28
86.47
GitHub Action Run
4 realtime_client - 29102073868.4 10 Jul 2026 03:05PM UTC 11
89.61
GitHub Action Run
9 storage_client - 29159578090.9 11 Jul 2026 04:23PM UTC 6
94.51
GitHub Action Run
6 supabase_common - 29102073868.6 10 Jul 2026 03:03PM UTC 10
87.85
GitHub Action Run
5 functions_client - 29102073868.5 10 Jul 2026 03:03PM UTC 3
98.81
GitHub Action Run
7 yet_another_json_isolate - 29102073868.7 10 Jul 2026 03:03PM UTC 1
77.78
GitHub Action Run
Source Files on build 29287704963
  • Tree
  • List 95
  • Changed 16
  • Source Changed 16
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29287704963
  • 59d4b3af on github
  • Prev Build on main (#29159578090)
  • 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