Skip to content

feat: add Connect-RPC service definitions for 6 plugins#70

Merged
rustatian merged 2 commits into
masterfrom
feature/plugin-services
May 10, 2026
Merged

feat: add Connect-RPC service definitions for 6 plugins#70
rustatian merged 2 commits into
masterfrom
feature/plugin-services

Conversation

@rustatian
Copy link
Copy Markdown
Member

@rustatian rustatian commented May 10, 2026

Summary

Adds proto service blocks for the six RR plugins migrating from net/rpc + goridge codec to Connect-RPC: app-logger, status, lock, kv, service, jobs. Existing message types are reused where possible.

New messages introduced:

  • applogger/v2/LogMessage { string message = 1; } for the primitive-string Error/Info/Warning/Debug/Log RPCs (domain-specific rather than wrapperspb.StringValue, leaves room for future fields).
  • jobs/v2/PushRequest { Job job = 1; } for single-job pushes — shape-enforces single-job semantics, replaces the runtime len(req.Batch) != 1 guard.

Naming changes to avoid same-package message/RPC collisions:

  • service.v1.ServiceManager: CreateCreateService, StatusGetStatus, StatusesGetStatuses, ListListServices.
  • jobs.v2.JobsService: StatGetStats (the Stat message exists in the same package).

Centralizes the RPC naming lints in buf.yaml: disables RPC_REQUEST_RESPONSE_UNIQUE, RPC_REQUEST_STANDARD_NAME, RPC_RESPONSE_STANDARD_NAME module-wide and drops the now-redundant per-method // buf:lint:ignore directives from http/v2/service.proto. RR plugin RPCs share request types across methods (e.g. all LockService RPCs use LockRequest/LockResponse) and use domain-object naming, so these rules are a structural mismatch.

Adds .claude/settings.local.json to .gitignore.

Breaking changes

  • jobs/v2: the placeholder JobsProxyService.JobsHandler is replaced by the multi-method JobsService. No live Go-side consumers — PHP still uses the goridge codec and migrates on its own timeline.

Summary by CodeRabbit

  • New Features

    • Added logging service with multiple log levels (Error, Info, Warning, Debug).
    • Added key-value storage service with Set, Get, Delete, and TTL operations.
    • Added distributed lock service with read/write locking and TTL management.
    • Added service lifecycle management and status endpoints.
    • Enhanced job service with push, batch, and pipeline operations.
  • Chores

    • Updated build configuration and local environment settings.

Review Change Stack

…k, kv, service, jobs

Adds proto `service` blocks for the six RR plugins migrating from
net/rpc + goridge codec to Connect-RPC. Existing message types are
reused; only two additions:

- applogger/v2: new `LogMessage { string message = 1; }` for the
  primitive-string Error/Info/Warning/Debug/Log RPCs. Domain-specific
  rather than wrapperspb.StringValue so future fields (level, caller
  skip) can be added without breaking the wire.
- jobs/v2: new `PushRequest { Job job = 1; }` for single-job pushes.
  Proto-shape enforces single-job semantics; the runtime guard
  `len(req.Batch) != 1` becomes obsolete when the jobs plugin migrates.

Also:
- Replaces the placeholder `JobsProxyService.JobsHandler` with the
  real multi-method `JobsService` (Push/PushBatch/Pause/Resume/List/
  Declare/Destroy/GetStats). The placeholder had no live consumers.
- service/v1 RPC method names are prefixed (CreateService, GetStatus,
  GetStatuses, ListServices) to avoid collisions with existing same-
  named messages (Create, Status, Statuses, List).
- jobs `Stat` -> `GetStats` to avoid collision with the `Stat` message.
- Centralizes RPC naming lints in buf.yaml: disables
  RPC_REQUEST_RESPONSE_UNIQUE, RPC_REQUEST_STANDARD_NAME,
  RPC_RESPONSE_STANDARD_NAME module-wide (RR plugin RPCs share request
  types and use domain-object names). Removes the per-method
  buf:lint:ignore directives from http/v2/service.proto.
- Adds .claude/settings.local.json to .gitignore.

Breaking changes:
- jobs/v2: JobsProxyService replaced by JobsService. No live Go-side
  consumers; PHP still uses the goridge codec and migrates separately.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ef4be3db-e354-4645-be69-9ca0fe06f3ea

📥 Commits

Reviewing files that changed from the base of the PR and between 265bb1e and 24d7b63.

📒 Files selected for processing (10)
  • .gitignore
  • buf.yaml
  • roadrunner/api/applogger/v2/service.proto
  • roadrunner/api/http/v2/service.proto
  • roadrunner/api/jobs/v2/request.proto
  • roadrunner/api/jobs/v2/service.proto
  • roadrunner/api/kv/v2/service.proto
  • roadrunner/api/lock/v1/service.proto
  • roadrunner/api/service/v1/service_rpc.proto
  • roadrunner/api/status/v2/service.proto
💤 Files with no reviewable changes (1)
  • roadrunner/api/http/v2/service.proto

