Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
📝 WalkthroughWalkthroughMigrates deployment service calls from the generic Restate ingress usage to proto-generated, typed ingress clients; updates docs to show the typed client pattern; adds a helper on Service to build the typed client and bumps restatedev/sdk-go and related deps. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant API as Ctrl Service
participant Client as Service.deploymentClient
participant Ingress as Restate Ingress (typed)
rect rgb(235,245,255)
note right of API: Create deployment (fire-and-forget)
API->>Client: Deploy().Send(ctx, DeployRequest)
Client->>Ingress: Deploy endpoint (typed)
Ingress-->>Client: ack / error
Client-->>API: Send returned (nil or error)
end
rect rgb(245,250,235)
note right of API: Promote / Rollback (Request flow)
API->>Client: Promote().Request(ctx, PromoteRequest)
Client->>Ingress: Promote endpoint (typed)
Ingress-->>Client: Response / error
Client-->>API: Response / error
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)go/apps/ctrl/services/deployment/create_deployment.go (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (1)
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 |
|
Thank you for following the naming conventions for pull request titles! 🙏 |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
go/gen/proto/hydra/v1/certificate_restate.pb.gois excluded by!**/*.pb.go,!**/gen/**go/gen/proto/hydra/v1/deployment_restate.pb.gois excluded by!**/*.pb.go,!**/gen/**go/gen/proto/hydra/v1/routing_restate.pb.gois excluded by!**/*.pb.go,!**/gen/**go/go.sumis excluded by!**/*.sum
📒 Files selected for processing (6)
apps/engineering/content/docs/architecture/workflows/creating-services.mdx(1 hunks)go/apps/ctrl/services/deployment/create_deployment.go(1 hunks)go/apps/ctrl/services/deployment/promote.go(1 hunks)go/apps/ctrl/services/deployment/rollback.go(1 hunks)go/apps/ctrl/services/deployment/service.go(2 hunks)go/go.mod(3 hunks)
🧰 Additional context used
🧬 Code graph analysis (4)
go/apps/ctrl/services/deployment/rollback.go (2)
internal/proto/generated/ctrl/v1/deployment_pb.ts (1)
RollbackRequest(398-408)go/gen/proto/hydra/v1/deployment.pb.go (3)
RollbackRequest(121-127)RollbackRequest(140-140)RollbackRequest(155-157)
go/apps/ctrl/services/deployment/service.go (1)
go/gen/proto/hydra/v1/deployment_restate.pb.go (2)
DeploymentServiceIngressClient(64-68)NewDeploymentServiceIngressClient(76-82)
go/apps/ctrl/services/deployment/create_deployment.go (1)
go/gen/proto/hydra/v1/deployment.pb.go (3)
DeployRequest(25-32)DeployRequest(45-45)DeployRequest(60-62)
go/apps/ctrl/services/deployment/promote.go (1)
go/gen/proto/hydra/v1/deployment.pb.go (3)
PromoteRequest(209-214)PromoteRequest(227-227)PromoteRequest(242-244)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Test Go API Local / Test
- GitHub Check: Test Packages / Test
- GitHub Check: Build / Build
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (6)
go/go.mod (1)
33-33: LGTM! SDK upgrade enables typed ingress clients.The upgrade from v0.20.0 to v0.21.0 provides the proto-generated ingress client support used throughout this PR.
go/apps/ctrl/services/deployment/service.go (1)
21-25: LGTM! Clean helper encapsulates typed client creation.The
deploymentClienthelper properly constructs a typed ingress client keyed by project ID, ensuring serialization of operations per project via Restate's Virtual Object pattern.go/apps/ctrl/services/deployment/promote.go (1)
34-38: LGTM! Correctly migrated to typed ingress client.The promotion flow now uses the typed client with proper blocking semantics via
Request(). Type safety is improved while maintaining the same error handling and logging behavior.go/apps/ctrl/services/deployment/rollback.go (1)
36-41: LGTM! Consistent with promote pattern.The rollback flow correctly adopts the typed client approach with blocking semantics, maintaining consistency with the promote implementation.
apps/engineering/content/docs/architecture/workflows/creating-services.mdx (1)
133-183: LGTM! Documentation accurately reflects the new pattern.The updated documentation clearly demonstrates the typed client approach with practical examples that match the actual implementation. The Benefits section effectively communicates the value of this migration.
go/apps/ctrl/services/deployment/create_deployment.go (1)
138-144: LGTM! Correctly uses async Send() for deployment workflow.The fire-and-forget pattern with
Send()is appropriate for the async deployment workflow, and the typed client provides compile-time type safety for the request payload.
…or-better' of github.com:unkeyed/unkey into eng-2118-use-restates-proto-generated-ingress-instead-for-better
Graphite Automations"Post a GIF when PR approved" took an action on this PR • (10/20/25)1 gif was posted to this PR based on Andreas Thomas's automation. |
…s-instead-for-better

What does this PR do?
Fixes #4097
Type of change
How should this be tested?
Run the control plane and check all operations that use restate, if they still work. E.g deployment/rollback/promotion
Checklist
Required
pnpm buildpnpm fmtconsole.logsgit pull origin mainAppreciated