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: separate commands for solo node delete #597

Conversation

Ivo-Yankov
Copy link
Contributor

@Ivo-Yankov Ivo-Yankov commented Sep 18, 2024

Description

  • Separates the flow of solo node delete into 3 new commands that can be executed separately and one after the other: solo node delete-prepare, solo node delete-submit-transactions, solo node delete-execute.

The behaviour of the new commands is as follows:

solo node delete-prepare  --node-id node2 --release-tag v0.54.0-alpha.4 --namespace solo-e2e --output-dir context
---------
Initialize
Identify existing network nodes
Load node admin key
Prepare upgrade zip file for node upgrade process
Check existing nodes staked amount
Save context data

Saves data from the ctx object to the specified directory by --output-dir

solo node delete-submit-transactions --namespace solo-e2e --input-dir context
---------
Initialize
Load context data
Send node delete transaction
Send prepare upgrade transaction
Send freeze upgrade transaction

Loads data into the ctx object from the specified directory by --input-dir

solo node delete-execute --namespace solo-e2e --input-dir context [--local-build-path xxxxxxx]
---------


Initialize 
Load context data
Download generated files from an existing node 
Prepare staging directory 
  Copy Gossip keys to staging
  Copy gRPC TLS keys to staging
Copy node keys to secrets 
  Copy TLS keys 
  Node: node1 
    Copy Gossip keys 
  Node: node3 
    Copy Gossip keys 
Check network nodes are frozen 
  Check network pod: node1  
  Check network pod: node2  
  Check network pod: node3  
Get node logs and configs 
Update chart to use new configMap 
Kill nodes to pick up updated configMaps 
Check node pods are running 
  Check Node: node1 
  Check Node: node3
Fetch platform software into all network nodes 
  Update node: node1 
  Update node: node3 
Setup network nodes 
  Node: node1 
    Set file permissions 
  Node: node3 
    Set file permissions 
Start network nodes 
  Start node: node1 
  Start node: node3 
Enable port forwarding for JVM debugger
Check all nodes are ACTIVE 
  Check network pod: node1  
  Check network pod: node3  
Check all node proxies are ACTIVE 
  Check proxy for node: node1 
  Check proxy for node: node3 
Trigger stake weight calculate 
Finalize

Loads data into the ctx object from the specified directory by --input-dir

Related Issues

Copy link
Contributor

github-actions bot commented Sep 18, 2024

Unit Test Results - Linux

  1 files  ± 0   19 suites  +8   33s ⏱️ +21s
119 tests +55  119 ✅ +55  0 💤 ±0  0 ❌ ±0 
145 runs  +60  145 ✅ +60  0 💤 ±0  0 ❌ ±0 

Results for commit c6e48eb. ± Comparison against base commit 538e40d.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Sep 18, 2024

Unit Test Results - Windows

  1 files   19 suites   55s ⏱️
119 tests 119 ✅ 0 💤 0 ❌
145 runs  145 ✅ 0 💤 0 ❌

Results for commit c6e48eb.

♻️ This comment has been updated with latest results.

Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
Copy link

codacy-production bot commented Sep 24, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 538e40d1 73.53%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (538e40d) Report Missing Report Missing Report Missing
Head commit (c6e48eb) 4175 3357 80.41%

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 (#597) 170 125 73.53%

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

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

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

codecov bot commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 73.17073% with 55 lines in your changes missing coverage. Please review.

Project coverage is 80.25%. Comparing base (5fa1b7d) to head (c6e48eb).
Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
src/commands/node.mjs 66.43% 49 Missing ⚠️
src/core/helpers.mjs 91.37% 5 Missing ⚠️
test/test_util.js 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #597      +/-   ##
==========================================
- Coverage   80.83%   80.25%   -0.59%     
==========================================
  Files          37       37              
  Lines        4885     5014     +129     
  Branches      684      690       +6     
==========================================
+ Hits         3949     4024      +75     
- Misses        936      989      +53     
- Partials        0        1       +1     
Files with missing lines Coverage Δ
test/test_util.js 87.26% <0.00%> (-3.90%) ⬇️
src/core/helpers.mjs 88.88% <91.37%> (+1.38%) ⬆️
src/commands/node.mjs 77.93% <66.43%> (-2.51%) ⬇️

Impacted file tree graph

@Ivo-Yankov Ivo-Yankov marked this pull request as ready for review September 24, 2024 11:52
@Ivo-Yankov Ivo-Yankov requested review from a team and leninmehedy as code owners September 24, 2024 11:52
Copy link
Contributor

@jeromy-cannon jeromy-cannon left a comment

Choose a reason for hiding this comment

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

see comments

src/commands/node.mjs Outdated Show resolved Hide resolved
src/commands/node.mjs Outdated Show resolved Hide resolved
src/commands/node.mjs Outdated Show resolved Hide resolved
…e-to-be-leveraged-for-sdk-testing

Signed-off-by: Jeffrey Tang <[email protected]>
…e-to-be-leveraged-for-sdk-testing

Signed-off-by: Jeffrey Tang <[email protected]>

# Conflicts:
#	src/commands/node.mjs
#	src/core/helpers.mjs
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Copy link
Contributor

E2E Test Report

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit c6e48eb.

Copy link
Contributor

E2E Test Report

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit c6e48eb.

@jeromy-cannon jeromy-cannon merged commit b251276 into main Oct 1, 2024
34 of 37 checks passed
@jeromy-cannon jeromy-cannon deleted the 00529-reusable-components-of-solo-node-delete-to-be-leveraged-for-sdk-testing branch October 1, 2024 11:59
swirlds-automation added a commit that referenced this pull request Oct 4, 2024
## [0.31.0](v0.30.1...v0.31.0) (2024-10-04)

### Features

* Add '--mirror-node-version' flag to override default mirror node version ([#616](#616)) ([e4932c4](e4932c4))
* add quiet flag ([#621](#621)) ([b068c8f](b068c8f))
* convert hugo docs workflow calls to use Taskfile task ([#642](#642)) ([ae8d8bb](ae8d8bb))
* ensured user-provided values file takes precedence over solo-generated values ([#615](#615)) ([1b0ffc9](1b0ffc9))
* **logging:** Add the new custom process output class and inject it into the default list renderer options ([#622](#622)) ([efa1783](efa1783))
* separate commands for solo node delete ([#597](#597)) ([b251276](b251276))
* Separate network upgrade and freeze from node update/add/delete command ([#628](#628)) ([9b17937](9b17937))

### Bug Fixes

* Direct calling of node stop and start commands ([#636](#636)) ([7749b04](7749b04))
* **docs:** resolve issues due to npx in taskfile for the custom-network-config example ([038e6df](038e6df))
* jsdoc failed but ci job not failed ([#608](#608)) ([3f838f6](3f838f6))
* specify jvm env variables explicitly for local profile ([#405](#405)) ([3db7e08](3db7e08))
* **tests:** start Kind cluster on demand if not having a kube config errors ([#624](#624)) ([538e40d](538e40d))
* upgrade eslint config away from abandoned plugin ([#643](#643)) ([84d3dc5](84d3dc5))
@swirlds-automation
Copy link
Contributor

🎉 This PR is included in version 0.31.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reusable components of solo node delete to be leveraged for SDK testing
4 participants