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
apimachinery/wait: add context-aware helpers #72928
Conversation
Hi @lucab. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/sig api-machinery |
687e1b9
to
d67cf56
Compare
/ok-to-test thx. there was a general goal to replace usage of stopCh to context in the codebase as many as possible. |
/cc @s-urbaniak @squat as we discussed this earlier, in case you have time for a cursory look. |
looks good! Just a small suggestion to reduce code duplication:
|
This adds three context-aware helpers to the existing set of `util/wait` wrappers. Those allow to link caller, wrapper, and inner function into the same cancellation chain. It also allows to gracefully cancel inner workload when the parent context expires. Signed-off-by: Luca Bruno <luca.bruno@coreos.com>
d67cf56
to
c4f1568
Compare
/test pull-kubernetes-e2e-kops-aws |
@s-urbaniak thanks for the suggestion, updated to that. |
/assign @caesarxuchao @jingyih |
@fedebongio: GitHub didn't allow me to assign the following users: jingyih. Note that only kubernetes members and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@sttts any chance you can give a quick look/stamp at this? It would allow a bit cleaner context chaining in consumers (viz., operators). |
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.
lgtm.
@yue9944882 do you know who's leading the context/stopCh refactor?
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lucab, sttts The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Review the full test history for this PR. Silence the bot with an |
4 similar comments
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
This adds three context-aware helpers to the existing set of
util/wait
wrappers. Those allow to link caller, wrapper, and inner function into
the same cancellation chain. It also allows to gracefully cancel inner
workload when the parent context expires.
Signed-off-by: Luca Bruno luca.bruno@coreos.com
What type of PR is this?
/kind cleanup
Does this PR introduce a user-facing change?: