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: solo deployment create should use the context and cluster provided for where to save the remote config #1142

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

instamenta
Copy link
Contributor

Description

Addresses issue preventing passing email address via flags

Related Issues

Copy link
Contributor

github-actions bot commented Jan 13, 2025

Unit Test Results - Linux

  1 files  ±0   58 suites  ±0   3s ⏱️ ±0s
227 tests ±0  227 ✅ ±0  0 💤 ±0  0 ❌ ±0 
232 runs  ±0  232 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 66d6a1c. ± Comparison against base commit 1cf5893.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jan 13, 2025

Unit Test Results - Windows

  1 files  ±0   58 suites  ±0   14s ⏱️ -1s
227 tests ±0  227 ✅ ±0  0 💤 ±0  0 ❌ ±0 
232 runs  ±0  232 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 66d6a1c. ± Comparison against base commit 1cf5893.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jan 13, 2025

E2E Test Report

 17 files  126 suites   1h 30m 15s ⏱️
258 tests 258 ✅ 0 💤 0 ❌
269 runs  269 ✅ 0 💤 0 ❌

Results for commit 66d6a1c.

♻️ This comment has been updated with latest results.

Copy link

codacy-production bot commented Jan 13, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 1cf58931 96.18%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (1cf5893) Report Missing Report Missing Report Missing
Head commit (66d6a1c) 21188 17754 83.79%

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 (#1142) 131 126 96.18%

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 Jan 13, 2025

Codecov Report

Attention: Patch coverage is 96.18321% with 5 lines in your changes missing coverage. Please review.

Project coverage is 83.03%. Comparing base (9bc6fcd) to head (66d6a1c).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/core/config/local_config.ts 0.00% 3 Missing ⚠️
src/commands/cluster/handlers.ts 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1142      +/-   ##
==========================================
- Coverage   83.37%   83.03%   -0.34%     
==========================================
  Files          77       77              
  Lines       20809    21188     +379     
  Branches     1717     1269     -448     
==========================================
+ Hits        17349    17593     +244     
- Misses       3363     3590     +227     
+ Partials       97        5      -92     
Files with missing lines Coverage Δ
src/commands/cluster/configs.ts 84.55% <100.00%> (+1.35%) ⬆️
src/commands/cluster/tasks.ts 87.11% <100.00%> (+0.64%) ⬆️
src/commands/cluster/handlers.ts 85.13% <0.00%> (ø)
src/core/config/local_config.ts 67.07% <0.00%> (ø)

... and 25 files with indirect coverage changes

Impacted file tree graph

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.

❯ rm -Rf ~/.solo
❯ kind create cluster -n solo-e2e
Creating cluster "solo-e2e" ...
 ✓ Ensuring node image (kindest/node:v1.27.3) 🖼
 ✓ Preparing nodes 📦  
 ✓ Writing configuration 📜 
 ✓ Starting control-plane 🕹️ 
 ✓ Installing CNI 🔌 
 ✓ Installing StorageClass 💾 
Set kubectl context to "kind-solo-e2e"
You can now use your cluster with:

kubectl cluster-info --context kind-solo-e2e

Have a question, bug, or feature request? Let us know! https://kind.sigs.k8s.io/#community 🙂
❯ kind create cluster -n solo
Creating cluster "solo" ...
 ✓ Ensuring node image (kindest/node:v1.27.3) 🖼
 ✓ Preparing nodes 📦  
 ✓ Writing configuration 📜 
 ✓ Starting control-plane 🕹️ 
 ✓ Installing CNI 🔌 
 ✓ Installing StorageClass 💾 
Set kubectl context to "kind-solo"
You can now use your cluster with:

kubectl cluster-info --context kind-solo

Have a nice day! 👋
❯ git status
On branch 00976-solo-deployment-create-should-use-the-context
Your branch is up to date with 'origin/00976-solo-deployment-create-should-use-the-context'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        examples/address-book/

nothing added to commit but untracked files present (use "git add" to track)
❯ git pull
Already up to date.
❯ npm run build

> @hashgraph/[email protected] build
> rm -Rf dist && tsc && node resources/post-build-script.js

❯ npm run solo -- deployment create -n jeromy-solo --deployment-clusters kind-solo-e2e  --context-cluster kind-solo-e2e=kind-solo-e2e

> @hashgraph/[email protected] solo
> node --no-deprecation --no-warnings dist/solo.js deployment create -n jeromy-solo --deployment-clusters kind-solo-e2e --context-cluster kind-solo-e2e=kind-solo-e2e


******************************* Solo *********************************************
Version                 : 0.32.0
Kubernetes Context      : kind-solo
Kubernetes Cluster      : kind-solo
Kubernetes Namespace    : jeromy-solo
**********************************************************************************
✔ Initialize
  ✔ Acquire lease - lease acquired successfully, attempt: 1/10
⠴ Prompt local configuration
◼ Validate cluster connections
◼ Create remote config
◼ Read local configuration settings
◼ Update local configuration

? Select kubectl context to be associated with cluster: kind-solo-e2e … 
❯ docker
  docker-desktop
  gke-alex
  gke-edge
  gke-fullstack
  gke-jeromy
  gke-secure
  re-lat
  kind-solo-e2e
  kind-solo

It is prompting me for the cluster, even though I supplied the flag with the same information.

Then when I select it, I get this error:

******************************* Solo *********************************************
Version                 : 0.32.0
Kubernetes Context      : kind-solo
Kubernetes Cluster      : kind-solo
Kubernetes Namespace    : jeromy-solo
**********************************************************************************
✔ Initialize
  ✔ Acquire lease - lease acquired successfully, attempt: 1/10
✖ ENOENT: no such file or directory, open '/Users/user/.solo/cache/local-config.yaml'
◼ Validate cluster connections
◼ Create remote config
◼ Read local configuration settings
◼ Update local configuration
*********************************** ERROR *****************************************
Error installing chart solo-deployment
***********************************************************************************

I think Ivo moved the init method that creates the directories into the basecommand, you just need to call it at the beginning of the deployment command. this is because I did rm -Rf on the ~/.solo directory.

if I run solo init and then run the command again, I now get a different error:

❯ npm run solo -- init

> @hashgraph/[email protected] solo
> node --no-deprecation --no-warnings dist/solo.js init


******************************* Solo *********************************************
Version                 : 0.32.0
Kubernetes Context      : kind-solo
Kubernetes Cluster      : kind-solo
**********************************************************************************
✔ Setup home directory and cache
✔ Check dependencies [11s]
  ✔ Check dependency: helm [OS: darwin, Release: 23.6.0, Arch: arm64] [11s]
✔ Setup chart manager [1s]
✔ Copy templates in '/Users/user/.solo/cache'


***************************************************************************************
Note: solo stores various artifacts (config, logs, keys etc.) in its home directory: /Users/user/.solo
If a full reset is needed, delete the directory or relevant sub-directories before running 'solo init'.
***************************************************************************************
❯ npm run solo -- deployment create -n jeromy-solo --deployment-clusters kind-solo-e2e  --context-cluster kind-solo-e2e=kind-solo-e2e

> @hashgraph/[email protected] solo
> node --no-deprecation --no-warnings dist/solo.js deployment create -n jeromy-solo --deployment-clusters kind-solo-e2e --context-cluster kind-solo-e2e=kind-solo-e2e


******************************* Solo *********************************************
Version                 : 0.32.0
Kubernetes Context      : kind-solo
Kubernetes Cluster      : kind-solo
Kubernetes Namespace    : jeromy-solo
**********************************************************************************
✔ Initialize
  ✔ Acquire lease - lease acquired successfully, attempt: 1/10
✔ Prompt local configuration [7s]
✔ Validate cluster connections
  ✔ Testing connection to cluster: kind-solo-e2e
✖ Failed to read remote config from cluster
◼ Read local configuration settings
◼ Update local configuration
*********************************** ERROR *****************************************
failed to read existing leases, unexpected server response of '500' received
***********************************************************************************

@instamenta , this is still happening after I pulled your latest.

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