-
Notifications
You must be signed in to change notification settings - Fork 321
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
ray-operator: Reuse contexts across ray operator reconcilers #1126
Conversation
4a321fa
to
9a9e94c
Compare
9a9e94c
to
a1571d4
Compare
Thanks @anishasthana |
a1571d4
to
9f0e28c
Compare
Signed-off-by: Anish Asthana <anishasthana1@gmail.com>
9f0e28c
to
f2a8320
Compare
Thank you, @anishasthana, for this pull request, and thank you, @blublinsky, for raising this issue! It is a bit embarrassing, but I do not know much about
Thanks! |
@kevin85421 A good description of context is here https://betterprogramming.pub/how-and-when-to-use-context-in-go-b365ddf42ae2. In a nutshell, propagating a context, instead of creating a new one every time conserves resources and allows an operator to better control the execution of the operator's sub/co routines |
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! Thank @anishasthana for this contribution and @blublinsky for the review! The article is very helpful.
Reuse contexts across ray operator controllers
cc @kevin85421
Why are these changes needed?
Related issue number
Closes #1089
Checks
I deployed using the instructions in development.md. I tested with the smallest sample: https://raw.githubusercontent.com/ray-project/kuberay/master/ray-operator/config/samples/ray-cluster.mini.yaml