Skip to content

wire psrpc bus compression into the message bus constructor - #4844

Merged
paulwe merged 1 commit into
masterfrom
psrpc-bus-compression
Sep 5, 2026
Merged

paulwe merged 1 commit into
masterfrom
psrpc-bus-compression

Conversation

@paulwe

@paulwe paulwe commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

psrpc v0.7.6 (psrpc#130) added opt-in gzip at the bus boundary. getMessageBus built the bus from the redis client alone, so there was no way to reach the settings. It now takes rpc.PSRPCConfig — which getPSRPCConfig already supplies to both the InitializeServer and InitializeRouter provider sets, so no wire.Build entries changed — and passes BusOptions() to the constructor.

psrpc:
  compression:
    quality: 6
    threshold: 1024

The options go to the local bus as well, so both buses behave the same way.

Depends on livekit/protocol#1771, pinned here by pseudo-version.

Compression is off by default

A peer on a psrpc older than v0.7.6 cannot decode a compressed payload, and psrpc's subscription read loop drops undecodable messages. Egress, ingress, SIP and agent workers share this bus, so enabling it is a two-stage operator action: roll v0.7.6+ everywhere, then raise quality at publishers. config-sample.yaml says so at the setting.

max_decompressed_size defaults to 0, unlimited, so no message starts being dropped by a cap nobody set.

wire_gen.go

psrpc#130 changed type MessageBus bus.MessageBus into a type alias. wire names generated variables after the named type, and for an alias to an internal/ type it falls back to v — so messageBus became v and the later vN variables shifted by one. That accounts for most of the generated diff.

Testing

  • go test ./pkg/config/... covers the new defaults and override cases; TestYAMLTag recurses into the protocol-side struct and TestConfig_UnknownKeys proves strict mode accepts the key.
  • go generate ./pkg/service/... leaves the checked-in wire_gen.go unchanged.
  • Verified end to end over a signal relay with a throwaway test: quality: 6 round-trips a 16 KB payload, max_decompressed_size: 64 drops that same payload, and quality: 0 with the same cap delivers it. The last case confirms the payload was actually compressed.

Follow-up

The psrpc constructors are variadic now, which wire records as a required []psrpc.BusOption input. Repos that pass them straight into a provider set need a one-line wrapper before their next wire run: cloud-inspector/cmd/server/wire.go:30, cloud-io/cmd/server/wire.go:41 and :78, cloud-api-server/pkg/server/wire.go:137. Checked-in wire_gen.go files compile until then.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

getMessageBus built the bus from the redis client alone, so there was no
way to reach the gzip settings psrpc v0.7.6 added at the bus boundary.
Take rpc.PSRPCConfig, which the wire graph already provides, and pass its
bus options to both the redis and the local bus.

Compression is off by default. A peer on an older psrpc cannot decode a
compressed payload and drops it silently, so egress, ingress, SIP and
agent workers all have to be upgraded before quality is raised.
@paulwe
paulwe force-pushed the psrpc-bus-compression branch from 08aa7a3 to 2cc8435 Compare September 5, 2026 13:36
@paulwe
paulwe merged commit e18fbcc into master Sep 5, 2026
3 checks passed
@paulwe
paulwe deleted the psrpc-bus-compression branch September 5, 2026 13:59
eleboucher pushed a commit to eleboucher/homelab that referenced this pull request Sep 14, 2026
…6 ➔ v1.13.7) (#2108)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [docker.io/livekit/livekit-server](https://github.com/livekit/livekit) | patch | `v1.13.6` → `v1.13.7` |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/567) for more information.

---

### Release Notes

<details>
<summary>livekit/livekit (docker.io/livekit/livekit-server)</summary>

### [`v1.13.7`](https://github.com/livekit/livekit/releases/tag/v1.13.7)

[Compare Source](livekit/livekit@v1.13.6...v1.13.7)

##### Added

- Participant kind agent details ([#&#8203;4809](livekit/livekit#4809))
- report a reason on room-ended telemetry ([#&#8203;4815](livekit/livekit#4815))
- telemetry: support roomID change for a participant ([#&#8203;4816](livekit/livekit#4816))
- log telemetry guard details ([#&#8203;4817](livekit/livekit#4817))
- ingress: add opt-in support for udp\:// URL pull ingress ([#&#8203;4810](livekit/livekit#4810))
- Support VP9/AV1 simulcast ([#&#8203;4830](livekit/livekit#4830))
- add test-server support for compressed join requests ([#&#8203;4834](livekit/livekit#4834))
- wire psrpc bus compression into the message bus constructor ([#&#8203;4844](livekit/livekit#4844))
- turn: accept PROXY protocol on the TCP listener ([#&#8203;4852](livekit/livekit#4852))
- telemetry: add visibility into stats worker reference underflow ([#&#8203;4856](livekit/livekit#4856))
- rtc: add GetSubscribedDataTracks to LocalParticipant ([#&#8203;4862](livekit/livekit#4862))

##### Changed

- Skip the docker-backed service tests when there is no docker ([#&#8203;4799](livekit/livekit#4799))
- Wait for the callbacks these tests assert on. ([#&#8203;4803](livekit/livekit#4803))
- utils: make Median generic, overflow-safe, and add tests ([#&#8203;4553](livekit/livekit#4553))
- warp log ([#&#8203;4811](livekit/livekit#4811))
- Remove duplication within cpuload and sysload ([#&#8203;4818](livekit/livekit#4818))
- Update github.com/livekit/protocol digest to [`a469dd4`](livekit/livekit@a469dd4) ([#&#8203;4820](livekit/livekit#4820))
- update ice fork for warp ([#&#8203;4824](livekit/livekit#4824))
- Move data track packet serialization to protocol ([#&#8203;4829](livekit/livekit#4829))
- Update README to include snippet about Agents ([#&#8203;4808](livekit/livekit#4808))
- protocol update for SDP unmarshal hardening ([#&#8203;4836](livekit/livekit#4836))
- Update golang Docker tag to v1.26.7 ([#&#8203;4846](livekit/livekit#4846))
- README rewrite ([#&#8203;4837](livekit/livekit#4837))

##### Fixed

- Set up track info properly for dummy receiver. ([#&#8203;4807](livekit/livekit#4807))
- Do not escape the ICE server URI in the WHIP Link header ([#&#8203;4795](livekit/livekit#4795))
- fix: hold signal messages until the ReconnectResponse goes out ([#&#8203;4827](livekit/livekit#4827))
- Fix/reconcile data track subscription deadlock ([#&#8203;4843](livekit/livekit#4843))
- telemetry: drop unused getCPUStats, unblocking darwin builds without cgo ([#&#8203;4841](livekit/livekit#4841))
- update psrpc for subscription close goroutine leak fix ([#&#8203;4859](livekit/livekit#4859))
- telemetry: do not recreate a stats worker for a released guard ([#&#8203;4860](livekit/livekit#4860))
- Get participant by authed identity in WHIP participant service. ([#&#8203;4861](livekit/livekit#4861))

</details>

---

### Configuration

📅 **Schedule**: (in timezone Europe/Paris)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC44My4xIiwidXBkYXRlZEluVmVyIjoiNDQuODMuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsicmVub3ZhdGUvY29udGFpbmVyIiwidHlwZS9wYXRjaCJdfQ==-->

Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/2108
hbjydev pushed a commit to hbjydev/phoebe that referenced this pull request Sep 14, 2026
…6 → v1.13.7) (#611)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [docker.io/livekit/livekit-server](https://github.com/livekit/livekit) | patch | `v1.13.6` → `v1.13.7` |

---

### Release Notes

<details>
<summary>livekit/livekit (docker.io/livekit/livekit-server)</summary>

### [`v1.13.7`](https://github.com/livekit/livekit/releases/tag/v1.13.7)

[Compare Source](livekit/livekit@v1.13.6...v1.13.7)

##### Added

- Participant kind agent details ([#&#8203;4809](livekit/livekit#4809))
- report a reason on room-ended telemetry ([#&#8203;4815](livekit/livekit#4815))
- telemetry: support roomID change for a participant ([#&#8203;4816](livekit/livekit#4816))
- log telemetry guard details ([#&#8203;4817](livekit/livekit#4817))
- ingress: add opt-in support for udp\:// URL pull ingress ([#&#8203;4810](livekit/livekit#4810))
- Support VP9/AV1 simulcast ([#&#8203;4830](livekit/livekit#4830))
- add test-server support for compressed join requests ([#&#8203;4834](livekit/livekit#4834))
- wire psrpc bus compression into the message bus constructor ([#&#8203;4844](livekit/livekit#4844))
- turn: accept PROXY protocol on the TCP listener ([#&#8203;4852](livekit/livekit#4852))
- telemetry: add visibility into stats worker reference underflow ([#&#8203;4856](livekit/livekit#4856))
- rtc: add GetSubscribedDataTracks to LocalParticipant ([#&#8203;4862](livekit/livekit#4862))

##### Changed

- Skip the docker-backed service tests when there is no docker ([#&#8203;4799](livekit/livekit#4799))
- Wait for the callbacks these tests assert on. ([#&#8203;4803](livekit/livekit#4803))
- utils: make Median generic, overflow-safe, and add tests ([#&#8203;4553](livekit/livekit#4553))
- warp log ([#&#8203;4811](livekit/livekit#4811))
- Remove duplication within cpuload and sysload ([#&#8203;4818](livekit/livekit#4818))
- Update github.com/livekit/protocol digest to [`a469dd4`](livekit/livekit@a469dd4) ([#&#8203;4820](livekit/livekit#4820))
- update ice fork for warp ([#&#8203;4824](livekit/livekit#4824))
- Move data track packet serialization to protocol ([#&#8203;4829](livekit/livekit#4829))
- Update README to include snippet about Agents ([#&#8203;4808](livekit/livekit#4808))
- protocol update for SDP unmarshal hardening ([#&#8203;4836](livekit/livekit#4836))
- Update golang Docker tag to v1.26.7 ([#&#8203;4846](livekit/livekit#4846))
- README rewrite ([#&#8203;4837](livekit/livekit#4837))

##### Fixed

- Set up track info properly for dummy receiver. ([#&#8203;4807](livekit/livekit#4807))
- Do not escape the ICE server URI in the WHIP Link header ([#&#8203;4795](livekit/livekit#4795))
- fix: hold signal messages until the ReconnectResponse goes out ([#&#8203;4827](livekit/livekit#4827))
- Fix/reconcile data track subscription deadlock ([#&#8203;4843](livekit/livekit#4843))
- telemetry: drop unused getCPUStats, unblocking darwin builds without cgo ([#&#8203;4841](livekit/livekit#4841))
- update psrpc for subscription close goroutine leak fix ([#&#8203;4859](livekit/livekit#4859))
- telemetry: do not recreate a stats worker for a released guard ([#&#8203;4860](livekit/livekit#4860))
- Get participant by authed identity in WHIP participant service. ([#&#8203;4861](livekit/livekit#4861))

</details>

---

### Configuration

📅 **Schedule**: (in timezone Europe/London)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC44My4yIiwidXBkYXRlZEluVmVyIjoiNDQuODMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsicmVub3ZhdGUvY29udGFpbmVyIiwidHlwZS9wYXRjaCJdfQ==-->

Reviewed-on: https://git.hayden.moe/hayden/phoebe/pulls/611
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants