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

supabase / supabase-py / 41640930194
98%

Build:
DEFAULT BRANCH: main
Ran 03 Nov 2026 01:03PM UTC
Jobs 30
Files 175
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 01:03PM UTC coverage: 96.878% (+0.03%) from 96.852%
41640930194

push

github

web-flow
fix(realtime): forget channels in remove_all_channels (#1925)

## What

`AsyncRealtimeClient.remove_all_channels()` sent `phx_leave` for every
channel and closed the socket, but never removed the channels from
`self.channels`. The socket closes right away, so the leave replies that
would normally drop them never arrive, and `get_channels()` kept
returning every "removed" channel. On top of that, it iterated
`self.channels.items()` directly, so a leave reply processed mid-removal
(`on_close` → `_remove_channel`) raised `RuntimeError: dictionary
changed size during iteration`.

Fixes SDK-1674. Also reported as #1678 (SDK-1970).

## Changes

- `remove_all_channels()` now loops over a snapshot of the channels,
unsubscribes each one, and removes it with `_remove_channel` (the same
path `remove_channel()` uses). If an unsubscribe raises, the loop still
removes every channel and closes the socket, then re-raises the first
error.
- Leaves are sent one at a time rather than concurrently like
realtime-js. If the connection drops during removal, concurrent sends
would each start their own reconnect, and `connect()` has no guard
against that. Sending sequentially keeps it to one.
- New `tests/test_remove_all_channels.py`, with no live server: a fake
connection patched into `realtime._async.client.connect` records sent
messages and can answer leaves with a `phx_reply`. Covers an empty
`get_channels()` afterwards, a leave per channel, the socket being
closed, a fresh channel for a reused topic, leave replies arriving
during removal, and removal continuing past an unsubscribe that raises.
All four tests fail on `main`.

## realtime-js behaviour

#1678 was closed because realtime-js supposedly doesn't clear its
channels either. It does, though not with a literal `this.channels =
[]`. `removeAllChannels()` in
[`packages/core/realtime-js/src/RealtimeClient.ts`](https://github.com/supabase/supabase-js/blob/ecab7fb69/packages/core/realtime-... (continued)

13310 of 13739 relevant lines covered (96.88%)

5.01 hits per line

Coverage Regressions

Lines Coverage ∆ File
6
91.3
1.85% src/realtime/_async/client.py
Jobs
ID Job ID Ran Files Coverage
1 run-ubuntu-latest-3.15-functions - 41640930194.1 03 Nov 2026 01:03PM UTC 18
97.98
GitHub Action Run
2 run-ubuntu-latest-3.12-storage - 41640930194.2 03 Nov 2026 01:05PM UTC 42
96.09
GitHub Action Run
3 run-ubuntu-latest-3.12-functions - 41640930194.3 03 Nov 2026 01:03PM UTC 18
97.98
GitHub Action Run
4 run-ubuntu-latest-3.14-functions - 41640930194.4 03 Nov 2026 01:03PM UTC 18
97.98
GitHub Action Run
5 run-ubuntu-latest-3.15-supabase - 41640930194.5 03 Nov 2026 01:04PM UTC 22
96.92
GitHub Action Run
6 run-ubuntu-latest-3.11-realtime - 41640930194.6 03 Nov 2026 01:05PM UTC 17
93.58
GitHub Action Run
7 run-ubuntu-latest-3.12-supabase - 41640930194.7 03 Nov 2026 01:03PM UTC 22
96.93
GitHub Action Run
8 run-ubuntu-latest-3.13-functions - 41640930194.8 03 Nov 2026 01:03PM UTC 18
97.98
GitHub Action Run
9 run-ubuntu-latest-3.11-auth - 41640930194.9 03 Nov 2026 01:04PM UTC 61
96.37
GitHub Action Run
10 run-ubuntu-latest-3.15-postgrest - 41640930194.10 03 Nov 2026 01:04PM UTC 39
97.7
GitHub Action Run
11 run-ubuntu-latest-3.14-supabase - 41640930194.11 03 Nov 2026 01:03PM UTC 22
96.92
GitHub Action Run
12 run-ubuntu-latest-3.12-auth - 41640930194.12 03 Nov 2026 01:04PM UTC 61
96.37
GitHub Action Run
13 run-ubuntu-latest-3.11-supabase - 41640930194.13 03 Nov 2026 01:03PM UTC 22
96.93
GitHub Action Run
14 run-ubuntu-latest-3.11-postgrest - 41640930194.14 03 Nov 2026 01:04PM UTC 39
97.7
GitHub Action Run
15 run-ubuntu-latest-3.13-supabase - 41640930194.15 03 Nov 2026 01:03PM UTC 22
96.93
GitHub Action Run
16 run-ubuntu-latest-3.12-realtime - 41640930194.16 03 Nov 2026 01:05PM UTC 17
93.49
GitHub Action Run
17 run-ubuntu-latest-3.13-realtime - 41640930194.17 03 Nov 2026 01:05PM UTC 17
93.49
GitHub Action Run
18 run-ubuntu-latest-3.11-storage - 41640930194.18 03 Nov 2026 01:04PM UTC 42
96.09
GitHub Action Run
19 run-ubuntu-latest-3.14-postgrest - 41640930194.19 03 Nov 2026 01:04PM UTC 39
97.7
GitHub Action Run
20 run-ubuntu-latest-3.14-storage - 41640930194.20 03 Nov 2026 01:04PM UTC 42
96.08
GitHub Action Run
21 run-ubuntu-latest-3.14-realtime - 41640930194.21 03 Nov 2026 01:05PM UTC 17
93.07
GitHub Action Run
22 run-ubuntu-latest-3.15-realtime - 41640930194.22 03 Nov 2026 01:05PM UTC 17
93.07
GitHub Action Run
23 run-ubuntu-latest-3.12-postgrest - 41640930194.23 03 Nov 2026 01:04PM UTC 39
97.7
GitHub Action Run
24 run-ubuntu-latest-3.15-auth - 41640930194.24 03 Nov 2026 01:04PM UTC 61
96.36
GitHub Action Run
25 run-ubuntu-latest-3.11-functions - 41640930194.25 03 Nov 2026 01:03PM UTC 18
97.98
GitHub Action Run
26 run-ubuntu-latest-3.14-auth - 41640930194.26 03 Nov 2026 01:04PM UTC 61
96.36
GitHub Action Run
27 run-ubuntu-latest-3.13-auth - 41640930194.27 03 Nov 2026 01:04PM UTC 61
96.37
GitHub Action Run
28 run-ubuntu-latest-3.13-storage - 41640930194.28 03 Nov 2026 01:04PM UTC 42
96.09
GitHub Action Run
29 run-ubuntu-latest-3.15-storage - 41640930194.29 03 Nov 2026 01:06PM UTC 42
96.08
GitHub Action Run
30 run-ubuntu-latest-3.13-postgrest - 41640930194.30 03 Nov 2026 01:04PM UTC 39
97.7
GitHub Action Run
Source Files on build 41640930194
  • Tree
  • List 175
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41640930194
  • 22090f06 on github
  • Prev Build on main (#41635530197)
  • Next Build on main (#41641729152)
  • 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