You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the controller-runtime cache with DefaultNamespaces configured (via ctrl.Options.NewCache), the List() method causes results to accumulate. Each subsequent call to List() includes the results from previous calls, causing the result set to continuously grow.
Steps to Reproduce
Create a cache with DefaultNamespaces configuration:
pods:=&corev1.PodList{}
ctx, cancel:=context.WithTimeout(ctx, 1*time.Minute)
defercancel()
for {
select {
case<-ctx.Done():
t.Fatal("timeout")
default:
err:=c.List(ctx, pods)
// Examine pods.Items length - it grows with each call
}
}
Each call to List() should return the current state of resources, not accumulate previous results. The result set should be reset and then populated with the current state of resources.
version: v0.20.4
The text was updated successfully, but these errors were encountered:
Problem
When using the controller-runtime cache with DefaultNamespaces configured (via
ctrl.Options.NewCache
), theList()
method causes results to accumulate. Each subsequent call toList()
includes the results from previous calls, causing the result set to continuously grow.Steps to Reproduce
Each call to List() should return the current state of resources, not accumulate previous results. The result set should be reset and then populated with the current state of resources.
v0.20.4
The text was updated successfully, but these errors were encountered: