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

KSPACE-43: Adding common GetClusters func #543

Closed

Conversation

fbm3307
Copy link
Contributor

@fbm3307 fbm3307 commented Mar 14, 2024

Adding a new common function GetClusters() to fetch the clusters from cache as we have dropped the cluster type as per changes in toolchain-common

Related PRs
Toolchain-common - codeready-toolchain/toolchain-common#372
Paired-Toolchain-e2e - codeready-toolchain/toolchain-e2e#923

Copy link

openshift-ci bot commented Mar 14, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fbm3307
Once this PR has been reviewed and has the lgtm label, please assign sbryzak for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: Feny Mehta <[email protected]>
Copy link

codecov bot commented Mar 14, 2024

Codecov Report

Merging #543 (678ae9a) into master (c299f14) will increase coverage by 0.01%.
The diff coverage is 90.90%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #543      +/-   ##
==========================================
+ Coverage   84.05%   84.06%   +0.01%     
==========================================
  Files          29       29              
  Lines        2634     2636       +2     
==========================================
+ Hits         2214     2216       +2     
  Misses        277      277              
  Partials      143      143              
Files Coverage Δ
...ontrollers/memberstatus/memberstatus_controller.go 93.59% <100.00%> (ø)
controllers/nstemplateset/client.go 86.04% <ø> (ø)
controllers/nstemplateset/nstemplatetier.go 95.91% <100.00%> (+0.08%) ⬆️
controllers/idler/idler_controller.go 93.91% <66.66%> (+0.01%) ⬆️

@@ -56,7 +56,7 @@ type Reconciler struct {
AllNamespacesClient client.Client
ScalesClient scale.ScalesGetter
DynamicClient dynamic.Interface
GetHostCluster cluster.GetHostClusterFunc
GetHostCluster cluster.GetClustersFunc
Copy link
Contributor

Choose a reason for hiding this comment

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

The name of the parameter is GetHostCluster in a singular form, but the function can return 0..n objects. Let's either change the name or the type of the parameter

Comment on lines +326 to +327
allclustersCl := reconciler.GetHostCluster()
hostCl := allclustersCl[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

this could work too, right?

Suggested change
allclustersCl := reconciler.GetHostCluster()
hostCl := allclustersCl[0]
hostCl := reconciler.GetHostCluster()[0]

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
16.0% Duplication on New Code

See analysis details on SonarCloud

@fbm3307
Copy link
Contributor Author

fbm3307 commented Mar 19, 2024

Closing this PR as Adding the Common Getcluster Func is not required now

@fbm3307 fbm3307 closed this Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants