Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

regression: wait.Forever runs twice immediately since 1.18 #90287

Copy link
Copy link
Closed
@smarterclayton

Description

@smarterclayton
Issue body actions

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

kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.kind/regressionCategorizes 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.priority/important-soonMust 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.sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.Categorizes an issue or PR as relevant to SIG API Machinery.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.