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

supabase / supabase-py / 41646648796
98%

Build:
DEFAULT BRANCH: main
Ran 03 Nov 2026 01:42PM UTC
Jobs 29
Files 182
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:41PM UTC coverage: 99.006% (+0.001%) from 99.005%
41646648796

push

github

web-flow
fix(realtime): serialize initial websocket handshakes (#1853)

## Why

Concurrent initial channel subscriptions can open two WebSockets on one
client. The second assignment loses the first socket, which remains
alive after `close()`.

Closes #1852.

## What changed

- Serialize the opening handshake and recheck the connection under a
lazy client lock.
- Add a real localhost WebSocket regression for concurrent
subscriptions, a sequential control, cancellation, and failed-handshake
retry.

## Scope

This covers initial connection ownership in the current Realtime API.
Reconnect policy and the v3 lifecycle rewrite in #1798 remain separate.
Legacy
[realtime-py#290](https://github.com/supabase/realtime-py/pull/290)
handles background-task cancellation rather than duplicate handshakes.

## Tradeoffs

Create the lock inside `connect()` so clients constructed before
`asyncio.run()` work on Python 3.9. Keep buffered-send setup outside the
lock because it can trigger a reconnect.

## Blast radius

Only the async Realtime client changes. No public signatures,
dependencies, or retry settings change.

## Verification

- New tests on untouched upstream fail twice with two sockets and one
orphan. The fix passes all four tests, including on Python 3.9. The
public wire reproduction now reports one socket and none after close.
- No-service package selection passes 28 tests. Existing AsyncPush
teardown diagnostics also occur on upstream. Mypy, Ruff, format, `make
ruff`, wheel and sdist build, and `git diff --check` pass.
- Full Supabase service tests are unverified. Isolated CLI startup fails
before services start because Docker image blobs return input/output
errors.

AI-assisted contribution. Reproductions and checks were run locally.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* Concurrent connection attempts now share a single WebSocket
connection, prevent... (continued)

15133 of 15285 relevant lines covered (99.01%)

4.92 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
99.25
0.05% src/realtime/_async/client.py
Jobs
ID Job ID Ran Files Coverage
1 run-ubuntu-latest-3.12-supabase - 41646648796.1 03 Nov 2026 01:42PM UTC 22
97.93
GitHub Action Run
2 run-ubuntu-latest-3.13-supabase - 41646648796.2 03 Nov 2026 01:42PM UTC 22
97.93
GitHub Action Run
3 run-ubuntu-latest-3.11-supabase - 41646648796.3 03 Nov 2026 01:42PM UTC 22
97.93
GitHub Action Run
4 run-ubuntu-latest-3.14-postgrest - 41646648796.4 03 Nov 2026 01:43PM UTC 41
99.55
GitHub Action Run
5 run-ubuntu-latest-3.12-auth - 41646648796.5 03 Nov 2026 01:42PM UTC 64
98.74
GitHub Action Run
6 run-ubuntu-latest-3.12-storage - 41646648796.6 03 Nov 2026 01:43PM UTC 43
98.5
GitHub Action Run
7 run-ubuntu-latest-3.12-functions - 41646648796.7 03 Nov 2026 01:42PM UTC 18
97.98
GitHub Action Run
8 run-ubuntu-latest-3.11-postgrest - 41646648796.8 03 Nov 2026 01:43PM UTC 41
99.55
GitHub Action Run
9 run-ubuntu-latest-3.14-functions - 41646648796.9 03 Nov 2026 01:42PM UTC 18
97.98
GitHub Action Run
10 run-ubuntu-latest-3.15-auth - 41646648796.10 03 Nov 2026 01:43PM UTC 64
98.73
GitHub Action Run
11 run-ubuntu-latest-3.13-functions - 41646648796.11 03 Nov 2026 01:42PM UTC 18
97.98
GitHub Action Run
12 run-ubuntu-latest-3.12-realtime - 41646648796.12 03 Nov 2026 01:43PM UTC 17
98.09
GitHub Action Run
13 run-ubuntu-latest-3.13-realtime - 41646648796.13 03 Nov 2026 01:43PM UTC 17
98.09
GitHub Action Run
14 run-ubuntu-latest-3.15-supabase - 41646648796.14 03 Nov 2026 01:42PM UTC 22
97.92
GitHub Action Run
15 run-ubuntu-latest-3.11-auth - 41646648796.15 03 Nov 2026 01:43PM UTC 64
98.74
GitHub Action Run
16 run-ubuntu-latest-3.11-storage - 41646648796.16 03 Nov 2026 01:43PM UTC 43
98.5
GitHub Action Run
17 run-ubuntu-latest-3.11-functions - 41646648796.17 03 Nov 2026 01:42PM UTC 18
97.98
GitHub Action Run
18 run-ubuntu-latest-3.15-realtime - 41646648796.18 03 Nov 2026 01:43PM UTC 17
97.97
GitHub Action Run
19 run-ubuntu-latest-3.14-storage - 41646648796.19 03 Nov 2026 01:43PM UTC 43
98.5
GitHub Action Run
20 run-ubuntu-latest-3.14-auth - 41646648796.20 03 Nov 2026 01:42PM UTC 64
98.61
GitHub Action Run
21 run-ubuntu-latest-3.13-auth - 41646648796.21 03 Nov 2026 01:42PM UTC 64
98.74
GitHub Action Run
22 run-ubuntu-latest-3.15-postgrest - 41646648796.22 03 Nov 2026 01:43PM UTC 41
99.55
GitHub Action Run
23 run-ubuntu-latest-3.15-functions - 41646648796.23 03 Nov 2026 01:42PM UTC 18
97.98
GitHub Action Run
24 run-ubuntu-latest-3.11-realtime - 41646648796.24 03 Nov 2026 01:43PM UTC 17
98.09
GitHub Action Run
25 run-ubuntu-latest-3.12-postgrest - 41646648796.25 03 Nov 2026 01:43PM UTC 41
99.55
GitHub Action Run
26 run-ubuntu-latest-3.13-postgrest - 41646648796.26 03 Nov 2026 01:43PM UTC 41
99.55
GitHub Action Run
27 run-ubuntu-latest-3.14-realtime - 41646648796.27 03 Nov 2026 01:43PM UTC 17
97.97
GitHub Action Run
28 run-ubuntu-latest-3.14-supabase - 41646648796.28 03 Nov 2026 01:42PM UTC 22
97.92
GitHub Action Run
29 run-ubuntu-latest-3.15-storage - 41646648796.29 03 Nov 2026 01:44PM UTC 43
98.5
GitHub Action Run
Source Files on build 41646648796
  • Tree
  • List 182
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41646648796
  • c5150d65 on github
  • Prev Build on main (#41646438585)
  • Next Build on main (#41648382876)
  • 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