Skip to content

feat(block-node): implement 'solo block node destroy' #1833

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

Open
wants to merge 29 commits into
base: 01755-implement-solo-block-nodes-deploy
Choose a base branch
from

Conversation

instamenta
Copy link
Contributor

@instamenta instamenta commented Apr 10, 2025

Description

  • Add new command solo block node destroy

  • 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
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

@instamenta instamenta self-assigned this Apr 10, 2025
@instamenta instamenta linked an issue Apr 10, 2025 that may be closed by this pull request
Copy link
Contributor

github-actions bot commented Apr 10, 2025

Unit Test Results - Linux

32 tests   32 ✅  0s ⏱️
16 suites   0 💤
 1 files     0 ❌

Results for commit 346510e.

♻️ This comment has been updated with latest results.

@instamenta instamenta changed the base branch from main to 01755-implement-solo-block-nodes-deploy April 10, 2025 12:54
Copy link
Contributor

github-actions bot commented Apr 10, 2025

Unit Test Results - Windows

  1 files   70 suites   3s ⏱️
290 tests 290 ✅ 0 💤 0 ❌
295 runs  295 ✅ 0 💤 0 ❌

Results for commit 346510e.

♻️ This comment has been updated with latest results.

@instamenta instamenta changed the title feat(block-node) implement 'solo block node destroy' feat(block-node): implement 'solo block node destroy' Apr 10, 2025
@instamenta instamenta added the PR: Needs Team Approval A pull request that needs review from a team member. label Apr 10, 2025
@instamenta instamenta marked this pull request as ready for review April 10, 2025 13:10
@instamenta instamenta requested a review from a team as a code owner April 10, 2025 13:10
Copy link
Contributor

E2E Test Report

 18 files  + 1  124 suites  +7   1h 28m 52s ⏱️ + 1m 36s
324 tests +15  324 ✅ +15  0 💤 ±0  0 ❌ ±0 
341 runs  +15  341 ✅ +15  0 💤 ±0  0 ❌ ±0 

Results for commit 8f89e06. ± Comparison against base commit 23f9498.

This pull request removes 12 and adds 27 tests. Note that renamed tests count towards both.
should fail if component is not present ‑ RemoteConfigValidator Consensus Nodes validation should fail if component is not present
should fail if component is not present ‑ RemoteConfigValidator Envoy Proxies validation should fail if component is not present
should fail if component is not present ‑ RemoteConfigValidator HaProxies validation should fail if component is not present
should fail if component is not present ‑ RemoteConfigValidator Mirror Node Components validation should fail if component is not present
should fail if component is not present ‑ RemoteConfigValidator Mirror Node Explorers validation should fail if component is not present
should fail if component is not present ‑ RemoteConfigValidator Relays validation should fail if component is not present
should succeed if component is present ‑ RemoteConfigValidator Consensus Nodes validation should succeed if component is present
should succeed if component is present ‑ RemoteConfigValidator Envoy Proxies validation should succeed if component is present
should succeed if component is present ‑ RemoteConfigValidator HaProxies validation should succeed if component is present
should succeed if component is present ‑ RemoteConfigValidator Mirror Node Components validation should succeed if component is present
…
Should not validate consensus nodes if skipConsensusNodes is enabled ‑ RemoteConfigValidator Additional test cases Should not validate consensus nodes if skipConsensusNodes is enabled
Should not validate consensus nodes if status is non-deployed  ‑ RemoteConfigValidator Additional test cases Should not validate consensus nodes if status is non-deployed 
Should not validate consensus nodes if status is requested  ‑ RemoteConfigValidator Additional test cases Should not validate consensus nodes if status is requested 
Should not validate disabled components ‑ RemoteConfigValidator Additional test cases Should not validate disabled components
Should succeed deploying block node with 'add' command ‑ E2E Test Suite for 'block-node-cmd-e2e' block-node-cmd-e2e BlockNodeCommand Should succeed deploying block node with 'add' command
Should succeed deploying block node with multiple 'add' command ‑ E2E Test Suite for 'block-node-cmd-e2e' block-node-cmd-e2e BlockNodeCommand Should succeed deploying block node with multiple 'add' command
Should succeed with removing all block nodes with 'destroy' command ‑ E2E Test Suite for 'block-node-cmd-e2e' block-node-cmd-e2e BlockNodeCommand Should succeed with removing all block nodes with 'destroy' command
Should succeed with removing block node with 'destroy' command ‑ E2E Test Suite for 'block-node-cmd-e2e' block-node-cmd-e2e BlockNodeCommand Should succeed with removing block node with 'destroy' command
generate key files ‑ E2E Test Suite for 'block-node-cmd-e2e' Bootstrap network for test [release v0.59.5] generate key files
should cleanup previous deployment ‑ E2E Test Suite for 'block-node-cmd-e2e' Bootstrap network for test [release v0.59.5] should cleanup previous deployment
…

