Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[Feature][RayCluster]: Implement the HeadReady condition #2261
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
[Feature][RayCluster]: Implement the HeadReady condition #2261
Changes from all commits
6b12c3f
b1c1a7e
0482ae2
0ee738c
8cbb04a
95ebeda
c90a5ef
44c545f
fe6c653
24df0bd
c02b4ff
ffa4f43
a497a41
5221359
3f059e7
583740c
e6e4a1b
94cf0f2
71e2340
8fe0751
01e90f6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
It's possible for
GetRayClusterHeadPod
to returnnil, nil
when no head Pod exists. We need to handle the case.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.
cc @rueian maybe we can return a non-nil error when there is no head Pod exists?
I found that we always return a non-nil error.
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.
Is it possible for
pod.Status.Conditions
not to havecorev1.PodReady
? If so, we will create a condition with an emptyReason
.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.
yes you are right, i update the logic here to have an initial Condition
kuberay/ray-operator/controllers/ray/utils/util.go
Lines 75 to 79 in 01e90f6
plus this logic
kuberay/ray-operator/controllers/ray/utils/util.go
Lines 95 to 98 in 01e90f6
to prevent empty reason sneak into later
SetStatusCondition
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.
this seems to be unnecessary?
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.
i think it could happen when
cond.Status != corev1.ConditionTrue
andcond.Reason
for some reason give us empty string, which i think is pretty rare when we are checkingcond.Type == PodReady
, but just to be safe i add a check here so it will fall back to defaultrayv1.UnknownReason
non empty reason