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: add factory and injection logic #1352

Merged
merged 2 commits into from
Feb 11, 2025
Merged

Conversation

jeromy-cannon
Copy link
Contributor

Description

This pull request changes the following:

  • add factory and injection logic

Related Issues

@jeromy-cannon jeromy-cannon self-assigned this Feb 11, 2025
Copy link
Contributor

github-actions bot commented Feb 11, 2025

Unit Test Results - Linux

  1 files  ±0   60 suites  ±0   3s ⏱️ +2s
235 tests ±0  235 ✅ ±0  0 💤 ±0  0 ❌ ±0 
244 runs  ±0  244 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit c3df1ac. ± Comparison against base commit 6405d67.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Feb 11, 2025

Unit Test Results - Windows

  1 files  ±0   60 suites  ±0   3s ⏱️ ±0s
235 tests ±0  235 ✅ ±0  0 💤 ±0  0 ❌ ±0 
244 runs  ±0  244 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit c3df1ac. ± Comparison against base commit 6405d67.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Feb 11, 2025

E2E Test Report

 17 files  ±0  126 suites  ±0   1h 26m 17s ⏱️ - 1m 16s
254 tests ±0  254 ✅ ±0  0 💤 ±0  0 ❌ ±0 
265 runs  ±0  265 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit c3df1ac. ± Comparison against base commit 6405d67.

♻️ This comment has been updated with latest results.

Copy link

codacy-production bot commented Feb 11, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.07% (target: -1.00%) 81.91%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (6405d67) 23392 19543 83.55%
Head commit (c3df1ac) 23589 (+197) 19692 (+149) 83.48% (-0.07%)

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 (#1352) 470 385 81.91%

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

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

Attention: Patch coverage is 78.72340% with 100 lines in your changes missing coverage. Please review.

Project coverage is 82.40%. Comparing base (6405d67) to head (c3df1ac).
Report is 60 commits behind head on main.

Files with missing lines Patch % Lines
src/commands/explorer.ts 48.14% 14 Missing ⚠️
src/commands/network.ts 59.25% 10 Missing and 1 partial ⚠️
src/core/kube/k8_client/k8_client.ts 67.85% 8 Missing and 1 partial ⚠️
src/commands/node/tasks.ts 89.47% 7 Missing and 1 partial ⚠️
src/core/cluster_checks.ts 42.85% 8 Missing ⚠️
src/core/config/remote/remote_config_manager.ts 60.00% 8 Missing ⚠️
src/core/kube/k8_client/k8_client_factory.ts 76.47% 8 Missing ⚠️
src/core/config/remote/remote_config_validator.ts 79.41% 7 Missing ⚠️
src/core/certificate_manager.ts 42.85% 4 Missing ⚠️
src/commands/node/configs.ts 76.92% 2 Missing and 1 partial ⚠️
... and 12 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1352      +/-   ##
==========================================
- Coverage   82.45%   82.40%   -0.06%     
==========================================
  Files         128      129       +1     
  Lines       23392    23589     +197     
  Branches     1579     2123     +544     
==========================================
+ Hits        19289    19438     +149     
- Misses       3988     4034      +46     
- Partials      115      117       +2     
Files with missing lines Coverage Δ
src/commands/cluster/index.ts 35.35% <100.00%> (+2.72%) ⬆️
src/commands/relay.ts 80.52% <100.00%> (+0.19%) ⬆️
src/core/dependency_injection/container_init.ts 94.83% <100.00%> (+0.03%) ⬆️
src/core/dependency_injection/inject_tokens.ts 100.00% <100.00%> (ø)
src/core/network_nodes.ts 92.02% <100.00%> (+0.55%) ⬆️
src/commands/base.ts 93.95% <83.33%> (ø)
src/commands/cluster/handlers.ts 83.08% <0.00%> (ø)
src/commands/node/handlers.ts 84.52% <75.00%> (ø)
src/core/lease/lease_manager.ts 88.88% <92.30%> (+0.59%) ⬆️
src/core/platform_installer.ts 88.26% <93.75%> (+0.13%) ⬆️
... and 17 more

... and 35 files with indirect coverage changes

Impacted file tree graph

@jeromy-cannon jeromy-cannon marked this pull request as ready for review February 11, 2025 14:14
@jeromy-cannon jeromy-cannon requested review from leninmehedy and a team as code owners February 11, 2025 14:14
instamenta
instamenta previously approved these changes Feb 11, 2025
commit 7e3f608
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 12:37:20 2025 +0000

    cleanup after reviewing

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 8325ce8
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 12:13:46 2025 +0000

    fixed unit tests

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 0e95e9d
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 12:05:01 2025 +0000

    refactored test case to use K8Factory

    Signed-off-by: Jeromy Cannon <[email protected]>

commit c49890f
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:59:53 2025 +0000

    removed search/replace errors

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 2df6ad2
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:51:11 2025 +0000

    K8

    Signed-off-by: Jeromy Cannon <[email protected]>

commit a4d1595
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:50:32 2025 +0000

    K18

    Signed-off-by: Jeromy Cannon <[email protected]>

commit e2a9c31
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:44:48 2025 +0000

    K17

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 5477c6d
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:42:35 2025 +0000

    K16

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 4031264
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:38:50 2025 +0000

    K15

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 304557a
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:37:00 2025 +0000

    K14

    Signed-off-by: Jeromy Cannon <[email protected]>

commit e4ac40c
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:36:26 2025 +0000

    K13

    Signed-off-by: Jeromy Cannon <[email protected]>

commit dc6e820
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:35:15 2025 +0000

    K12

    Signed-off-by: Jeromy Cannon <[email protected]>

commit d8dd69c
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:34:54 2025 +0000

    K11

    Signed-off-by: Jeromy Cannon <[email protected]>

commit ee89183
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:32:40 2025 +0000

    K9-K10

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 40cab1c
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:27:55 2025 +0000

    K3-K8

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 80859c5
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:26:14 2025 +0000

    K0001,K002

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 5de3964
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:23:56 2025 +0000

    K8>K0018

    Signed-off-by: Jeromy Cannon <[email protected]>

commit ab092cb
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:20:24 2025 +0000

    k8>K0017

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 379100c
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:15:39 2025 +0000

     k8> K0016

    Signed-off-by: Jeromy Cannon <[email protected]>

commit b79e737
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:11:51 2025 +0000

    .k8>.K0015

    Signed-off-by: Jeromy Cannon <[email protected]>

commit c8b2039
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:08:57 2025 +0000

    .k8.>.K0014.

    Signed-off-by: Jeromy Cannon <[email protected]>

commit fa49246
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:07:02 2025 +0000

    this.k8.>this.K0013.

    Signed-off-by: Jeromy Cannon <[email protected]>

commit f553ffc
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:06:26 2025 +0000

    .k8)>.K0012)

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 73d64bd
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:05:35 2025 +0000

    .k8 >.K0011

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 36c0f5c
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:05:07 2025 +0000

     K8;> K0010;

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 3992acc
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:04:36 2025 +0000

     k8:> K0009:

    Signed-off-by: Jeromy Cannon <[email protected]>