Copy link
Contributor

github-actions bot commented Apr 10, 2025

E2E Test Report

 18 files  124 suites   1h 30m 36s ⏱️
321 tests 321 ✅ 0 💤 0 ❌
337 runs  337 ✅ 0 💤 0 ❌

Results for commit bb78d27.

♻️ This comment has been updated with latest results.

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.10% (target: -1.00%) 90.15%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (23f9498) 34766 28953 83.28%
Head commit (8f89e06) 35761 (+995) 29746 (+793) 83.18% (-0.10%)

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 (#1833) 1726 1556 90.15%

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

codacy-production bot commented Apr 10, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.06% (target: -1.00%) 89.43%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (68246e5) 35615 29616 83.16%
Head commit (8abf758) 35883 (+268) 29860 (+244) 83.21% (+0.06%)

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 (#1833) 492 440 89.43%

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 10, 2025

Codecov Report

Attention: Patch coverage is 88.41463% with 57 lines in your changes missing coverage. Please review.

Project coverage is 82.18%. Comparing base (68246e5) to head (8abf758).

Files with missing lines Patch % Lines
src/commands/network.ts 86.34% 28 Missing ⚠️
src/commands/block-node.ts 90.74% 11 Missing and 4 partials ⚠️
src/commands/flags.ts 56.52% 10 Missing ⚠️
src/core/config/remote/components-data-wrapper.ts 90.00% 2 Missing and 1 partial ⚠️
src/core/certificate-manager.ts 66.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                             Coverage Diff                             @@
##           01755-implement-solo-block-nodes-deploy    #1833      +/-   ##
===========================================================================
+ Coverage                                    82.11%   82.18%   +0.07%     
===========================================================================
  Files                                          251      252       +1     
  Lines                                        35615    35883     +268     
  Branches                                      3417     3141     -276     
===========================================================================
+ Hits                                         29245    29491     +246     
- Misses                                        6103     6199      +96     
+ Partials                                       267      193      -74     
Files with missing lines Coverage Δ
src/commands/node/tasks.ts 92.99% <100.00%> (ø)
src/commands/relay.ts 85.76% <100.00%> (ø)
src/core/block-nodes-json-wrapper.ts 100.00% <100.00%> (ø)
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/core/certificate-manager.ts 48.11% <66.66%> (ø)
src/core/config/remote/components-data-wrapper.ts 94.40% <90.00%> (-0.37%) ⬇️
src/commands/flags.ts 67.98% <56.52%> (-0.11%) ⬇️
src/commands/block-node.ts 89.39% <90.74%> (+0.87%) ⬆️
... and 1 more

... and 33 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 requested review from a team as code owners April 14, 2025 06:52
@instamenta instamenta added PR: Needs Manager Approval A pull request that needs review from a manager. and removed PR: Needs Team Approval A pull request that needs review from a team member. PR: Checks Failed A pull request where the checks have failed. labels Apr 15, 2025
@instamenta instamenta added Blocked Further development work is blocked by other item and removed PR: Needs Manager Approval A pull request that needs review from a manager. labels Apr 16, 2025
@instamenta instamenta marked this pull request as draft April 16, 2025 12:25
@jeromy-cannon jeromy-cannon added the P0 An issue impacting production environments or impacting multiple releases or multiple individuals. label Apr 22, 2025
…-deploy' into 01756-implement-solo-block-nodes-destroy

# Conflicts:
#	src/commands/network.ts
#	src/core/config/remote/api/components-data-wrapper-api.ts
#	src/core/config/remote/components-data-wrapper.ts
Signed-off-by: Zhan Milenkov <[email protected]>
@instamenta instamenta marked this pull request as ready for review April 24, 2025 12:51
@instamenta instamenta requested a review from a team as a code owner April 24, 2025 12:51
@instamenta instamenta removed the Blocked Further development work is blocked by other item label Apr 24, 2025
@jeromy-cannon jeromy-cannon added the PR: Unresolved Comments A pull request where there are comments and they need to be resolved. label Apr 24, 2025
…-deploy' into 01756-implement-solo-block-nodes-destroy

# Conflicts:
#	src/commands/network.ts
#	test/unit/commands/network.test.ts
…-deploy' into 01756-implement-solo-block-nodes-destroy

# Conflicts:
#	src/commands/block-node.ts
@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. and removed PR: Unresolved Comments A pull request where there are comments and they need to be resolved. labels Apr 25, 2025
…-deploy' into 01756-implement-solo-block-nodes-destroy

# Conflicts:
#	src/commands/block-node.ts
Signed-off-by: Zhan Milenkov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 An issue impacting production environments or impacting multiple releases or multiple individuals. 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
Development

Successfully merging this pull request may close these issues.

implement solo block-nodes destroy
3 participants