Closed
Description
I noticed that this code:
go wait.UntilWithContext(ctx, func(ctx context.Context) {
now := time.Now()
refreshAfter := now.Add(-s.refreshInterval)
var count int
for _, obj := range s.store.List() {
comments := obj.(*BugComments)
if comments.RefreshTime.Before(refreshAfter) {
s.queue.Add(comments.Name)
count++
}
}
klog.V(5).Infof("Refreshed %d comments older than %s", count, s.refreshInterval.String())
}, s.refreshInterval/4)
was printing
I0419 16:20:13.714551 976723 comments.go:122] Refreshed 0 comments older than 15m0s
I0419 16:20:13.714603 976723 comments.go:122] Refreshed 0 comments older than 15m0s
which should not happen. Also occurs in wait.Forever.
I suspect that fc8a39d in #87829 regressed this as that was the most recent major update and I only started seeing this on a recent apimachinery bump.
Metadata
Metadata
Assignees
Labels
Categorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.Categorizes issue or PR as related to a regression from a prior release.Categorizes issue or PR as related to a regression from a prior release.Must be staffed and worked on either currently, or very soon, ideally in time for the next release.Must be staffed and worked on either currently, or very soon, ideally in time for the next release.Categorizes an issue or PR as relevant to SIG API Machinery.Categorizes an issue or PR as relevant to SIG API Machinery.