Skip to content

feat(block-node): update solo network deploy to create the 'block-nodes.json' #1839

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

instamenta
Copy link
Contributor

@instamenta instamenta commented Apr 14, 2025

Description

This pull request changes the following:

  • Adds logic that creates the block-nodes.json if there is active block node in the solo deployment
  • Add new class BlockNodesJsonWrapper for creating the block-nodes.json
  • Fixes EsLint warnings inside the commands/network.ts

Related Issues

Pull request (PR) checklist

  • This PR added tests (unit, integration, and/or end-to-end)
  • This PR updated documentation
  • This PR added no TODOs or commented out code
  • This PR has no breaking changes
  • Any technical debt has been documented as a separate issue and linked to this PR
  • Any package.json changes have been explained to and approved by a repository manager
  • All related issues have been linked to this PR
  • All changes in this PR are included in the description
  • When this PR merges the commits will be squashed and the title will be used as the commit message, the 'commit message guidelines' below have been followed

Testing

  • This PR added unit tests
  • This PR added integration/end-to-end tests
  • These changes required manual testing that is documented below
  • Anything not tested is documented

The following manual testing was done:

  • TBD

The following was not tested:

  • TBD
Commit message guidelines We use 'Conventional Commits' to ensure that our commit messages are easy to read, follow a consistent format, and for automated release note generation. Please follow the guidelines below when writing your commit messages:
  1. BREAKING CHANGE: a commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type. NOTE: currently breaking changes will only bump the MAJOR version.
  2. The title is prefixed with one of the following:
Prefix Description Semantic Version Update Captured in Release Notes
feat: a new feature MINOR Yes
fix: a bug fix PATCH Yes
perf: performance PATCH Yes
refactor: code change that isn't feature or fix none No
test: adding missing tests none No
docs: changes to documentation none Yes
build: changes to build process none No
ci: changes to CI configuration none No
style: formatting, missing semi-colons, etc none No
chore: updating grunt tasks etc; no production code change none No

Signed-off-by: Zhan Milenkov <[email protected]>
…ing the block-nodes.json file inside the consensus nodes

Signed-off-by: Zhan Milenkov <[email protected]>
Signed-off-by: Zhan Milenkov <[email protected]>
Signed-off-by: Zhan Milenkov <[email protected]>
@instamenta instamenta self-assigned this Apr 14, 2025
@instamenta instamenta changed the title feat(block-node) update solo network deploy to create the 'block-nodes.json' feat(block-node): update solo network deploy to create the 'block-nodes.json' Apr 14, 2025
@instamenta instamenta changed the base branch from main to 01755-implement-solo-block-nodes-deploy April 14, 2025 06:50
…work-deploy-to-conditionally-create-the-opthgcappservices-hederahapiapp20dataconfigblock-nodesjson

# Conflicts:
#	src/commands/network.ts
@instamenta instamenta changed the base branch from 01755-implement-solo-block-nodes-deploy to 01756-implement-solo-block-nodes-destroy April 14, 2025 07:00
…-destroy' into 01757-update-solo-network-deploy-to-conditionally-create-the-opthgcappservices-hederahapiapp20dataconfigblock-nodesjson
@instamenta instamenta changed the base branch from 01756-implement-solo-block-nodes-destroy to main April 14, 2025 07:03
Copy link
Contributor

github-actions bot commented Apr 14, 2025

Unit Test Results - Linux

24 tests  ±0   24 ✅ ±0   0s ⏱️ ±0s
13 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 0a84448. ± Comparison against base commit 7df0507.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Apr 14, 2025

Unit Test Results - Windows

  1 files  ± 0   71 suites  +1   3s ⏱️ ±0s
243 tests  - 47  243 ✅  - 47  0 💤 ±0  0 ❌ ±0 
247 runs   - 48  247 ✅  - 48  0 💤 ±0  0 ❌ ±0 

Results for commit 0a84448. ± Comparison against base commit 7df0507.

