[Controller] Add gRPC support for listStores API - #2413
Merged
pthirun merged 4 commits intoJan 28, 2026
Conversation
This PR migrates the LIST_STORES endpoint from HTTP to gRPC as part of the controller gRPC migration effort. Changes: - Added ListStoresGrpcRequest and ListStoresGrpcResponse proto messages - Added listStores RPC to StoreGrpcService - Implemented listStores method in StoreRequestHandler with filtering support - Added listStores override in StoreGrpcServiceImpl - Updated StoresRoutes to use handler for LIST_STORES endpoint - Added comprehensive unit tests for gRPC service and HTTP routes - Added integration test for the new gRPC endpoint The gRPC endpoint supports: - Filtering by includeSystemStores flag - Filtering by store config name/value Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Improve test coverage from 0% to 64% instruction coverage and 69% branch coverage. Tests added: - Basic store listing with/without system stores - Empty list handling - Cluster name validation - Config filter XOR validation - Invalid config name detection - Data replication policy filtering (with/without matches, null policy) Remaining uncovered paths (36%) involve complex config filters requiring fully initialized ZKStore objects, which are adequately covered by integration tests. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…d parameter Update getAllStores and validateStoreDeleted methods in StoresRoutes to use the storeRequestHandler field passed to the constructor, instead of accepting it as a method parameter. This follows the cleaner pattern established in SchemaRoutes and reduces complexity in route method signatures. Changes: - StoresRoutes: Update getAllStores(Admin, StoreRequestHandler) to getAllStores(Admin) - StoresRoutes: Update validateStoreDeleted(Admin, StoreRequestHandler) to validateStoreDeleted(Admin) - AdminSparkServer: Remove handler parameter from route method calls - StoresRoutesTest: Update tests to pass handler to constructor
pthirun
enabled auto-merge (squash)
January 28, 2026 19:24
sushantmane
pushed a commit
to sushantmane/venice
that referenced
this pull request
Jan 30, 2026
Add gRPC support for the listStores API while maintaining backward compatibility with the existing HTTP endpoint. Changes: - Add listStores RPC to StoreGrpcService.proto - Add handler method to StoreRequestHandler - Add gRPC service implementation (no ACL check - consistent with HTTP) - Update HTTP route to delegate to shared handler Tests: - Unit tests for success, error, invalid input, and filter handling - Integration tests for full lifecycle"
misyel
pushed a commit
to misyel/venice
that referenced
this pull request
Feb 2, 2026
Add gRPC support for the listStores API while maintaining backward compatibility with the existing HTTP endpoint. Changes: - Add listStores RPC to StoreGrpcService.proto - Add handler method to StoreRequestHandler - Add gRPC service implementation (no ACL check - consistent with HTTP) - Update HTTP route to delegate to shared handler Tests: - Unit tests for success, error, invalid input, and filter handling - Integration tests for full lifecycle"
sushantmane
pushed a commit
to sushantmane/venice
that referenced
this pull request
Feb 8, 2026
Add gRPC support for the listStores API while maintaining backward compatibility with the existing HTTP endpoint. Changes: - Add listStores RPC to StoreGrpcService.proto - Add handler method to StoreRequestHandler - Add gRPC service implementation (no ACL check - consistent with HTTP) - Update HTTP route to delegate to shared handler Tests: - Unit tests for success, error, invalid input, and filter handling - Integration tests for full lifecycle"
misyel
pushed a commit
to misyel/venice
that referenced
this pull request
Feb 17, 2026
Add gRPC support for the listStores API while maintaining backward compatibility with the existing HTTP endpoint. Changes: - Add listStores RPC to StoreGrpcService.proto - Add handler method to StoreRequestHandler - Add gRPC service implementation (no ACL check - consistent with HTTP) - Update HTTP route to delegate to shared handler Tests: - Unit tests for success, error, invalid input, and filter handling - Integration tests for full lifecycle"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem Statement
As part of the controller gRPC migration, the
listStoresAPI needs to be available via gRPC while maintaining the existing HTTP endpoint during the migration period. This follows the same pattern established by other controller API migrations, where business logic is abstracted so both HTTP and gRPC can share the same implementation.Solution
Added gRPC support for the
listStoresAPI following the established migration pattern:StoreGrpcService.proto): AddedlistStoresRPC method withListStoresGrpcRequestandListStoresGrpcResponsemessages, including support for filtering (includeSystemStores, storeConfigNameFilter, storeConfigValueFilter)StoreRequestHandler.java): AddedlistStores()method that validates parameters and callsadmin.getAllStores()with filtering support, returning a gRPC responseStoreGrpcServiceImpl.java): AddedlistStores()override (no ACL check, consistent with HTTP endpoint behavior)StoresRoutes.java): UpdatedgetAllStores()to convert HTTP requests to gRPC format and delegate to the shared handlerAdminSparkServer.java): Updated to pass the request handler to the routeThe implementation reuses the existing business logic in
Admin.getAllStores(), ensuring consistency between HTTP and gRPC endpoints.Code changes
Concurrency-Specific Checks
Both reviewer and PR author to verify
synchronized,RWLock) are used where needed. (N/A - no shared mutable state)ConcurrentHashMap,CopyOnWriteArrayList). (N/A - no collections introduced)handleRequest()utility for consistent error handling)How was this PR tested?
testListStoresReturnsSuccessfulResponse- Verifies successful response with stores listtestListStoresReturnsErrorResponse- Verifies error handlingtestListStoresWithBadRequest- Verifies validation of invalid requeststestListStoresWithFilters- Verifies filtering functionalitytestGetAllStores- Verifies HTTP route success casetestGetAllStoresReturnsEmptyList- Verifies empty list handlingtestGetAllStoresReturnsError- Verifies HTTP error handlingtestGetAllStoresWithFilters- Verifies HTTP filter handlingtestListStoresGrpcEndpoint- End-to-end test with real cluster./gradlew :services:venice-controller:test :services:venice-controller:jacocoTestReportDoes this PR introduce any user-facing or breaking changes?