-
Notifications
You must be signed in to change notification settings - Fork 702
Add BridgeGRpcClient #19546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BridgeGRpcClient #19546
Conversation
🟢 |
56bc6d7
to
d7a18bf
Compare
⚪ Test history | Ya make output | Test bloat
⚪
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Introduces a new “bridge” service and client to manage per-pile cluster state via gRPC.
- Registers a
bridge
module in build scripts and YaMake files. - Implements
TBridgeGRpcService
and backend handlers (rpc_bridge.cpp
) for Get/UpdateClusterState. - Adds
TBridgeClient
in the C++ SDK along with protos (ydb_bridge.proto
/ydb_bridge_v1.proto
) and integrates the service into the runner and tracing.
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
ydb/services/ya.make | Added bridge to services build recursion |
ydb/services/bridge/ya.make | New build file for the bridge service |
ydb/services/bridge/grpc_service.h | Declares TBridgeGRpcService |
ydb/services/bridge/grpc_service.cpp | Implements service setup and incoming requests |
ydb/public/sdk/cpp/src/client/bridge/ya.make | Build file for the C++ bridge client |
ydb/public/sdk/cpp/src/client/bridge/bridge.cpp | Implements TBridgeClient methods |
ydb/public/sdk/cpp/include/ydb-cpp-sdk/client/bridge/bridge.h | Public header for TBridgeClient API |
ydb/public/api/protos/ya.make | Includes ydb_bridge.proto |
ydb/public/api/protos/draft/ydb_bridge.proto | Defines bridge‐related protobuf messages |
ydb/public/api/grpc/draft/ydb_bridge_v1.proto | Defines BridgeService RPC methods |
ydb/public/api/grpc/draft/ya.make | Includes ydb_bridge_v1.proto |
ydb/library/services/services.proto | Adds BRIDGE enum to Kikimr services |
ydb/core/jaeger_tracing/request_discriminator.h | Registers BRIDGE_GETCLUSTERSTATE / UPDATE types |
ydb/core/jaeger_tracing/request_discriminator.cpp | Maps bridge RPC names to discriminator types |
ydb/core/grpc_services/ya.make | Adds rpc_bridge.cpp to core gRPC services |
ydb/core/grpc_services/service_bridge.h | Declares internal handlers DoGet/UpdateClusterState |
ydb/core/grpc_services/rpc_bridge_base.h | Base template for bridge request actors |
ydb/core/grpc_services/rpc_bridge.cpp | Implements bridge operation actor logic |
ydb/core/driver_lib/run/ya.make | Pulls in the bridge service for the driver |
ydb/core/driver_lib/run/run.cpp | Registers TBridgeGRpcService in the runner |
Comments suppressed due to low confidence (3)
ydb/services/bridge/grpc_service.h:27
- The member name
GRpcRequestProxyId
mixes uppercaseG
and lowercaser
. Rename toGrpcRequestProxyId
to match the commonGrpc
casing elsewhere.
NActors::TActorId GRpcRequestProxyId;
ydb/public/sdk/cpp/include/ydb-cpp-sdk/client/bridge/bridge.h:1
- The public API header lacks Doxygen or doc comments. Consider adding brief descriptions for
TBridgeClient
and its methods to match the style of other SDK clients.
#pragma once
ydb/public/sdk/cpp/src/client/bridge/bridge.cpp:8
- No unit or integration tests accompany the new client code. Add tests for
UpdateClusterState
andGetClusterState
to verify serialization, error handling, and response extraction.
namespace NYdb::inline Dev::NBridge {
ydb/services/bridge/grpc_service.cpp
Outdated
TBridgeGRpcService::TBridgeGRpcService(NActors::TActorSystem* actorSystem, TIntrusivePtr<NMonitoring::TDynamicCounters> counters, NActors::TActorId grpcRequestProxyId) \ | ||
: ActorSystem(actorSystem) \ | ||
, Counters(std::move(counters)) | ||
, GRpcRequestProxyId(grpcRequestProxyId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Avoid using backslashes for line continuation in C++ source files; reformat the constructor initializer list onto multiple lines without \
for better readability.
TBridgeGRpcService::TBridgeGRpcService(NActors::TActorSystem* actorSystem, TIntrusivePtr<NMonitoring::TDynamicCounters> counters, NActors::TActorId grpcRequestProxyId) \ | |
: ActorSystem(actorSystem) \ | |
, Counters(std::move(counters)) | |
, GRpcRequestProxyId(grpcRequestProxyId) | |
TBridgeGRpcService::TBridgeGRpcService( | |
NActors::TActorSystem* actorSystem, | |
TIntrusivePtr<NMonitoring::TDynamicCounters> counters, | |
NActors::TActorId grpcRequestProxyId) | |
: ActorSystem(actorSystem), | |
Counters(std::move(counters)), | |
GRpcRequestProxyId(grpcRequestProxyId) |
Copilot uses AI. Check for mistakes.
d7a18bf
to
77fbabe
Compare
77fbabe
to
c22345d
Compare
c22345d
to
04cab53
Compare
04cab53
to
507861e
Compare
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except some minor issues.
public: | ||
using TBase::TBase; | ||
|
||
void Bootstrap(const TActorContext& ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need TActorContext anymore. Not in new code.
return false; | ||
} | ||
|
||
std::optional<ui32> primary, promoted; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ui32 -> TBridgePileId
ydb/public/sdk/cpp/include/ydb-cpp-sdk/client/draft/ydb_bridge.h
Outdated
Show resolved
Hide resolved
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SDK - ok
Changelog entry
Add BridgeGRpcClient
Changelog category
Description for reviewers
...