feat: Connect-RPC service definitions for informer, metrics, resetter, tcp#74
Conversation
…tter, tcp Tier C plugin RPC migration: each gets its own v1 service block, with read-only methods marked NO_SIDE_EFFECTS so generated Connect handlers accept HTTP GET. informer/v1.InformerService - ListPlugins, GetWorkers, GetJobs (GET) - AddWorker, RemoveWorker metrics/v1.MetricsService - Add, Sub, Observe, Set (mutate prometheus state) - Declare, Unregister - CollectorType enum + Objective repeated message (proto3 disallows float-keyed maps) resetter/v1.ResetterService - ListPlugins (GET) - Reset tcp/v1.TCPService - Close
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR introduces four new gRPC service API definitions as protobuf specifications. The InformerService exposes worker state introspection and lifecycle operations, the MetricsService provides write-side metric mutation, the ResetterService controls plugin reset behavior, and the TCPService manages TCP connection closure. Each service is independently defined in its own protobuf package (informer.v1, metrics.v1, resetter.v1, tcp.v1). ChangesRuntime Management Service APIs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Pull request overview
Adds new Connect-RPC proto surfaces for four Tier C plugins (informer, metrics, resetter, tcp) under roadrunner/api/<domain>/v1/service.proto, enabling those plugins to migrate to Connect-RPC while marking read-only RPCs as NO_SIDE_EFFECTS for HTTP GET compatibility.
Changes:
- Introduce
InformerService(read-only introspection + worker add/remove) withProcessState/JobStatemessage models. - Introduce
MetricsServicefor runtime metric mutation, including collector/metric models andCollectorType. - Introduce
ResetterService(list plugins + reset) andTCPService(close connection by UUID).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| roadrunner/api/informer/v1/service.proto | Defines the Informer Connect-RPC surface and state snapshot messages. |
| roadrunner/api/metrics/v1/service.proto | Defines the Metrics Connect-RPC surface and Prometheus collector/metric DTOs. |
| roadrunner/api/resetter/v1/service.proto | Defines the Resetter Connect-RPC surface for listing/resetting plugins. |
| roadrunner/api/tcp/v1/service.proto | Defines the TCP Connect-RPC surface for closing connections by UUID. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…; correct TCP PHP namespace - informer/v1.ProcessState.pid: int64 → int32 (POSIX, matches service.v1.Status.pid) - informer/v1.ProcessState.cpu_percent: double → float (matches service.v1.Status.cpu_percent) - tcp/v1 PHP namespace: RoadRunner\Tcp → RoadRunner\TCP (matches HTTP/KV convention) Surfaced by Copilot review on PR #74.
Runs `buf lint` on every pull_request and master push. Uses the official bufbuild/buf-setup-action with the GITHUB_TOKEN to avoid GitHub API rate limits during buf installation.
third_party/api is a submodule (temporalio/api); without it the temporal proto's external imports don't resolve and buf lint fails.
Summary
Adds proto service blocks for the four Tier C plugins so they can migrate to Connect-RPC on the next plugin sweep. Each plugin gets its own
v1package underroadrunner/api/<domain>/v1/service.proto. Read-only RPCs are markedoption idempotency_level = NO_SIDE_EFFECTS;so the generated Connect handlers accept HTTP GET (clients without a Connect SDK — e.g. PHP via curl — can call them as plain GET requests).informer/v1.InformerServiceListPluginsGetWorkersGetJobsAddWorkerAddWorkerRequestRemoveWorkerRemoveWorkerRequestProcessStatemirrorspool/v2/state/process.State. Field widths follow the existingservice.v1.Statusconvention rather than the Go source:int32 pid(POSIX PIDs always fit) andfloat cpu_percent(consistency with the rest of the api repo).JobStatemirrorsapi-plugins/v6/jobs.State.metrics/v1.MetricsServiceAdd/Sub/Observe/SetMetricin its own dedicated request —AddRequest,SubRequest,ObserveRequest,SetRequestDeclareNamedCollectorUnregisterNotes:
CollectorTypeis a proto enum (HISTOGRAM/GAUGE/COUNTER/SUMMARY).Collector.Objectivesisrepeated Objective { double quantile; double error; }— proto3 forbids float-keyed maps (the Go type usesmap[float64]float64).metrics.addressconfig); it is not part of this RPC surface.resetter/v1.ResetterServiceListPluginsResettcp/v1.TCPServiceCloseSingle method: terminate an open TCP connection identified by UUID.
Breaking changes
None. These are net-new proto packages; no existing message or service is renamed or removed.