feat: define protos for kranes gateway management#4364
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughIntroduces a new protobuf definition file for Krane v1 Gateway API, defining the GatewayService with three RPC operations (CreateGateway, GetGateway, DeleteGateway) and supporting message types for gateway lifecycle management including status tracking and instance information. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant GatewayService
rect rgb(200, 220, 240)
Note over Client,GatewayService: Create Gateway Lifecycle
Client->>GatewayService: CreateGateway(CreateGatewayRequest)
GatewayService-->>Client: CreateGatewayResponse (status: PENDING)
end
rect rgb(200, 220, 240)
Note over Client,GatewayService: Retrieve Gateway State
Client->>GatewayService: GetGateway(GetGatewayRequest)
GatewayService-->>Client: GetGatewayResponse (instances: [GatewayInstance])
end
rect rgb(200, 220, 240)
Note over Client,GatewayService: Delete Gateway
Client->>GatewayService: DeleteGateway(DeleteGatewayRequest)
GatewayService-->>Client: DeleteGatewayResponse (empty)
end
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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 |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
go/proto/krane/v1/gateway.proto(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: Flo4604
Repo: unkeyed/unkey PR: 4190
File: go/internal/services/keys/verifier.go:51-53
Timestamp: 2025-10-30T15:10:52.743Z
Learning: PR #4190 for unkeyed/unkey is focused solely on database schema and query changes for identity-based credits. It adds IdentityCredits and KeyCredits fields to structs and queries, but does not implement the priority enforcement logic in the usagelimiter. The logic implementation is intentionally deferred to a later PR in the stack.
🪛 Buf (1.60.0)
go/proto/krane/v1/gateway.proto
3-3: Files with package "krane.v1" must be within a directory "krane/v1" relative to root but were in directory "go/proto/krane/v1".
(PACKAGE_DIRECTORY_MATCH)
⏰ 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)
- GitHub Check: Test API / API Test Local
- GitHub Check: Test Go API Local / Test
- GitHub Check: Build / Build
🔇 Additional comments (2)
go/proto/krane/v1/gateway.proto (2)
61-72: LGTM on enum and message definitions.The
GatewayStatusenum is well-structured with meaningful comments for each state, and theGatewayInstancemessage is properly typed. Good use of proto3 best practices (UNSPECIFIED default value).
1-5: The Buf lint error claim in this review is incorrect.The file location and package declaration are correct. All proto files in
go/proto/follow the same structure:go/proto/{package_part1}/{package_part2}/{file}.protowith package{package_part1}.{package_part2}. The Buf module root is configured asproto/ingo/buf.yaml, makingkrane/v1/gateway.protorelative to the module root, which perfectly matches the packagekrane.v1. This pattern is consistently used across all proto files (cache/v1,ctrl/v1,vault/v1, etc.) without errors.However, there is a valid concern:
UpdateGatewayRequestandUpdateGatewayResponsemessages are defined (lines 38–39) but no correspondingUpdateGatewayRPC exists in theGatewayService. Either add the RPC to the service or remove the unused messages.Likely an incorrect or invalid review comment.

What does this PR do?
Adds a new protobuf definition for the Krane Gateway Service. This includes:
Fixes # (issue)
Type of change
How should this be tested?
Checklist
Required
pnpm buildpnpm fmtmake fmton/godirectoryconsole.logsgit pull origin main