Skip to content

Commit

Permalink
chore: remove unnecessary deepcopy
Browse files Browse the repository at this point in the history
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
  • Loading branch information
Al-Pragliola committed Nov 4, 2024
1 parent 4edb03c commit 3304289
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/feature/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,15 @@ func WaitForPodsToBeReady(namespace string) Action {
return false, err
}

pods := podList.DeepCopy()
pods.Items = filterEvictedPods(podList.Items)
podList.Items = filterEvictedPods(podList.Items)

Check warning on line 67 in pkg/feature/conditions.go

View check run for this annotation

Codecov / codecov/patch

pkg/feature/conditions.go#L67

Added line #L67 was not covered by tests
readyPods := 0
totalPods := len(pods.Items)
totalPods := len(podList.Items)

if totalPods == 0 { // We want to wait for "something", so make sure we have "something" before we claim success.
return false, nil
}

for _, pod := range pods.Items {
for _, pod := range podList.Items {
podReady := true
// Consider a "PodSucceeded" as ready, since these will never will
// be in Ready condition (i.e. Jobs that already completed).
Expand Down

0 comments on commit 3304289

Please sign in to comment.