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

supabase / supabase-swift / 23429009649
80%

Build:
DEFAULT BRANCH: main
Ran 23 Mar 2026 09:04AM UTC
Jobs 1
Files 86
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

23 Mar 2026 08:53AM UTC coverage: 80.282% (+0.1%) from 80.174%
23429009649

push

github

web-flow
feat(postgrest): add automatic retries for transient errors (#927)

* feat(postgrest): add automatic retries for transient errors

Adds transparent retry logic to the PostgREST client for transient
failures (HTTP 520, network errors), mirroring supabase-js#2072.

Retry behavior:
- Only retries on HTTP 520 or network errors
- Only retries idempotent methods (GET, HEAD)
- Up to 3 retries with exponential backoff (1s, 2s, 4s, capped at 30s)
- Adds X-Retry-Count header on retried requests

Configuration:
- Enabled by default; disable globally via `retryEnabled: false` on
  PostgrestClient or PostgrestClient.Configuration
- Per-request override via `.retry(enabled: false/true)` on the builder

Linear: SDK-771

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

* refactor(postgrest): improve execute and retry logic

- Fix bug where decode errors could be incorrectly retried: separate the
  network send from decoding so only transient network/HTTP errors trigger
  retries
- Remove fetchOptions from MutableState; build the final request as a
  local snapshot to avoid mutable side effects on execute
- Move maxRetries, retryableMethods, retryableStatusCodes to private static
  let constants
- Mark decode closure as @Sendable for StrictConcurrency correctness
- Add Task.checkCancellation() at the top of each retry iteration
- Refactor shouldRetry to use guard chains and Self. static references
- Fix typo in log message: "Fail to decode" -> "Failed to decode"

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

* test: import FoundationNetworking

* fix: resolve CI test failures in PostgREST and Realtime

- Fix variable shadowing bug in PostgrestBuilder.execute where
  `var request = baseRequest` inside the retry loop overwrote the
  prepared request (with Accept/Content-Type headers), causing snapshot
  tests to fail. Renamed to `currentRequest` to avoid the shadowing.

- Add tearDown to PostgrestBuilderTests to restore `_clock` after each
  test.... (continued)

81 of 83 new or added lines in 4 files covered. (97.59%)

6388 of 7957 relevant lines covered (80.28%)

27.96 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
95.56
1.3% Sources/PostgREST/PostgrestBuilder.swift
Jobs
ID Job ID Ran Files Coverage
1 23429009649.1 23 Mar 2026 09:04AM UTC 86
80.28
GitHub Action Run
Source Files on build 23429009649
  • Tree
  • List 86
  • Changed 4
  • Source Changed 4
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23429009649
  • fe75f12d on github
  • Prev Build on main (#23305086682)
  • Next Build on main (#23495135921)
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