[Controller] Add gRPC support for isStoreMigrationAllowed API - #2409
Merged
pthirun merged 6 commits intoJan 28, 2026
Merged
Conversation
pthirun
force-pushed
the
controller-grpc-migration-is-store-migration-allowed
branch
from
January 27, 2026 01:27
3962d19 to
fe60a04
Compare
Add gRPC support for the isStoreMigrationAllowed endpoint while maintaining backward compatibility with the existing HTTP endpoint. Changes: - Add isStoreMigrationAllowed RPC to ClusterAdminOpsGrpcService.proto - Add handler method to ClusterAdminOpsRequestHandler - Add gRPC service implementation in ClusterAdminOpsGrpcServiceImpl - Update HTTP route to convert requests to gRPC format - Update AdminSparkServer to pass request handler - Add comprehensive unit tests for gRPC service and HTTP route Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
pthirun
force-pushed
the
controller-grpc-migration-is-store-migration-allowed
branch
from
January 27, 2026 01:32
fe60a04 to
09c719b
Compare
Add missing unit tests for the isStoreMigrationAllowed method in ClusterAdminOpsRequestHandler to achieve 100% code coverage. Tests added: - testIsStoreMigrationAllowedReturnsTrue - testIsStoreMigrationAllowedReturnsFalse - testIsStoreMigrationAllowedInvalidCluster Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
sushantmane
reviewed
Jan 27, 2026
sushantmane
left a comment
Contributor
There was a problem hiding this comment.
Overall LGTM few minor comments
Rename IsStoreMigrationAllowedGrpcRequest/Response to StoreMigrationCheckGrpcRequest/Response for brevity. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…d parameter Update ClusterRoutes to accept ClusterAdminOpsRequestHandler in constructor and use the field in isStoreMigrationAllowed, instead of accepting it as a method parameter. This follows the cleaner pattern established in other routes. Changes: - ClusterRoutes: Add clusterAdminOpsRequestHandler field and constructor - ClusterRoutes: Update isStoreMigrationAllowed(Admin, Handler) to isStoreMigrationAllowed(Admin) - AdminSparkServer: Pass handler to ClusterRoutes constructor - ClusterRoutesTest: Update tests to pass handler to constructor
Add testIsStoreMigrationAllowedGrpcEndpoint integration test to verify the gRPC endpoint works end-to-end. This fixes the spotless check failure caused by the unused assertTrue import.
pthirun
deleted the
controller-grpc-migration-is-store-migration-allowed
branch
January 28, 2026 23:09
sushantmane
pushed a commit
to sushantmane/venice
that referenced
this pull request
Jan 30, 2026
misyel
pushed a commit
to misyel/venice
that referenced
this pull request
Feb 2, 2026
sushantmane
pushed a commit
to sushantmane/venice
that referenced
this pull request
Feb 8, 2026
misyel
pushed a commit
to misyel/venice
that referenced
this pull request
Feb 17, 2026
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
isStoreMigrationAllowedAPI 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
isStoreMigrationAllowedAPI following the established migration pattern:ClusterAdminOpsGrpcService.proto): AddedisStoreMigrationAllowedRPC method withIsStoreMigrationAllowedGrpcRequestandIsStoreMigrationAllowedGrpcResponsemessagesClusterAdminOpsRequestHandler.java): AddedisStoreMigrationAllowed()method that validates parameters and callsadmin.isStoreMigrationAllowed(), returning a gRPC responseClusterAdminOpsGrpcServiceImpl.java): AddedisStoreMigrationAllowed()override (no ACL check needed - any user is allowed to check migration status, matching HTTP endpoint behavior)ClusterRoutes.java): Updated 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.isStoreMigrationAllowed(), 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?
ClusterAdminOpsRequestHandlerTest.java):testIsStoreMigrationAllowedReturnsTrue- Verifies handler returns true when migration is allowedtestIsStoreMigrationAllowedReturnsFalse- Verifies handler returns false when migration is not allowedtestIsStoreMigrationAllowedInvalidCluster- Verifies handler throws exception for invalid inputClusterAdminOpsGrpcServiceImplTest.java):testIsStoreMigrationAllowedSuccess- Verifies gRPC layer returns correct protobuf responsetestIsStoreMigrationAllowedReturnsFalse- Verifies gRPC layer handles false value correctlytestIsStoreMigrationAllowedError- Verifies gRPC layer maps exceptions to INTERNAL statusClusterRoutesTest.java):testIsStoreMigrationAllowedReturnsTrue- Verifies HTTP layer converts to/from gRPC correctlytestIsStoreMigrationAllowedReturnsFalse- Verifies HTTP layer handles false value correctlytestIsStoreMigrationAllowedError- Verifies HTTP layer sets error flag on exceptionTestControllerGrpcEndpoints.java):testIsStoreMigrationAllowedGrpcEndpoint- End-to-end test with real Venice clusterDoes this PR introduce any user-facing or breaking changes?