-
Couldn't load subscription status.
- Fork 179
feat: Http2ClientProtocolConfig and GrpcClientProtocolConfig in internal proto #21785
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Derek Riley <[email protected]>
Signed-off-by: Derek Riley <[email protected]>
Signed-off-by: Derek Riley <[email protected]>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Signed-off-by: Derek Riley <[email protected]>
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #21785 +/- ##
============================================
+ Coverage 71.82% 71.84% +0.02%
- Complexity 24546 24578 +32
============================================
Files 2670 2674 +4
Lines 103892 104026 +134
Branches 10867 10890 +23
============================================
+ Hits 74619 74739 +120
- Misses 25231 25233 +2
- Partials 4042 4054 +12
... and 28 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
Signed-off-by: Derek Riley <[email protected]>
.../hedera-app/src/main/java/com/hedera/node/app/blocks/impl/streaming/BlockNodeConnection.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Derek Riley <[email protected]>
| */ | ||
| private final List<BlockNodeConfig> availableBlockNodes = new ArrayList<>(); | ||
|
|
||
| private Map<BlockNodeConfig, Http2ClientProtocolConfig> http2ClientProtocolConfigs = new ConcurrentHashMap<>(); |
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.
Can we not just include the Http2ClientProtocolConfig and GrpcClientProtocolConfig configs on the BlockNodeConfig object, or maybe some wrapper that encapsulates all three configs, instead of having three different collections with the different configs?
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.
We could, however I wanted to build the io.helidon.webclient.http2/grpc variants just once when parsing the json, rather than building it everytime we open a new connection
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.
That's fine, but I still think it would be a lot cleaner to keep them configs in one single object that we can pass around instead of needing to use additional maps/getters that need to be called by the connection objects to get the remaining configs.
Signed-off-by: Derek Riley <[email protected]>
Signed-off-by: Derek Riley <[email protected]>
Signed-off-by: Derek Riley <[email protected]>
Signed-off-by: Derek Riley <[email protected]>
|
What do you think about doing something like this: This way we have everything in one config object for each connection, and then instead of passing in |
Description:
This pull request introduces support for per-node protocol configuration for block node connections, allowing each node to specify custom HTTP/2 and gRPC client protocol settings. These changes make the configuration of block node connections more flexible and robust, enabling fine-tuned control over connection behavior for each node. The implementation includes updates to protobuf definitions, Java classes, and build configurations to support and process these new settings.
Protocol configuration support for block node connections
block_node_connections.proto) to add optionalHttp2ClientProtocolConfigandGrpcClientProtocolConfigmessages, and corresponding fields toBlockNodeConfig, enabling per-node protocol configuration.Java implementation for protocol config extraction and usage
BlockNodeConnectionManagerto extract and store optional HTTP/2 and gRPC protocol configs from configuration files, and provide accessors for these configs.BlockNodeConnectionto use the extracted protocol configs when creating theWebClientpipeline, combining available protocol configs for each node connection.Build and module configuration updates
build.gradle.ktsandmodule-info.javato support protocol config features.Testing and cleanup
BlockNodeConfigconstructors with protocol config arguments, ensuring compatibility with new config structure.Related issue(s):
Fixes #21777
Notes for reviewer:
Checklist