commit dc9ebcd
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:03:49 2025 +0000

    /core/kube/k8.js'>/core/kube/K0008.js'

    Signed-off-by: Jeromy Cannon <[email protected]>

commit d029f08
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:03:09 2025 +0000

    {type K8}>{type K0007}

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 91fc53e
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:02:33 2025 +0000

    k8: opts.>K0006: opts.

    Signed-off-by: Jeromy Cannon <[email protected]>

commit fcb1f71
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:01:51 2025 +0000

    this.k8 >this.K0005

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 7fc5d61
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:01:05 2025 +0000

    patchInject(k8,>patchInject(K0004,

    Signed-off-by: Jeromy Cannon <[email protected]>

commit a102c69
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 11:00:37 2025 +0000

    K0002?: K8>K002?: K0003

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 29c9834
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 10:59:06 2025 +0000

     k8?: > K0002?:

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 46f69ed
Author: Jeromy Cannon <[email protected]>
Date:   Tue Feb 11 10:57:52 2025 +0000

    InjectTokens.K8>InjectTokens.K0001

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 9566a57
Author: Jeromy Cannon <[email protected]>
Date:   Mon Feb 10 20:29:33 2025 +0000

    switched from magic string to default()

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 2fac9d4
Author: Jeromy Cannon <[email protected]>
Date:   Mon Feb 10 19:40:14 2025 +0000

    register k8factory container

    Signed-off-by: Jeromy Cannon <[email protected]>

commit a0ba91f
Author: Jeromy Cannon <[email protected]>
Date:   Mon Feb 10 19:37:10 2025 +0000

    add missing import

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 6afa050
Author: Jeromy Cannon <[email protected]>
Date:   Mon Feb 10 19:11:32 2025 +0000

    created factory and way to get k8 instance passing in the context

    Signed-off-by: Jeromy Cannon <[email protected]>

commit d77f122
Author: Jeromy Cannon <[email protected]>
Date:   Mon Feb 10 19:07:37 2025 +0000

    added cluster todos to remove some methods

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 08aeda9
Author: Jeromy Cannon <[email protected]>
Date:   Mon Feb 10 14:10:20 2025 +0000

    make kubeClient private, must have gotten lost in a rebase, set vars to later initialization

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 95cc0c2
Author: Jeromy Cannon <[email protected]>
Date:   Mon Feb 10 13:49:09 2025 +0000

    remove TODOs that have been done

    Signed-off-by: Jeromy Cannon <[email protected]>

Signed-off-by: Jeromy Cannon <[email protected]>
Signed-off-by: Jeromy Cannon <[email protected]>
@jeromy-cannon jeromy-cannon merged commit c794610 into main Feb 11, 2025
40 of 42 checks passed
@jeromy-cannon jeromy-cannon deleted the 01276-k8-factory-pattern branch February 11, 2025 17:30
swirlds-automation added a commit that referenced this pull request Feb 20, 2025
## [0.35.0](v0.34.0...v0.35.0) (2025-02-20)

### Features

* Add adminKey flag to node setup command ([#1193](#1193)) ([b044fcc](b044fcc))
* add BaseCommand.getConsensusNodes() method ([#1364](#1364)) ([44703a4](44703a4))
* add BaseCommand.getContexts() method ([#1366](#1366)) ([7a5b05b](7a5b05b))
* add basic multi-cluster support to `solo network deploy` ([#1389](#1389)) ([22ed9ae](22ed9ae))
* add clusters fluent interface implementation ([#1291](#1291)) ([95c71f0](95c71f0))
* add concurrent to the task of copying hedera jar files to network node ([#1289](#1289)) ([c50f4c3](c50f4c3))
* add configmaps fluent interface implementation ([#1295](#1295)) ([2c5d6f3](2c5d6f3))
* add contexts fluent interface implementation ([#1297](#1297)) ([938a956](938a956))
* add factory and injection logic ([#1352](#1352)) ([c794610](c794610))
* add flags to support aws as storage destination ([#1372](#1372)) ([5ca0e47](5ca0e47))
* add secrets fluent interface implementation ([#1312](#1312)) ([fb92fd6](fb92fd6))
* add service and services fluent interface implementation ([#1303](#1303)) ([8ef6998](8ef6998))
* add support for --force-port-forward as a top level flag ([#1404](#1404)) ([5c18967](5c18967))
* add support for multi-cluster testing via KinD ([#1392](#1392)) ([ec7eca1](ec7eca1))
* add support for using load balancer address in gossip configuration ([#1405](#1405)) ([0e3f41f](0e3f41f))
* **cli:** add new command `solo deployment list` that lists deployments on that specific cluster ([#1220](#1220)) ([6b0b486](6b0b486))
* **cli:** reduce redundancy on context to cluster flags in command `deployment create` ([#1156](#1156)) ([4ab4dd5](4ab4dd5))
* create the v059x node-override.yaml via solo ([#1192](#1192)) ([283d35c](283d35c))
* **external-database:** add ability to pass readonly user to the external database ([#1350](#1350)) ([d9626ac](d9626ac))
* **local-remote-config:** added solo version to local config and remote config ([#1384](#1384)) ([2dca095](2dca095))
* **mirror-node:** Enhance mirror-node external database feature ([#1230](#1230)) ([bce75d5](bce75d5))
* **multi-cluster:** 'solo relay deploy' to handle cluster-ref value ([#1394](#1394)) ([e73114c](e73114c))
* **multi-cluster:** make remote config validation compatible with multi-cluster K8 implementation ([#1407](#1407)) ([7614a39](7614a39))
* **multi-cluster:** Update `solo node setup` to support multiple clusters ([#1368](#1368)) ([4618a43](4618a43))
* **remote-config:** instead of keeping just the command and the subcommand inside the remote config keep the flags as passed ([#1208](#1208)) ([a31498e](a31498e))
* **remote-config:** save reusable solo flags in remoteconfig ([#1191](#1191)) ([809d0ab](809d0ab))
* Separate concepts for namespace and deployment name ([#1231](#1231)) ([2566c90](2566c90))
* update solo to support pathPrefix of mirror node importer ([#1204](#1204)) ([d9a3592](d9a3592))

### Bug Fixes

* ensure network active check supports multi-cluster deployments ([#1431](#1431)) ([a07801f](a07801f))
* ensure staking updates support multi-cluster deployments  ([#1432](#1432)) ([ef5435e](ef5435e))
* fixed issue with taskfile forcing an incorrect cluster and context and added a dual cluster readme ([#1396](#1396)) ([cc672c2](cc672c2))
* fixed merge issue with incorrect license header ([#1235](#1235)) ([cb91806](cb91806))
* increase number of attempts to wait for active nodes ([#1430](#1430)) ([d113167](d113167))
* mirror node command changes required for multi-cluster support ([#1433](#1433)) ([f43870e](f43870e))
* **multi-cluster:** fix 'solo node setup' command, failing when running multiple clusters ([#1421](#1421)) ([eacdf1f](eacdf1f))
* **network-command:** wrong value passed to addDebugOptions inside the 'network' command ([#1415](#1415)) ([c2e5c3b](c2e5c3b))
* Resolve `cannot read properties of undefined `error thrown during `solo network deploy` ([#1410](#1410)) ([401b937](401b937))
* test script of google storage ([#1397](#1397)) ([370f57b](370f57b))
* update default solo helm chart version ([#1378](#1378)) ([5b5e276](5b5e276))
* update RemoteConfig to handle multi-cluster networking ([#1348](#1348)) ([77b769f](77b769f))
* use better internal IPs for 0.58.5+ ([#1429](#1429)) ([26279ac](26279ac))
@swirlds-automation
Copy link
Contributor

🎉 This PR is included in version 0.35.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@swirlds-automation
Copy link
Contributor

🎉 This PR is included in version 0.35.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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add factory and injection logic
4 participants