-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
✨ [WIP] Add BaseContext to manager Options for use with Runnables #1846
Conversation
|
Welcome @aphistic! |
Hi @aphistic. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
/ok-to-test |
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.
Hi @aphistic apologies for the delay in answering. The changes in this PR look good and I'm completely fine merging it in, it gives ultimate control to the caller and retains current functionality.
The main reason we need a context that's separate from the main start one is to control the stop procedure in a really specific order.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aphistic, vincepri 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 |
Hi @vincepri! My main concern about it is that I wasn't able to add any tests for it to validate that the |
This PR adds a new
BaseContext
option tomanager.Options
. It's designed to be used as the basis of anyRunnable
s created by aManager
, so there's a way to connect the contexts from the user's side to theRunnable
side. Currently a newcontext.Background()
is created so theRunnable
s aren't canceled when a top-level context is, so this provides a way for a user to put info in theirRunnable
contexts.There's a discussion about this in #1817, and this PR closes #1817.
I've marked this as a WIP because the functionality works fine through anecdotal usage, but I'm unable to run the tests locally using the recommended
make test
, so I can't add any tests for this at the moment. I brought it up in the #controller-runtime Slack channel but haven't seen any responses yet.