jkube icon indicating copy to clipboard operation
jkube copied to clipboard

KubernetesClientUtil : Refactor loop to get rid of nested `if` statements

Open rohanKanojia opened this issue 1 year ago • 8 comments

Component

JKube Kit

Task description

Description

This loop in KubernetesClientUtil seems to have a lot of nested statements:

https://github.com/eclipse-jkube/jkube/blob/7d08fb086e056e60a7b5ac4533d4bc3a2bdcf09f/jkube-kit/config/service/src/main/java/org/eclipse/jkube/kit/config/service/kubernetes/KubernetesClientUtil.java#L141-L148

We should refactor it. I think we can make use of Java Stream API here to get the desired result quite easily.

Expected Behavior

Nested if statements are removed from for loop

Acceptance Criteria

  • [ ] Nested if statements are removed from for loop
  • [ ] Project compiles cleanly after running mvn clean install

rohanKanojia avatar May 08 '24 14:05 rohanKanojia

Hi @rohanKanojia : I can work on this. Could you please assign this issue to me?

l3002 avatar May 08 '24 20:05 l3002

@l3002: You already have 2 issues assigned to you at the moment. It's generally advised to not work on multiple things at a time. Will you be okay with picking up this one as well (considering your existing work priorities) ?

rohanKanojia avatar May 09 '24 03:05 rohanKanojia

@rohanKanojia Please assign this to me

rohit-satya avatar May 09 '24 05:05 rohit-satya

@rohit-satya : You've commented on multiple issues. Which one should I assign?

rohanKanojia avatar May 09 '24 05:05 rohanKanojia

@rohanKanojia : I'll be delivering the a PR for #2665 today, so I'm sure I'll be able to work on this issue as well. For #2841, I will try to close this one by this week only. Therefore, If multiple issue assignation complies with the existing policy for this repo, then I'll be glad to work on this.

l3002 avatar May 09 '24 08:05 l3002

Note that we create new issues every week.

manusa avatar May 09 '24 09:05 manusa

@rohit-satya : You've commented on multiple issues. Which one should I assign?

@rohanKanojia In such a case please assign any one and you can reject me for others if you think I won't be able to deliver in time

rohit-satya avatar May 11 '24 15:05 rohit-satya

Hi @rohanKanojia, Please go ahead and assign this issue to @rohit-satya, he as already created a pull request for this.

@rohit-satya: Thanks Rohit, I was quite busy last week, couldn't get to this.

l3002 avatar May 23 '24 16:05 l3002