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

supabase / realtime-py / 16576482377
82%

Build:
DEFAULT BRANCH: main
Ran 28 Jul 2025 06:00PM UTC
Jobs 6
Files 17
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

28 Jul 2025 05:56PM UTC coverage: 82.404% (+1.3%) from 81.078%
16576482377

push

github

web-flow
feat: validate server message (#345)

* chore: introduce `ServerMessage` and `ClientMessage` types

`ServerMessage` represents all the different message types that a
server might send to a client
`ClientMessage` represents all the different message types that a
client might send to a server

these are there to validate the payload types, enforcing the
correctness of the payloads

* fix: improve messages schema

now all of messages should be valid

* feat: introduce `ServerMessage` parsing

now, instead of parsing and dispatching the messages inside the
`AsyncRealtimeChannel._trigger` function, first parse the message
using pydantic's `ServerMessageAdapter` type adapter, and then
dispatch the callbacks inside `_handle_message`, based on which
message was parsed.

this required the removal of the `_on` function, which was used to
both define callbacks to messages, but also to define callbacks to
event refs, which was very confusing. this behavior was used precisely
to define callbacks that are called on acks.

now, AsyncPush'es are saved in
AsyncRealtimeChannel.messages_waiting_for_ack, and later the callbacks
registered by `AsyncPush.receive` (now saved directly in the push
object) are called when a `phx_reply` type message is received.

some logic was introduce to avoid this message buffer from growing
forever indefinetly, by removing these messages from the dictionary
once the callback is called, or once the timeout is reached.

754 of 915 relevant lines covered (82.4%)

4.94 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
6
84.42
4.04% _async/presence.py
7
95.27
-3.64% types.py
20
78.02
-7.34% _async/push.py
41
73.33
-0.88% _async/client.py
49
72.3
-2.81% _async/channel.py
Jobs
ID Job ID Ran Files Coverage
1 run-ubuntu-latest-3.10 - 16576482377.1 28 Jul 2025 06:00PM UTC 17
82.4
GitHub Action Run
2 run-ubuntu-latest-3.13 - 16576482377.2 28 Jul 2025 06:00PM UTC 17
82.4
GitHub Action Run
3 run-ubuntu-latest-3.12 - 16576482377.3 28 Jul 2025 06:00PM UTC 17
82.4
GitHub Action Run
4 run-ubuntu-latest-3.9 - 16576482377.4 28 Jul 2025 06:00PM UTC 17
82.4
GitHub Action Run
5 run-ubuntu-latest-3.11 - 16576482377.5 28 Jul 2025 06:00PM UTC 17
82.4
GitHub Action Run
6 run-ubuntu-latest-nix-develop - 16576482377.6 28 Jul 2025 06:00PM UTC 17
82.4
GitHub Action Run
Source Files on build 16576482377
  • Tree
  • List 17
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #16576482377
  • 8c6066e6 on github
  • Prev Build on main (#16204567293)
  • Next Build on main (#16576671696)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc