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

supabase / supabase-py / 41626959553
98%

Build:
DEFAULT BRANCH: main
Ran 03 Nov 2026 11:22AM UTC
Jobs 29
Files 167
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

03 Nov 2026 11:22AM UTC coverage: 95.802% (+0.05%) from 95.748%
41626959553

push

github

web-flow
fix(realtime): report CHANNEL_ERROR to subscribers when the connection drops (#1897)

Fixes #1898

## Summary

When the WebSocket connection drops, `AsyncRealtimeClient` marks joined
and joining channels as `ERRORED`, but it never calls the subscribe
callback. If the server comes back, subscribers see `SUBSCRIBED` twice
with nothing in between, so they can't tell there was a gap in the
stream. If reconnecting gives up, subscribers are never told at all.
supabase-js reports `CHANNEL_ERROR` in this case (Phoenix calls
`triggerChanError` on socket close), and this PR makes the Python client
do the same.

## What changed

- Added `AsyncRealtimeClient._set_channels_errored(error)`. It marks
each joined or joining channel as `ERRORED`, queues it for rejoin, and
calls its subscribe callback with
`RealtimeSubscribeStates.CHANNEL_ERROR` and the close error.
- `_reconnect()` now takes the error that caused the disconnect and
calls the new helper.
- Subscribers are notified on every path where the connection drops:
- An error close (`ConnectionClosedError`), with or without
auto-reconnect.
- A clean server close (codes 1000 and 1001), with or without
auto-reconnect. Here the error is the `ConnectionClosedOK` from the
websocket connection's protocol.
- When auto-reconnect is off, channels on a dropped connection now
become `ERRORED` instead of staying `JOINED`, so calling `connect()`
again later rejoins them.

## Resulting callback sequence

| Scenario | Callback statuses |
| ----------------------- | -------------------------------------------
|
| Server comes back | `SUBSCRIBED`, `CHANNEL_ERROR`, `SUBSCRIBED` |
| Reconnect gives up | `SUBSCRIBED`, `CHANNEL_ERROR` |
| Auto-reconnect disabled | `SUBSCRIBED`, `CHANNEL_ERROR` |

## Tests

- New `tests/test_reconnect_status.py` runs a local WebSocket server
that closes the connection with code 1011 or 1000. It checks the
callback sequence, the error type, and the channel state when the server
comes back, when it sta... (continued)

12712 of 13269 relevant lines covered (95.8%)

4.73 hits per line

Coverage Regressions

Lines Coverage ∆ File
19
89.45
3.3% src/realtime/_async/client.py
Jobs
ID Job ID Ran Files Coverage
1 run-ubuntu-latest-3.12-auth - 41626959553.1 03 Nov 2026 11:23AM UTC 57
93.92
GitHub Action Run
2 run-ubuntu-latest-3.14-storage - 41626959553.2 03 Nov 2026 11:23AM UTC 40
95.69
GitHub Action Run
3 run-ubuntu-latest-3.13-functions - 41626959553.3 03 Nov 2026 11:22AM UTC 18
97.98
GitHub Action Run
4 run-ubuntu-latest-3.13-auth - 41626959553.4 03 Nov 2026 11:23AM UTC 57
93.92
GitHub Action Run
5 run-ubuntu-latest-3.15-postgrest - 41626959553.5 03 Nov 2026 11:23AM UTC 39
97.7
GitHub Action Run
6 run-ubuntu-latest-3.12-functions - 41626959553.6 03 Nov 2026 11:22AM UTC 18
97.98
GitHub Action Run
7 run-ubuntu-latest-3.11-functions - 41626959553.7 03 Nov 2026 11:22AM UTC 18
97.98
GitHub Action Run
8 run-ubuntu-latest-3.14-functions - 41626959553.8 03 Nov 2026 11:22AM UTC 18
97.98
GitHub Action Run
9 run-ubuntu-latest-3.12-supabase - 41626959553.9 03 Nov 2026 11:22AM UTC 20
96.85
GitHub Action Run
10 run-ubuntu-latest-3.13-postgrest - 41626959553.10 03 Nov 2026 11:23AM UTC 39
97.7
GitHub Action Run
11 run-ubuntu-latest-3.14-realtime - 41626959553.11 03 Nov 2026 11:23AM UTC 17
91.72
GitHub Action Run
12 run-ubuntu-latest-3.11-auth - 41626959553.12 03 Nov 2026 11:23AM UTC 57
93.92
GitHub Action Run
13 run-ubuntu-latest-3.15-realtime - 41626959553.13 03 Nov 2026 11:24AM UTC 17
91.72
GitHub Action Run
14 run-ubuntu-latest-3.15-functions - 41626959553.14 03 Nov 2026 11:22AM UTC 18
97.98
GitHub Action Run
15 run-ubuntu-latest-3.12-postgrest - 41626959553.15 03 Nov 2026 11:23AM UTC 39
97.7
GitHub Action Run
16 run-ubuntu-latest-3.14-auth - 41626959553.16 03 Nov 2026 11:23AM UTC 57
93.9
GitHub Action Run
17 run-ubuntu-latest-3.11-realtime - 41626959553.17 03 Nov 2026 11:23AM UTC 17
92.34
GitHub Action Run
18 run-ubuntu-latest-3.11-postgrest - 41626959553.18 03 Nov 2026 11:23AM UTC 39
97.7
GitHub Action Run
19 run-ubuntu-latest-3.15-auth - 41626959553.19 03 Nov 2026 11:23AM UTC 57
93.9
GitHub Action Run
20 run-ubuntu-latest-3.13-realtime - 41626959553.20 03 Nov 2026 11:23AM UTC 17
92.24
GitHub Action Run
21 run-ubuntu-latest-3.15-storage - 41626959553.21 03 Nov 2026 11:25AM UTC 40
95.69
GitHub Action Run
22 run-ubuntu-latest-3.13-supabase - 41626959553.22 03 Nov 2026 11:22AM UTC 20
96.85
GitHub Action Run
23 run-ubuntu-latest-3.15-supabase - 41626959553.23 03 Nov 2026 11:22AM UTC 20
96.84
GitHub Action Run
24 run-ubuntu-latest-3.12-storage - 41626959553.24 03 Nov 2026 11:23AM UTC 40
95.71
GitHub Action Run
25 run-ubuntu-latest-3.12-realtime - 41626959553.25 03 Nov 2026 11:23AM UTC 17
92.24
GitHub Action Run
26 run-ubuntu-latest-3.14-supabase - 41626959553.26 03 Nov 2026 11:22AM UTC 20
96.84
GitHub Action Run
27 run-ubuntu-latest-3.11-storage - 41626959553.27 03 Nov 2026 11:23AM UTC 40
95.71
GitHub Action Run
28 run-ubuntu-latest-3.11-supabase - 41626959553.28 03 Nov 2026 11:22AM UTC 20
96.85
GitHub Action Run
29 run-ubuntu-latest-3.13-storage - 41626959553.29 03 Nov 2026 11:23AM UTC 40
95.71
GitHub Action Run
Source Files on build 41626959553
  • Tree
  • List 167
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41626959553
  • a00d1aa0 on github
  • Prev Build on main (#41625746008)
  • Next Build on main (#41632975450)
  • 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