-
Notifications
You must be signed in to change notification settings - Fork 55
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: Refactor reconcilor so each component is returning status #765
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
6bb520f
to
b485c5d
Compare
Change to PR detected. A new PR build was completed. |
b485c5d
to
bf56f28
Compare
Change to PR detected. A new PR build was completed. |
Signed-off-by: Anish Asthana <[email protected]>
bf56f28
to
54ea85e
Compare
Change to PR detected. A new PR build was completed. |
dspa *dspav1.DataSciencePipelinesApplication, setStatus func(metav1.Condition), | ||
log logr.Logger) { | ||
condition, err := r.evaluateCondition(ctx, dspa, resourceName, conditionType) | ||
condition.Message = statusMessage |
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'm not sure if overwriting the Message
here is the right call. The reason I'm wondering that is that https://github.com/opendatahub-io/data-science-pipelines-operator/blob/main/controllers/dspipeline_controller.go#L406 has a number of instances in which it is setting the Message
field itself. Thoughts @hbelmiro ?
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 actually proposed replacing
r.setStatus(ctx, params.MlmdProxyDefaultResourceName, config.MLMDProxyReady, statusMessage, dspa,
dspaStatus.SetMLMDProxyStatus, log)
with
condition, err := r.evaluateCondition(ctx, dspa, params.MlmdProxyDefaultResourceName, config.MLMDProxyReady)
condition.Message = status
if err != nil {
r.setStatusAsNotReady(config.MLMDProxyReady, err, dspaStatus.SetMLMDProxyStatus)
return ctrl.Result{}, err
}
dspaStatus.SetMLMDProxyStatus(condition)
here.
Related issue: https://issues.redhat.com/browse/RHOAIENG-13321
I took a stab at doing what I think the underlying issue is asking for. @hbelmiro let me know if I'm on the right track!
I haven't gone through and updated all the dependent functions yet since I don't want to go down the stack if my starting point is completely wrong.
Related: #683 (comment)