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

refactor: use equivalent, shorter Builder.Owns() method #881

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

davidxia
Copy link
Contributor

@davidxia davidxia commented Jan 23, 2023

instead of longer Builder.Watches().

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

instead of longer `Builder.Watches()`.
@davidxia davidxia marked this pull request as ready for review January 23, 2023 15:59
@davidxia
Copy link
Contributor Author

@kevin85421 @Jeffwan as recent committers/owners of the repo. Very small PR. ~5min to review

docstring for Owns()

// Owns defines types of Objects being *generated* by the ControllerManagedBy, and configures the ControllerManagedBy to respond to
// create / delete / update events by *reconciling the owner object*.  This is the equivalent of calling
// Watches(&source.Kind{Type: <ForType-forInput>}, &handler.EnqueueRequestForOwner{OwnerType: apiType, IsController: true}).

Copy link
Member

@kevin85421 kevin85421 left a comment

Choose a reason for hiding this comment

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

LGTM. I am not very familiar with controller-runtime, so cc @DmitriGekhtman @architkulkarni for more reviews.

@davidxia
Copy link
Contributor Author

Owns() is also already being used in rayservice_controller.go

@DmitriGekhtman
Copy link
Collaborator

This is valid.

The Watches on Events looks a little different -- what's going on there?

@davidxia
Copy link
Contributor Author

The Watches on Events looks a little different -- what's going on there?

Not sure. I left that line as is. Looks like it's listening for all events and was added in #294. More details in that PR.

Added Event reconcile function so that in case of Readiness Probe failure, we can try to recover head or worker node if possible

@DmitriGekhtman
Copy link
Collaborator

Test failures due to known flakiness.

@DmitriGekhtman DmitriGekhtman merged commit cbe1865 into ray-project:master Jan 24, 2023
@davidxia davidxia deleted the dxia/patch1 branch January 24, 2023 16:07
lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants