-
Notifications
You must be signed in to change notification settings - Fork 40.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a delayed queueing option to the workqueue #23444
add a delayed queueing option to the workqueue #23444
Conversation
Labelling this PR as size/L |
GCE e2e build/test passed for commit a0f1c8d27a0e60246e786534bc97852d2408c0c1. |
@kubernetes/rh-cluster-infra |
@@ -0,0 +1,135 @@ | |||
/* | |||
Copyright 2015 The Kubernetes Authors All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2016 I presume
a0f1c8d
to
487f97f
Compare
comments addressed. |
} | ||
|
||
go ret.waitingLoop() | ||
ret.notifyAt(time.Now().Add(maxWait)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
time.Now() or clock.Now()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
time.Now() or clock.Now()
done
GCE e2e build/test failed for commit 487f97fe68b326355d28b47c788c8426fd2c960e. Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake. |
487f97f
to
b4a1d8f
Compare
GCE e2e build/test passed for commit b4a1d8f428fac9f1cc3eba5cf6f669def54cb9ca. |
return ret | ||
} | ||
|
||
type delayingType struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is internal, and maybe it should all be obvious, but it would be useful to have comments explaining each struct and its members.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is internal, and maybe it should all be obvious, but it would be useful to have comments explaining each struct and its members.
Will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is internal, and maybe it should all be obvious, but it would be useful to have comments explaining each struct and its members.
Lots of comments added.
if duration < 0 || duration > maxWait { | ||
duration = maxWait | ||
} | ||
nextReadyCheck = q.clock.Now().Add(duration) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo here. It needs to set the struct value.
b4a1d8f
to
e9d3354
Compare
Comments addressed. |
GCE e2e build/test passed for commit e9d3354b272e1f9076624a72286a704a4476b686. |
GCE e2e build/test passed for commit b403eef11b30288ad36e5c82a6ca4561e597a91f. |
9f6ca38
to
a63a434
Compare
LGTM |
a63a434
to
bf097ea
Compare
me too |
GCE e2e build/test passed for commit bf097ea. |
GCE e2e build/test passed for commit a63a434895de61da3c8db9a4a98d815a3bf671dc. |
Removing LGTM because the release note process has not been followed. |
@k8s-bot test this Tests are more than 48 hours old. Re-running tests. |
GCE e2e build/test passed for commit bf097ea. |
@k8s-bot test this Tests are more than 48 hours old. Re-running tests. |
GCE e2e build/test passed for commit bf097ea. |
@k8s-bot test this Tests are more than 48 hours old. Re-running tests. |
GCE e2e build/test passed for commit bf097ea. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit bf097ea. |
Automatic merge from submit-queue |
Adds delayed requeuing to the workqueue so that I requeue an item to be retried at some later time in my controller with a series of backoff rules. It lets me have the best of the retryManager and the work queue de-duping. Tracking failures and backoffs is on the caller
@smarterclayton @pweil- this would help us move to using the informer everywhere and de-duping at that level.