Skip to content
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

Merged

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Mar 24, 2016

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.

@k8s-github-robot
Copy link

Labelling this PR as size/L

@k8s-github-robot k8s-github-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 24, 2016
@k8s-bot
Copy link

k8s-bot commented Mar 24, 2016

GCE e2e build/test passed for commit a0f1c8d27a0e60246e786534bc97852d2408c0c1.

@deads2k
Copy link
Contributor Author

deads2k commented Mar 29, 2016

@kubernetes/rh-cluster-infra

@@ -0,0 +1,135 @@
/*
Copyright 2015 The Kubernetes Authors All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2016 I presume

@deads2k
Copy link
Contributor Author

deads2k commented Mar 30, 2016

comments addressed.

}

go ret.waitingLoop()
ret.notifyAt(time.Now().Add(maxWait))
Copy link
Member

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()

Copy link
Contributor Author

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

@k8s-bot
Copy link

k8s-bot commented Mar 30, 2016

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.

@deads2k deads2k force-pushed the add-requeue-after-duration branch from 487f97f to b4a1d8f Compare March 30, 2016 19:41
@k8s-bot
Copy link

k8s-bot commented Mar 30, 2016

GCE e2e build/test passed for commit b4a1d8f428fac9f1cc3eba5cf6f669def54cb9ca.

return ret
}

type delayingType struct {
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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)
Copy link
Contributor Author

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.

@deads2k
Copy link
Contributor Author

deads2k commented Apr 5, 2016

Comments addressed.

@k8s-bot
Copy link

k8s-bot commented Apr 5, 2016

GCE e2e build/test passed for commit e9d3354b272e1f9076624a72286a704a4476b686.

@deads2k deads2k assigned ncdc and unassigned dchen1107 Apr 5, 2016
@k8s-github-robot k8s-github-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Apr 7, 2016
@k8s-bot
Copy link

k8s-bot commented Apr 7, 2016

GCE e2e build/test passed for commit b403eef11b30288ad36e5c82a6ca4561e597a91f.

@deads2k deads2k force-pushed the add-requeue-after-duration branch 2 times, most recently from 9f6ca38 to a63a434 Compare April 7, 2016 19:08
@liggitt
Copy link
Member

liggitt commented Apr 7, 2016

LGTM

@deads2k deads2k force-pushed the add-requeue-after-duration branch from a63a434 to bf097ea Compare April 7, 2016 19:10
@deadliggitt
Copy link

LGTM

me too

@deads2k deads2k added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 7, 2016
@k8s-bot
Copy link

k8s-bot commented Apr 7, 2016

GCE e2e build/test passed for commit bf097ea.

@k8s-bot
Copy link

k8s-bot commented Apr 7, 2016

GCE e2e build/test passed for commit a63a434895de61da3c8db9a4a98d815a3bf671dc.

@k8s-github-robot
Copy link

Removing LGTM because the release note process has not been followed.
One of the following labels is required "release-note", "release-note-none", or "release-note-action-required"
Please see: https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/release-notes.md

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 7, 2016
@liggitt liggitt added lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels Apr 7, 2016
@k8s-github-robot
Copy link

@k8s-bot test this

Tests are more than 48 hours old. Re-running tests.

@k8s-bot
Copy link

k8s-bot commented Apr 9, 2016

GCE e2e build/test passed for commit bf097ea.

@k8s-github-robot
Copy link

@k8s-bot test this

Tests are more than 48 hours old. Re-running tests.

@k8s-bot
Copy link

k8s-bot commented Apr 11, 2016

GCE e2e build/test passed for commit bf097ea.

@k8s-github-robot
Copy link

@k8s-bot test this

Tests are more than 48 hours old. Re-running tests.

@k8s-bot
Copy link

k8s-bot commented Apr 13, 2016

GCE e2e build/test passed for commit bf097ea.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Apr 14, 2016

GCE e2e build/test passed for commit bf097ea.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.