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

supabase / supabase-swift / 44292439069
96%

Build:
DEFAULT BRANCH: main
Ran 18 Nov 2026 11:20AM UTC
Jobs 1
Files 223
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

18 Nov 2026 11:11AM UTC coverage: 96.143% (-0.05%) from 96.193%
44292439069

push

github

web-flow
fix(storage): send x-upsert on every tus request and stop looping on duplicates (#1854)

* fix(storage): send x-upsert on every tus request and stop looping on duplicates

Storage reads `x-upsert` on every tus request, PATCH and DELETE included.
The SDK sent it only on the create POST, so an upsert resumable upload over
an existing object got `409 The resource already exists` on each PATCH.
TusSession treated every PATCH 409 as an offset conflict, and the upload
looped HEAD -> PATCH forever.

- Send `x-upsert: true` on HEAD, PATCH and DELETE when the upload upserts.
- Treat a PATCH 409 as an offset conflict only when the server names the
  offset (`409 Upload-Offset conflict`); any other 409 fails the upload.
- Give the plain-text `409 The resource already exists` the
  `keyAlreadyExists` code, on create and on PATCH.

* refactor(storage): judge a tus 409 by the server's offset, not its text

- ResumableUpload resyncs after any PATCH 409, and fails with that error
  when the server's offset has not moved. This replaces the "offset"
  text match, so no 409 wording can loop or drop the record.
- StorageAPI.serverError gives the plain-text "The resource already
  exists" 409 the keyAlreadyExists code, for every route.
- TusSession holds the upload's options; ResumableUpload holds one
  TusSession.
- The existing-object e2e tests move to their own suite, so they skip
  the 20 MB fixture.

* fix(storage): send the tus follow-up x-upsert only when the caller sets it

#1847 made UploadOptions.upsert optional. Each tus follow-up request now
sends the same x-upsert value as the create request.

42 of 42 new or added lines in 4 files covered. (100.0%)

9 existing lines in 2 files now uncovered.

16427 of 17086 relevant lines covered (96.14%)

668116.08 hits per line

Coverage Regressions

Lines Coverage ∆ File
5
83.87
-16.13% Sources/Helpers/Codable.swift
4
90.51
-1.36% Sources/Realtime/Transport/URLSessionWebSocketTransport.swift
Jobs
ID Job ID Ran Files Coverage
1 44292439069.1 18 Nov 2026 11:20AM UTC 223
96.14
GitHub Action Run
Source Files on build 44292439069
  • Tree
  • List 223
  • Changed 6
  • Source Changed 4
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #44292439069
  • 24bb0484 on github
  • Prev Build on main (#44285342311)
  • Next Build on main (#44300535269)
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