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

refactor: update codebase to use k8.containers methods directly & move patchConfigMap + patchIngress out of k8 #1335

Merged
merged 5 commits into from
Feb 10, 2025

Conversation

jeromy-cannon
Copy link
Contributor

@jeromy-cannon jeromy-cannon commented Feb 9, 2025

Description

This pull request changes the following:

  • update codebase to use k8.containers methods directly
  • move patchConfigMap out of k8 and into config map class
  • move patchIngress out of k8 and into ingresses class
  • don't run patch config map for ingress if ingress is not enabled in explorer

Related Issues

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

github-actions bot commented Feb 9, 2025

Unit Test Results - Linux

  1 files  ±0   59 suites  ±0   3s ⏱️ +2s
231 tests ±0  231 ✅ ±0  0 💤 ±0  0 ❌ ±0 
240 runs  ±0  240 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit c401cb1. ± Comparison against base commit fd11990.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Feb 9, 2025

Unit Test Results - Windows

  1 files  ±0   59 suites  ±0   2s ⏱️ -1s
231 tests ±0  231 ✅ ±0  0 💤 ±0  0 ❌ ±0 
240 runs  ±0  240 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit c401cb1. ± Comparison against base commit fd11990.

♻️ This comment has been updated with latest results.

@jeromy-cannon jeromy-cannon force-pushed the 01319-kube-hierarchial-folders branch 3 times, most recently from 6b4b602 to da6eb9f Compare February 9, 2025 19:47
@jeromy-cannon jeromy-cannon force-pushed the 01331-k8-containers-integration branch from 88f64dd to 72ebb2e Compare February 9, 2025 19:57
@jeromy-cannon jeromy-cannon force-pushed the 01319-kube-hierarchial-folders branch from 71a01ca to 52e51a9 Compare February 9, 2025 20:25
@jeromy-cannon jeromy-cannon force-pushed the 01331-k8-containers-integration branch from 72ebb2e to b101f87 Compare February 9, 2025 20:26
@jeromy-cannon jeromy-cannon changed the title refactor: update codebase to use k8.containers methods directly refactor: update codebase to use k8.containers methods directly & move patchConfigMap out of k8 and into config map class Feb 9, 2025
@jeromy-cannon jeromy-cannon changed the title refactor: update codebase to use k8.containers methods directly & move patchConfigMap out of k8 and into config map class refactor: update codebase to use k8.containers methods directly & move patchConfigMap + patchIngress out of k8 and into correct class Feb 9, 2025
@jeromy-cannon jeromy-cannon changed the title refactor: update codebase to use k8.containers methods directly & move patchConfigMap + patchIngress out of k8 and into correct class refactor: update codebase to use k8.containers methods directly & move patchConfigMap + patchIngress out of k8 Feb 9, 2025
Base automatically changed from 01319-kube-hierarchial-folders to main February 9, 2025 22:47
commit 88f64dd
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 19:28:18 2025 +0000

    refactor: update codebase to use k8.containers methods directly

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

commit 394f5ac
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 18:47:05 2025 +0000

    removed some TODOs

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

commit 3badeea
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 18:11:10 2025 +0000

    refactor: align to kube hierarchial folder structure

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

commit 2dbdb56
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 17:10:23 2025 +0000

    refactor: moved K8Client to k8_client folder

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

commit 11851a6
Merge: 28b6d17 547ed19
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 18:28:21 2025 +0000

    Merge branch 'main' into 01275-k8-leases-integration

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

