feat(bigtable): update legacy escape hatch to return V2 admin clients#13375
feat(bigtable): update legacy escape hatch to return V2 admin clients#13375jinseopkim0 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request transitions BigtableInstanceAdminClient and BigtableTableAdminClient to use the V2 client classes (BigtableInstanceAdminClientV2 and BigtableTableAdminClientV2) instead of the base autogenerated clients. Key feedback includes resolving a compilation error in BigtableTableAdminClientV2.createAwaitConsistencyCallable due to a type mismatch with EnhancedBigtableTableAdminStub, and updating outdated Javadocs for getBaseClient() in both admin clients to accurately reflect the new V2 return types.
286f727 to
5ac8d52
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors BigtableInstanceAdminClient and BigtableTableAdminClient to use the newer V2 client implementations instead of the older Base clients. The review comments correctly identify compilation errors in BigtableTableAdminClient where EnhancedBigtableTableAdminStub is passed to methods expecting GrpcBigtableTableAdminStub. To fix this, the reviewer suggests exposing the underlying GrpcBigtableTableAdminStub from EnhancedBigtableTableAdminStub and using it during the client initialization.
5ac8d52 to
802f22e
Compare
802f22e to
e69b16c
Compare
| private final String projectId; | ||
| private final BigtableInstanceAdminStub stub; | ||
| private final BaseBigtableInstanceAdminClient baseClient; | ||
| private final BigtableInstanceAdminClientV2 baseClient; |
There was a problem hiding this comment.
nit, can we rename this to V2Client?
| boolean shouldAutoClose = | ||
| stub.getSettings().getBackgroundExecutorProvider().shouldAutoClose(); | ||
|
|
||
| AwaitConsistencyCallableV2 awaitConsistencyCallable = |
There was a problem hiding this comment.
wait this is a bit weird, why do we need to create the callable seperately instead of letting the V2 client create the callable?
This PR updates the legacy
BigtableTableAdminClientandBigtableInstanceAdminClientescape hatches (getBaseClient()) to return the modern V2 admin clients (BigtableTableAdminClientV2andBigtableInstanceAdminClientV2) instead of the autogenerated base clients (BaseBigtableTableAdminClientandBaseBigtableInstanceAdminClient).