📝 Walkthrough

Walkthrough

This PR expands the roadrunner gRPC API by introducing five new service definitions—AppLogger, KV, Lock, Service management, and Status—alongside a refactored Jobs service. It consolidates protobuf lint suppressions into buf.yaml and removes redundant inline lint comments. All files follow consistent Go and PHP code-generation conventions.

Changes

Proto API Service Expansion

Layer / File(s) Summary
Protobuf Lint Configuration
buf.yaml
Adds except section disabling RPC request/response naming and uniqueness rules, and service suffix conventions to accommodate the new service definitions.
Proto File Headers
roadrunner/api/applogger/v2/service.proto, roadrunner/api/kv/v2/service.proto, roadrunner/api/lock/v1/service.proto, roadrunner/api/service/v1/service_rpc.proto, roadrunner/api/status/v2/service.proto, roadrunner/api/jobs/v2/service.proto
Establishes package declarations, imports of shared proto dependencies, and consistent Go/PHP code-generation options across all new service files.
Data Message Contracts
roadrunner/api/applogger/v2/service.proto, roadrunner/api/jobs/v2/request.proto
Defines LogMessage for logging payloads and PushRequest for single-job submission with enforced single-item semantics.
Service Definitions
roadrunner/api/applogger/v2/service.proto, roadrunner/api/kv/v2/service.proto, roadrunner/api/lock/v1/service.proto, roadrunner/api/service/v1/service_rpc.proto, roadrunner/api/status/v2/service.proto, roadrunner/api/jobs/v2/service.proto
Introduces AppLoggerService (Error/Info/Warning/Debug with context variants), KvService (Has/Set/MGet/MExpire/TTL/Delete/Clear), LockService (Lock/LockRead/Release/ForceRelease/Exists/UpdateTTL), ServiceManager (CreateService/Terminate/Restart/GetStatus/GetStatuses/ListServices), StatusService (Status/Ready), and JobsService replacing JobsProxyService with Push/PushBatch/Pause/Resume/List/Declare/Destroy/GetStats.
HTTP Service Cleanup
roadrunner/api/http/v2/service.proto
Removes inline buf:lint:ignore comments from HttpProxyService RPC declarations, as lint rules are now centrally configured.
Development Setup
.gitignore
Adds .claude/settings.local.json to ignore list for local development tool configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

C-enhancement

Suggested reviewers

  • wolfy-j

🐰 A dozen services now bloom,
From proto roots, expanding room,
Lint rules align, the APIs align,
Each RPC endpoint so fine!
The queue hops swift, the locks stand tight,
The status shines, our future bright! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding Connect-RPC service definitions for 6 plugins, which is the primary objective of this PR.
Description check ✅ Passed The PR description comprehensively covers the reasoning, detailed changes, new messages, naming changes, lint configuration updates, breaking changes, and files modified.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/plugin-services

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rustatian rustatian self-assigned this May 10, 2026
@rustatian rustatian marked this pull request as ready for review May 10, 2026 10:57
Copilot AI review requested due to automatic review settings May 10, 2026 10:57
@rustatian rustatian added the C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc.. label May 10, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Connect-RPC service definitions for multiple RoadRunner plugins by introducing new service.proto files (or new service blocks) that reuse existing request/response messages, plus a small Buf lint configuration update to accommodate the plugins’ shared request/response shapes.

Changes:

  • Added Connect-RPC service definitions for status, lock, kv, service, and applogger.
  • Replaced jobs.v2.JobsProxyService with a multi-method jobs.v2.JobsService, introducing PushRequest for single-job pushes.
  • Centralized/relaxed certain Buf RPC naming lints and removed now-redundant per-method lint ignores from http/v2/service.proto; added a local Claude settings file to .gitignore.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
roadrunner/api/status/v2/service.proto Adds StatusService RPC surface for status checks.
roadrunner/api/service/v1/service_rpc.proto Adds ServiceManager RPCs with renamed methods to avoid message/RPC name collisions.
roadrunner/api/lock/v1/service.proto Adds LockService RPC surface reusing existing lock messages.
roadrunner/api/kv/v2/service.proto Adds KvService RPC surface reusing existing KV messages.
roadrunner/api/jobs/v2/service.proto Replaces placeholder proxy service with JobsService multi-method API.
roadrunner/api/jobs/v2/request.proto Adds PushRequest message to enforce single-job push shape.
roadrunner/api/http/v2/service.proto Removes per-method Buf lint ignore comments now covered by buf.yaml.
roadrunner/api/applogger/v2/service.proto Adds AppLoggerService plus LogMessage for string-only log RPCs.
buf.yaml Disables several Buf RPC naming rules module-wide (and SERVICE_SUFFIX).
.gitignore Ignores .claude/settings.local.json.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread buf.yaml
@rustatian rustatian merged commit 4595101 into master May 10, 2026
5 checks passed
@rustatian rustatian deleted the feature/plugin-services branch May 10, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc..

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants