Skip to content
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

feat: server properties configurable #365

Merged
merged 4 commits into from
Nov 27, 2024

Conversation

AlfredoG87
Copy link
Contributor

@AlfredoG87 AlfredoG87 commented Nov 27, 2024

Description:

  • Adding a new Config Class called ServerConfig for Server specific properties.
  • Adding 2 new properties to the newly created ServerConfig, and mapping them for ENV override using the ServerMappedConfigSourceInitializer. maxMessageSizeBytes and port.
  • Replacing the hardcoded values on the codebase with the new configurable properties from ServerConfig.
  • Added the new configuration to the ConfigInjectionModule
  • Created UT for testing the Config validations and restrictions.
  • Added Test case for ConfigInjectionModule to retrieve the newly config object.

Related issue(s):

Fixes #344
Fixes #345

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@AlfredoG87 AlfredoG87 changed the title 344 max message size configurable feat: server properties configurable Nov 27, 2024
@AlfredoG87 AlfredoG87 self-assigned this Nov 27, 2024
@AlfredoG87 AlfredoG87 added Block Node Issues/PR related to the Block Node. Improvement Code changes driven by non business requirements labels Nov 27, 2024
@AlfredoG87 AlfredoG87 added this to the 0.3.0 milestone Nov 27, 2024
@AlfredoG87 AlfredoG87 marked this pull request as ready for review November 27, 2024 15:45
@AlfredoG87 AlfredoG87 requested a review from a team as a code owner November 27, 2024 15:45
…perties.

Adding 2 new properties to the newly created ServerConfig, and mapping them for ENV override using the ServerMappedConfigSourceInitializer. maxMessageSizeBytes and port.

Replacing the hardcoded values on the codebase with the new configurable properties from ServerConfig.

Added the new configuration to the ConfigInjectionModule

Created UT for testing the Config validations and restrictions.

Added Test case for ConfigInjectionModule to retrieve the newly config object.

Signed-off-by: Alfredo Gutierrez <[email protected]>
@AlfredoG87 AlfredoG87 force-pushed the 344-max-message-size-configurable branch from ca87106 to 01128d4 Compare November 27, 2024 16:11
Copy link
Contributor

@ata-nas ata-nas left a comment

Choose a reason for hiding this comment

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

@AlfredoG87 looks good! A couple of nits.

Copy link
Contributor

@ata-nas ata-nas left a comment

Choose a reason for hiding this comment

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

@AlfredoG87 looks great!

@AlfredoG87 AlfredoG87 merged commit 3de302a into main Nov 27, 2024
13 checks passed
@AlfredoG87 AlfredoG87 deleted the 344-max-message-size-configurable branch November 27, 2024 20:32
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.77%. Comparing base (9bd4a6a) to head (a1d0857).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #365      +/-   ##
============================================
+ Coverage     97.74%   97.77%   +0.03%     
- Complexity      334      343       +9     
============================================
  Files            69       70       +1     
  Lines          1239     1256      +17     
  Branches         86       88       +2     
============================================
+ Hits           1211     1228      +17     
  Misses           19       19              
  Partials          9        9              
Files with missing lines Coverage Δ
...ain/java/com/hedera/block/server/BlockNodeApp.java 100.00% <100.00%> (ø)
...ain/java/com/hedera/block/server/ServerConfig.java 100.00% <100.00%> (ø)
.../block/server/config/BlockNodeConfigExtension.java 100.00% <ø> (ø)
...era/block/server/config/ConfigInjectionModule.java 87.50% <100.00%> (+1.78%) ⬆️
...er/config/ServerMappedConfigSourceInitializer.java 100.00% <100.00%> (ø)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Block Node Issues/PR related to the Block Node. Improvement Code changes driven by non business requirements
Projects
None yet
2 participants