commit 547ed19
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 18:24:48 2025 +0000

    refactor: update codebase to use k8.pods methods directly and moved pod files to resources/pod  (#1327)

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

commit 28b6d17
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 17:17:37 2025 +0000

    Squashed commit of the following:

    commit cccb522
    Author: Jeromy Cannon <[email protected]>
    Date:   Sun Feb 9 16:50:29 2025 +0000

        fixed test case

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

    commit f7493cd
    Author: Jeromy Cannon <[email protected]>
    Date:   Sun Feb 9 16:39:27 2025 +0000

        fixed test case

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

    commit 7c03383
    Author: Jeromy Cannon <[email protected]>
    Date:   Sun Feb 9 16:37:02 2025 +0000

        integrated lease methods

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

    commit 6728cd1
    Author: Jeromy Cannon <[email protected]>
    Date:   Sun Feb 9 16:29:13 2025 +0000

        moved leases to resources/lease

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

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

commit e5c7ac6
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 17:16:33 2025 +0000

    fixed k8 e2e test failure for pod wait for running phase

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

commit cbdc295
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 16:53:15 2025 +0000

    Revert "fixed test case"

    This reverts commit bbb4738.

commit 390295e
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 16:50:29 2025 +0000

    fixed test case

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

commit bbb4738
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 16:39:27 2025 +0000

    fixed test case

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

commit 610c468
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 16:02:45 2025 +0000

    fixed test case

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

commit fa9d2d7
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 15:44:29 2025 +0000

    aligned to code style

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

commit 77c037d
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 15:29:14 2025 +0000

    fixed unit tests

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

commit a5634cd
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 15:22:00 2025 +0000

    got everything to compile after removing k8 methods and updating

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

commit 05ad87d
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 13:56:19 2025 +0000

    moved pod files to resource/pod folder

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

commit d976511
Author: Jeromy Cannon <[email protected]>
Date:   Sun Feb 9 13:33:26 2025 +0000

    moved pod files to resources/pod

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

Signed-off-by: Jeromy Cannon <[email protected]>
@jeromy-cannon jeromy-cannon force-pushed the 01331-k8-containers-integration branch from ecab7c2 to 1e53067 Compare February 9, 2025 22:51
…o made mirror node not do the patch if ingress is not enabled

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

E2E Test Report

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

Results for commit c401cb1. ± Comparison against base commit fd11990.

Copy link
Contributor

E2E Test Report

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

Results for commit c401cb1. ± Comparison against base commit fd11990.

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.19% (target: -1.00%) 76.55%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (fd11990) 22911 19262 84.07%
Head commit (c401cb1) 22995 (+84) 19290 (+28) 83.89% (-0.19%)

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 (#1335) 307 235 76.55%

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

@jeromy-cannon jeromy-cannon marked this pull request as ready for review February 10, 2025 00:37
@jeromy-cannon jeromy-cannon requested review from leninmehedy and a team as code owners February 10, 2025 00:37
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

Attention: Patch coverage is 74.26710% with 79 lines in your changes missing coverage. Please review.

Project coverage is 82.80%. Comparing base (fd11990) to head (c401cb1).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ient/resources/config_map/k8_client_config_maps.ts 20.00% 40 Missing ⚠️
...k8_client/resources/ingress/k8_client_ingresses.ts 79.51% 17 Missing ⚠️
src/commands/explorer.ts 6.66% 14 Missing ⚠️
src/commands/node/tasks.ts 92.85% 7 Missing ⚠️
src/core/platform_installer.ts 92.30% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1335      +/-   ##
==========================================
- Coverage   83.02%   82.80%   -0.22%     
==========================================
  Files         125      126       +1     
  Lines       22911    22995      +84     
  Branches     2228     1663     -565     
==========================================
+ Hits        19021    19042      +21     
- Misses       3715     3867     +152     
+ Partials      175       86      -89     
Files with missing lines Coverage Δ
src/commands/mirror_node.ts 76.34% <100.00%> (+0.22%) ⬆️
src/core/kube/k8_client/k8_client.ts 96.38% <100.00%> (+2.87%) ⬆️
..._client/resources/container/k8_client_container.ts 78.58% <100.00%> (+0.16%) ⬆️
src/core/network_nodes.ts 91.40% <100.00%> (+0.88%) ⬆️
src/core/platform_installer.ts 88.10% <92.30%> (-0.07%) ⬇️
src/commands/node/tasks.ts 93.81% <92.85%> (-0.02%) ⬇️
src/commands/explorer.ts 70.37% <6.66%> (-2.93%) ⬇️
...k8_client/resources/ingress/k8_client_ingresses.ts 79.51% <79.51%> (ø)
...ient/resources/config_map/k8_client_config_maps.ts 49.75% <20.00%> (-9.74%) ⬇️

... and 47 files with indirect coverage changes

Impacted file tree graph

@jeromy-cannon jeromy-cannon added the PR: Needs Approval A pull request that needs reviews and approvals. label Feb 10, 2025
@jeromy-cannon jeromy-cannon merged commit 6bfdecd into main Feb 10, 2025
42 of 45 checks passed
@jeromy-cannon jeromy-cannon deleted the 01331-k8-containers-integration branch February 10, 2025 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Needs Approval A pull request that needs reviews and approvals.
Projects
None yet
2 participants