feature: migrate the control rpc to connect#205
Conversation
|
Warning Review limit reached
More reviews will be available in 55 minutes and 35 seconds. Learn how PR review limits work. Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #205 +/- ##
===========================================
+ Coverage 39.26% 72.51% +33.24%
===========================================
Files 9 9
Lines 848 564 -284
===========================================
+ Hits 333 409 +76
+ Misses 483 123 -360
Partials 32 32 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR migrates the Centrifuge plugin’s control RPC surface from the legacy RPC() any shape to a Connect-RPC handler (RPC() (string, http.Handler)), restoring access to the PHP-facing publish/broadcast/etc API on the v6 RPC plane by proxying requests to the connected Centrifugo gRPC API client.
Changes:
- Replaced the legacy RPC implementation with a Connect-RPC
CentrifugoApihandler and a generic forwarder that proxies calls to the Centrifugo gRPC client and maps gRPC status codes to Connect codes. - Updated
Plugin.RPC()to return the generated Connect handler for mounting on RoadRunner’s RPC server. - Bumped dependencies (including pinning
api-goto a pseudo-version) and updated module sums; adjusted unit test for the new Connect-based RPC entrypoint.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
rpc.go |
Reimplements Centrifugo control RPC as a Connect-RPC handler with a generic forwarding helper. |
plugin.go |
Updates RPC() to return (string, http.Handler) using the generated Connect handler. |
rpc_test.go |
Updates the not-ready test to call the Connect handler method and assert Connect error code. |
go.mod |
Adds connectrpc.com/connect and bumps api-go to the required pseudo-version. |
go.sum |
Adds sums for the new Connect dependency and updates sums for bumped modules. |
go.work.sum |
Workspace sums updated, but currently inconsistent with go.mod/go.sum for some entries. |
tests/go.mod |
Updates indirect dependencies for the tests module (incl. api-go pseudo-version). |
tests/go.sum |
Updates sums to match bumped test-module dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
RPC() anysurface (dead code in v6 — the rpc plugin no longer collects it) withRPC() (string, http.Handler)returning the generatedCentrifugoApiconnect handler, so the PHP-facing publish/broadcast/... API is reachable again on the v6 RPC planeCodeUnavailableclient.go) and theCentrifugoProxygRPC server (plugin.go) stay exactly as they wereapi-gois pinned to a pseudo-version of that branch — bump tov6.0.0-beta.13once tagged