Skip to content

chore: exposed a GRPC Service (endpoint) for the ServerStatus API #812

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

Conversation

HarshSawarkar
Copy link
Contributor

@HarshSawarkar HarshSawarkar commented Mar 10, 2025

Reviewer Notes

  • Added the PbjServerStatusServiceProxy to expose server status api endpoint.
  • Added the unit test to test the functionality and get code coverage.

Related Issue(s)

Fixes #777

Copy link
Contributor

@AlfredoG87 AlfredoG87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first pass, I know is still in draft.

In General is missing a lot of Javadocs.

@@ -1,4 +1,4 @@
#·SPDX-License-Identifier:·Apache-2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like IDE style changes that should not be commited.

@@ -63,6 +66,7 @@ public BlockNodeApp(
this.pbjBlockStreamService = requireNonNull(pbjBlockStreamService);
this.pbjBlockAccessService = requireNonNull(pbjBlockAccessService);
this.webServerBuilder = requireNonNull(webServerBuilder);
this.pbjServerStatusService = pbjServerStatusService;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.pbjServerStatusService = pbjServerStatusService;
this.pbjServerStatusService = Objects.requireNonNull(pbjServerStatusService);

Comment on lines 41 to 43
this.serviceStatus = serviceStatus;
this.blockReader = blockReader;
this.metricsService = metricsService;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing preConditions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Signed-off-by: Harsh Sawarkar <[email protected]>
@HarshSawarkar
Copy link
Contributor Author

@AlfredoG87 I tried to build the server module but faced below error on the command ./gradlew :server:build -x :server:test . How should I go about fixing it?

PS D:\Hedera-Block-Node> ./gradlew :server:build -x :server:test 
Calculating task graph as configuration cache cannot be reused because file '.git\HEAD' has changed.

> Task :server:compileTestJava
Note: D:\Hedera-Block-Node\server\src\test\java\org\hiero\block\server\consumer\OpenRangeStreamManagerTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :server:checkModuleDirectivesScope FAILED

[Incubating] Problems report is available at: file:///D:/Hedera-Block-Node/build/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':server:checkModuleDirectivesScope'.                                                                                                                     
> D:\Hedera-Block-Node\server\src\main\java\module-info.java

  Please remove the following requires directives (or change to runtimeOnly):
      requires com.hedera.block.stream;
      requires org.hiero.block.common;

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.

BUILD FAILED in 46s
64 actionable tasks: 38 executed, 1 from cache, 25 up-to-date
Configuration cache entry stored.

@HarshSawarkar HarshSawarkar marked this pull request as ready for review March 11, 2025 18:43
@HarshSawarkar HarshSawarkar requested review from a team as code owners March 11, 2025 18:43
@jsync-swirlds
Copy link
Contributor

@AlfredoG87 I tried to build the server module but faced below error on the command ./gradlew :server:build -x :server:test . How should I go about fixing it?

PS D:\Hedera-Block-Node> ./gradlew :server:build -x :server:test 
Calculating task graph as configuration cache cannot be reused because file '.git\HEAD' has changed.

> Task :server:compileTestJava
Note: D:\Hedera-Block-Node\server\src\test\java\org\hiero\block\server\consumer\OpenRangeStreamManagerTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :server:checkModuleDirectivesScope FAILED

[Incubating] Problems report is available at: file:///D:/Hedera-Block-Node/build/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':server:checkModuleDirectivesScope'.                                                                                                                     
> D:\Hedera-Block-Node\server\src\main\java\module-info.java

  Please remove the following requires directives (or change to runtimeOnly):
      requires com.hedera.block.stream;
      requires org.hiero.block.common;

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.

BUILD FAILED in 46s
64 actionable tasks: 38 executed, 1 from cache, 25 up-to-date
Configuration cache entry stored.

Fair Warning: we're restructuring the whole codebase, so probably nothing will work super well at the moment (probably for the next several hours).

This particular item is a "module" check, ./gradlew checkAllModuleInfo to run locally.

The error provides the exact instructions to fix the issue (remove the two requires lines from the indicated module-info.java file), but do note that this particular error is already being fixed in a different PR.

Signed-off-by: Harsh Sawarkar <[email protected]>
… into chore-expose-a-GRPC-Service-(endpoint)-for-the-ServerStatus-API-
Signed-off-by: Harsh Sawarkar <[email protected]>
Copy link
Contributor

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few PRs (this included) will likely be delayed and impacted by significant ongoing rewrites of the code base.
I'm blocking the PR for now just to avoid any unintended conflicts and to save you effort.

Once things are in the clear we can decide whether to rebase (if all changes are still applicable), pull some changes into a new PR (in a subset is still applicable) or if to close this underlying ticket if it's no longer applicable.

Thanks for your interest and contributions here, we'll be laying out more tickets that the community can look to to pick up and also exploring how to have community calls to improve the efficiency and sharing of information.

@HarshSawarkar
Copy link
Contributor Author

A few PRs (this included) will likely be delayed and impacted by significant ongoing rewrites of the code base. I'm blocking the PR for now just to avoid any unintended conflicts and to save you effort.

Once things are in the clear we can decide whether to rebase (if all changes are still applicable), pull some changes into a new PR (in a subset is still applicable) or if to close this underlying ticket if it's no longer applicable.

Thanks for your interest and contributions here, we'll be laying out more tickets that the community can look to to pick up and also exploring how to have community calls to improve the efficiency and sharing of information.

Thanks, @Nana-EC , for your response. I will hold onto this PR, and in the meantime, I will look for other issues to contribute to. I look forward to attending community calls and working and learning in sync with the team.

@Nana-EC
Copy link
Contributor

Nana-EC commented Apr 28, 2025

@HarshSawarkar feel free to rebase and update if you're able to now that the refactor to main has completed..
A lot has changed so it's possible the issue is no longer applicable or a larger or smaller effort than before.
Take your time and let us know what you find.

@AlfredoG87
Copy link
Contributor

Team is working on this ticket, using the updated Plugin architecture.
closing as both duplicated and not needed anymore.

@AlfredoG87 AlfredoG87 closed this May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ServerStatus GRPC Service
4 participants