Skip to content

feat(service): mark GetStatus, GetStatuses, ListServices as NO_SIDE_EFFECTS#73

Merged
rustatian merged 1 commit into
masterfrom
feature/service-status-idempotent
May 11, 2026
Merged

feat(service): mark GetStatus, GetStatuses, ListServices as NO_SIDE_EFFECTS#73
rustatian merged 1 commit into
masterfrom
feature/service-status-idempotent

Conversation

@rustatian
Copy link
Copy Markdown
Member

@rustatian rustatian commented May 11, 2026

Summary

Annotate the three read-only methods on service.v1.ServiceManager with option idempotency_level = NO_SIDE_EFFECTS;:

  • GetStatus — returns the status of a single service's first process. (Deprecated in favor of GetStatuses, but still served.)
  • GetStatuses — returns per-process status for one service.
  • ListServices — enumerates registered service names.

Connect-RPC generates handlers that accept HTTP GET (in addition to POST) for methods carrying this annotation. CDN/proxy/browser layers can cache the responses; PHP clients can probe via GET /service.v1.ServiceManager/ListServices?message=... directly.

CreateService, Terminate, Restart stay POST-only — each mutates the service plugin's internal process table.

The annotation is additive: existing POST clients continue to work unchanged. After this PR lands, update-proto.yml will regenerate the Connect bindings on api-go and the next api-go v6.0.0-beta.X tag will pick up the new behavior.

Summary by CodeRabbit

  • Improvements
    • Service status check operations are now explicitly marked as safe to retry without unintended side effects. This API enhancement improves reliability and consistency across service management workflows.

Review Change Stack

…FFECTS

Annotate the three read-only methods on service.v1.ServiceManager with
idempotency_level = NO_SIDE_EFFECTS so Connect-RPC handlers accept
HTTP GET for them. The service plugin's read endpoints can then sit
behind CDN/proxy caches and be probed from cacheable URLs.

CreateService, Terminate, Restart stay POST-only — each mutates the
service plugin's process table.

Additive proto change; existing POST clients keep working.
Copilot AI review requested due to automatic review settings May 11, 2026 18:27
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 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: cd348329-b4aa-4038-b54a-ef22807fbf7e

📥 Commits

Reviewing files that changed from the base of the PR and between 8399265 and cf80a55.

📒 Files selected for processing (1)
  • roadrunner/api/service/v1/service_rpc.proto

📝 Walkthrough

Walkthrough

The PR adds explicit idempotency_level = NO_SIDE_EFFECTS option declarations to three read-only RPC methods (GetStatus, GetStatuses, ListServices) in the ServiceManager service definition, changing their syntax from bare method signatures to method blocks with option directives.

Changes

RPC Idempotency Declaration

Layer / File(s) Summary
ServiceManager Read-Only RPC Idempotency
roadrunner/api/service/v1/service_rpc.proto
GetStatus, GetStatuses, and ListServices are marked with option idempotency_level = NO_SIDE_EFFECTS, signaling that these read-only queries produce no side effects and can be safely retried.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • roadrunner-server/api#70: Earlier PR introduced/defined the GetStatus, GetStatuses, and ListServices RPC methods in ServiceManager; this PR adds idempotency declarations to those same methods.

Suggested labels

C-enhancement

Poem

A rabbit hops through proto files with glee,
Marking queries: "safe to retry, you see!"
GetStatus, GetStatuses, ListServices bright,
NO_SIDE_EFFECTS makes the API right. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: marking three read-only RPC methods with NO_SIDE_EFFECTS idempotency level.
Description check ✅ Passed The description is comprehensive and follows the template structure with clear sections, but the PR Checklist section is missing required checkbox confirmations.
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/service-status-idempotent

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.

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

This PR updates the service.v1.ServiceManager protobuf API to explicitly mark the three read-only RPC methods as NO_SIDE_EFFECTS, enabling Connect-RPC to safely expose them over HTTP GET (in addition to POST) for improved caching/probing behavior while keeping mutating methods POST-only.

Changes:

  • Annotated GetStatus with option idempotency_level = NO_SIDE_EFFECTS;
  • Annotated GetStatuses with option idempotency_level = NO_SIDE_EFFECTS;
  • Annotated ListServices with option idempotency_level = NO_SIDE_EFFECTS;

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

@rustatian rustatian self-assigned this May 11, 2026
@rustatian rustatian added the C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc.. label May 11, 2026
@rustatian rustatian merged commit 4542a59 into master May 11, 2026
5 checks passed
@rustatian rustatian deleted the feature/service-status-idempotent branch May 11, 2026 18:30
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