This pull request removes 64 and adds 17 tests. Note that renamed tests count towards both.
Install function is called with expected parameters ‑ NetworkCommand unit tests Chart Install Function is called correctly Install function is called with expected parameters
Should use local chart directory ‑ NetworkCommand unit tests Chart Install Function is called correctly Should use local chart directory
should be able to add new component with the .add() method ‑ ComponentsDataWrapper should be able to add new component with the .add() method
should be able to create new instance of the class with valid data ‑ Migration should be able to create new instance of the class with valid data
should be able to edit component with the .edit() ‑ ComponentsDataWrapper should be able to edit component with the .edit()
should be able to remove component with the .remove() ‑ ComponentsDataWrapper should be able to remove component with the .remove()
should fail if cluster is not a string ‑ ConsensusNodeComponent should fail if cluster is not a string
should fail if cluster is not provided ‑ ConsensusNodeComponent should fail if cluster is not provided
should fail if cluster is not provided ‑ EnvoyProxyComponent should fail if cluster is not provided
should fail if cluster is not provided ‑ HaProxyComponent should fail if cluster is not provided
…
calling toObject() should return a valid data ‑ BlockNodeComponent calling toObject() should return a valid data
should be able to add new component with the .addNewComponent() method ‑ ComponentsDataWrapper should be able to add new component with the .addNewComponent() method
should be able to change node state with the .changeNodeState(() ‑ ComponentsDataWrapper should be able to change node state with the .changeNodeState(()
should be able to disable component with the .disableComponent() ‑ ComponentsDataWrapper should be able to disable component with the .disableComponent()
should be able to get components with .applyCallbackToComponentGroup() ‑ ComponentsDataWrapper should be able to get components with .applyCallbackToComponentGroup()
should be able to get components with .getComponent() ‑ ComponentsDataWrapper should be able to get components with .getComponent()
should be an instance of BaseComponent ‑ BlockNodeComponent should be an instance of BaseComponent
should create a valid component name for BlockNodeComponent ‑ ComponentNameTemplates should create a valid component name for BlockNodeComponent
should create a valid component name for EnvoyProxyComponent ‑ ComponentNameTemplates should create a valid component name for EnvoyProxyComponent
should create a valid component name for HaProxyComponent ‑ ComponentNameTemplates should create a valid component name for HaProxyComponent
…

♻️ This comment has been updated with latest results.

Signed-off-by: Zhan Milenkov <[email protected]>
Signed-off-by: Zhan Milenkov <[email protected]>
Signed-off-by: Zhan Milenkov <[email protected]>
@instamenta instamenta changed the base branch from main to 01756-implement-solo-block-nodes-destroy April 14, 2025 11:21
Copy link
Contributor

github-actions bot commented Apr 14, 2025

E2E Test Report

 18 files  124 suites   1h 32m 37s ⏱️
328 tests 328 ✅ 0 💤 0 ❌
345 runs  345 ✅ 0 💤 0 ❌

Results for commit 0a84448.

♻️ This comment has been updated with latest results.

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 7df05071 90.16%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (7df0507) Report Missing Report Missing Report Missing
Head commit (0a84448) 35885 29862 83.22%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1839) 2012 1814 90.16%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.03% (target: -1.00%) 89.97%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (abef996) 35794 29775 83.18%
Head commit (0a84448) 35885 (+91) 29862 (+87) 83.22% (+0.03%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1839) 289 260 89.97%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Copy link

codecov bot commented Apr 14, 2025

Codecov Report

Attention: Patch coverage is 89.61938% with 30 lines in your changes missing coverage. Please review.

Project coverage is 82.18%. Comparing base (abef996) to head (0a84448).
Report is 11 commits behind head on 01756-implement-solo-block-nodes-destroy.

Files with missing lines Patch % Lines
src/commands/network.ts 86.34% 28 Missing ⚠️
src/commands/block-node.ts 0.00% 1 Missing ⚠️
src/core/certificate-manager.ts 66.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                             Coverage Diff                              @@
##           01756-implement-solo-block-nodes-destroy    #1839      +/-   ##
============================================================================
+ Coverage                                     82.16%   82.18%   +0.02%     
============================================================================
  Files                                           251      252       +1     
  Lines                                         35794    35885      +91     
  Branches                                       3089     2646     -443     
============================================================================
+ Hits                                          29409    29493      +84     
- Misses                                         6166     6259      +93     
+ Partials                                        219      133      -86     
Files with missing lines Coverage Δ
src/commands/node/tasks.ts 92.99% <100.00%> (ø)
src/core/block-nodes-json-wrapper.ts 100.00% <100.00%> (ø)
src/core/config/remote/components-data-wrapper.ts 94.40% <100.00%> (+0.17%) ⬆️
src/core/constants.ts 97.70% <100.00%> (+0.01%) ⬆️
src/core/helpers.ts 84.87% <100.00%> (ø)
src/core/templates.ts 74.01% <100.00%> (+1.06%) ⬆️
src/commands/block-node.ts 89.39% <0.00%> (ø)
src/core/certificate-manager.ts 48.11% <66.66%> (ø)
src/commands/network.ts 79.92% <86.34%> (-0.09%) ⬇️

... and 99 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@instamenta instamenta marked this pull request as ready for review April 15, 2025 07:22
@instamenta instamenta requested a review from a team as a code owner April 15, 2025 07:22
@instamenta instamenta added PR: Needs Team Approval A pull request that needs review from a team member. PR: Needs Manager Approval A pull request that needs review from a manager. labels Apr 15, 2025
@instamenta instamenta merged commit 0a84448 into 01756-implement-solo-block-nodes-destroy Apr 15, 2025
50 of 56 checks passed
@instamenta instamenta deleted the 01757-update-solo-network-deploy-to-conditionally-create-the-opthgcappservices-hederahapiapp20dataconfigblock-nodesjson branch April 15, 2025 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Needs Manager Approval A pull request that needs review from a manager. PR: Needs Team Approval A pull request that needs review from a team member.
Projects
None yet
1 participant