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

supabase / supabase-py / 42245346092
98%

Build:
DEFAULT BRANCH: main
Ran 06 Nov 2026 03:41PM UTC
Jobs 35
Files 121
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

06 Nov 2026 03:41PM UTC coverage: 95.675% (-0.3%) from 95.995%
42245346092

push

github

web-flow
fix(realtime)!: raise send failures instead of writing to a failed connection (#2007)

## Summary

Since the v3 realtime rewrite, sends no longer buffer while disconnected
and no longer swallow `ConnectionClosed`. Two gaps from the ticket were
left:

* When the heartbeat timed out (or the listen loop failed), the client
recorded the failure but left the socket open. A fire-and-forget
`send_broadcast` then wrote to that dead connection and returned
normally, with no signal to the caller.
* `set_auth` sent the token to every joined channel, only logged a
warning when a send failed, and still stored the token. A retry with the
same token was then skipped as "still the same".

## Changes

* `RealtimeClient._send` and `_send_no_wait` raise the recorded
connection failure before writing. This covers `send_broadcast`,
`track`, `untrack`, `unsubscribe` and `set_auth`.
* `set_auth` sends the token to each joined channel in turn and lets a
failure propagate. The previous token is kept, so a retry sends the new
token again.
* The `send_broadcast` and `set_auth` docstrings now say what they
raise. The `send_broadcast` docstring also says that without
`broadcast_ack`, returning only means the frame was written.

Failures are raised as the underlying `websockets.ConnectionClosed` or
`TimeoutError`, the same exceptions `automatically_reconnect` already
catches to reconnect. Wrapping them in classified SDK errors is left to
SDK-2749.

## Breaking change

`set_auth` now raises when the token cannot be sent, instead of logging
a warning.

## Tests

New `tests/test_send_failures.py` against a local websocket server:

* `send_broadcast`, `track`, `untrack` and `unsubscribe` raise
`ConnectionClosed` after the server drops the connection.
* The same calls raise the recorded failure, and write nothing, once the
connection has been marked failed.
* An acknowledged broadcast raises on a closed connection.
* `set_auth` raises and keeps the previous token when the send fails.

... (continued)

9755 of 10196 relevant lines covered (95.67%)

4.88 hits per line

Coverage Regressions

Lines Coverage ∆ File
35
77.25
0.0% src/supabase_auth/client.py
10
94.55
-5.07% src/realtime/client.py
8
37.5
-44.32% conftest.py
5
92.06
0.0% src/supabase_auth/errors.py
5
60.0
-33.33% src/realtime/exceptions.py
3
91.89
-8.11% src/realtime/_redact.py
2
96.55
-3.45% src/postgrest/client.py
1
96.64
0.0% src/realtime/channel.py
Jobs
ID Job ID Ran Files Coverage
1 storage-py3.15-highest - 42245346092.1 06 Nov 2026 03:44PM UTC 22
95.33
GitHub Action Run
2 storage-py3.14-highest - 42245346092.2 06 Nov 2026 03:43PM UTC 22
95.33
GitHub Action Run
3 postgrest-py3.12-highest - 42245346092.3 06 Nov 2026 03:43PM UTC 25
97.83
GitHub Action Run
4 utils-py3.12-lowest-direct - 42245346092.4 06 Nov 2026 03:41PM UTC 19
99.51
GitHub Action Run
5 realtime-py3.14-highest - 42245346092.5 06 Nov 2026 03:42PM UTC 9
95.54
GitHub Action Run
6 auth-py3.13-highest - 42245346092.6 06 Nov 2026 03:42PM UTC 36
91.54
GitHub Action Run
7 realtime-py3.15-highest - 42245346092.7 06 Nov 2026 03:42PM UTC 9
95.54
GitHub Action Run
8 supabase-py3.12-highest - 42245346092.8 06 Nov 2026 03:41PM UTC 20
99.53
GitHub Action Run
9 realtime-py3.13-highest - 42245346092.9 06 Nov 2026 03:42PM UTC 9
95.88
GitHub Action Run
10 storage-py3.12-highest - 42245346092.10 06 Nov 2026 03:42PM UTC 22
95.35
GitHub Action Run
11 utils-py3.12-highest - 42245346092.11 06 Nov 2026 03:41PM UTC 19
99.51
GitHub Action Run
12 postgrest-py3.13-highest - 42245346092.12 06 Nov 2026 03:42PM UTC 25
97.83
GitHub Action Run
13 postgrest-py3.12-lowest-direct - 42245346092.13 06 Nov 2026 03:43PM UTC 25
97.83
GitHub Action Run
14 postgrest-py3.14-highest - 42245346092.14 06 Nov 2026 03:42PM UTC 25
97.83
GitHub Action Run
15 utils-py3.13-highest - 42245346092.15 06 Nov 2026 03:41PM UTC 19
99.51
GitHub Action Run
16 storage-py3.13-highest - 42245346092.16 06 Nov 2026 03:42PM UTC 22
95.35
GitHub Action Run
17 postgrest-py3.15-highest - 42245346092.17 06 Nov 2026 03:43PM UTC 25
97.83
GitHub Action Run
18 storage-py3.12-lowest-direct - 42245346092.18 06 Nov 2026 03:42PM UTC 22
95.35
GitHub Action Run
19 supabase-py3.14-highest - 42245346092.19 06 Nov 2026 03:41PM UTC 20
99.53
GitHub Action Run
20 realtime-py3.12-lowest-direct - 42245346092.20 06 Nov 2026 03:42PM UTC 9
95.88
GitHub Action Run
21 functions-py3.12-highest - 42245346092.21 06 Nov 2026 03:41PM UTC 15
97.76
GitHub Action Run
22 auth-py3.12-highest - 42245346092.22 06 Nov 2026 03:42PM UTC 36
91.54
GitHub Action Run
23 supabase-py3.13-highest - 42245346092.23 06 Nov 2026 03:41PM UTC 20
99.53
GitHub Action Run
24 realtime-py3.12-highest - 42245346092.24 06 Nov 2026 03:42PM UTC 9
95.88
GitHub Action Run
25 utils-py3.15-highest - 42245346092.25 06 Nov 2026 03:41PM UTC 19
99.5
GitHub Action Run
26 supabase-py3.12-lowest-direct - 42245346092.26 06 Nov 2026 03:41PM UTC 20
99.53
GitHub Action Run
27 functions-py3.12-lowest-direct - 42245346092.27 06 Nov 2026 03:41PM UTC 15
97.76
GitHub Action Run
28 functions-py3.15-highest - 42245346092.28 06 Nov 2026 03:41PM UTC 15
97.76
GitHub Action Run
29 functions-py3.14-highest - 42245346092.29 06 Nov 2026 03:41PM UTC 15
97.76
GitHub Action Run
30 supabase-py3.15-highest - 42245346092.30 06 Nov 2026 03:42PM UTC 20
99.53
GitHub Action Run
31 utils-py3.14-highest - 42245346092.31 06 Nov 2026 03:41PM UTC 19
99.5
GitHub Action Run
32 functions-py3.13-highest - 42245346092.32 06 Nov 2026 03:41PM UTC 15
97.76
GitHub Action Run
33 auth-py3.14-highest - 42245346092.33 06 Nov 2026 03:42PM UTC 36
91.51
GitHub Action Run
34 auth-py3.15-highest - 42245346092.34 06 Nov 2026 03:42PM UTC 36
91.51
GitHub Action Run
35 auth-py3.12-lowest-direct - 42245346092.35 06 Nov 2026 03:42PM UTC 36
91.54
GitHub Action Run
Source Files on build 42245346092
  • Tree
  • List 121
  • Changed 15
  • Source Changed 0
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #42245346092
  • 7f6add13 on github
  • Prev Build on main (#42241502791)
  • Next Build on main (#42251592050)
  • Delete
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