-
Notifications
You must be signed in to change notification settings - Fork 148
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
Update DSC status with the related components status" #1431
Update DSC status with the related components status" #1431
Conversation
Skipping CI for Draft Pull Request. |
This PR can't be merged just yet 😢Please run For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/12221051844 |
4c47d64
to
3eb275f
Compare
This PR can't be merged just yet 😢Please run For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/12221061488 |
3eb275f
to
86d75d5
Compare
This PR can't be merged just yet 😢Please run For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/12221069570 |
This PR can't be merged just yet 😢Please run For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/12221076816 |
86d75d5
to
c0f6ac5
Compare
This PR can't be merged just yet 😢Please run For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/12223711116 |
a052d93
to
5f019cd
Compare
d976c81
to
dbb1137
Compare
Adding @grdryn, since this change will be helpful for setting Kserve status |
d693ade
to
6de737a
Compare
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.
Minor nit on naming , but otherwise looks good to me.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lphiri 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 |
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.
Generally LGTM, with some minor suggestions and questions 👍
) | ||
|
||
// TODO: all the logic about the deletion configmap should be moved to another controller |
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 this a TODO for this PR, or for the future? If future, would it make sense to have a Jira issue for it?
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.
Added jira link
if err != nil { | ||
return instance, fmt.Errorf("failed to update DataScienceCluster status after reconciling %s: %w", componentName, err) | ||
default: | ||
return nil, fmt.Errorf("unsuported management state: %s", ms) |
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.
return nil, fmt.Errorf("unsuported management state: %s", ms) | |
return nil, fmt.Errorf("unsupported management state: %s", ms) |
/me hides 😶🌫️
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.
done
if err != nil { | ||
func (r *DataScienceClusterReconciler) watchDeleteConfigMap(ctx context.Context, a client.Object) []reconcile.Request { | ||
cm, ok := a.(*corev1.ConfigMap) | ||
if !ok { | ||
return nil |
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.
Would make sense as an alternative to pull out these conditions to a predicate to be used on the Watches method on L319, and just use handlers.Fn(r.watchDataScienceClusters)
as the event handler? I'm not sure if I'm thinking about this correctly or not
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.
done, let me know what you think
NewComponentReconciler(ctx context.Context, mgr ctrl.Manager) error | ||
// UpdateDSCStatus update the component specific status part od the DSC |
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.
// UpdateDSCStatus update the component specific status part od the DSC | |
// UpdateDSCStatus updates the component specific status part of the DSC |
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.
done
/* | ||
predicate.Funcs{ | ||
UpdateFunc: func(event event.UpdateEvent) bool { | ||
fmt.Println( | ||
">>>", | ||
"gvk", event.ObjectNew.GetObjectKind().GroupVersionKind(), | ||
"namespace", event.ObjectNew.GetNamespace(), | ||
"name", event.ObjectNew.GetName(), | ||
"diff", cmp.Diff(event.ObjectOld, event.ObjectNew), | ||
) | ||
|
||
return true | ||
}, | ||
}), | ||
*/ |
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 this comment expected to be here?
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.
removed
tests/e2e/codeflare_test.go
Outdated
}) | ||
|
||
if err != nil { | ||
return fmt.Errorf("error waiting Ready state for CodeFlare componetn in DSC: %w", err) |
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.
return fmt.Errorf("error waiting Ready state for CodeFlare componetn in DSC: %w", err) | |
return fmt.Errorf("error waiting on Ready state for CodeFlare component in DSC: %w", err) |
and equivalent suggestion for the other tests that have this check
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.
done
// ModelMeshServing component status. | ||
ModelMeshServing componentApi.DSCModelMeshServingStatus `json:"modelmeshserving,omitempty"` | ||
|
||
// DataServicePipeline component status. |
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.
// DataServicePipeline component status. | |
// DataSciencePipeline component status. |
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.
done
ModelMeshServing componentApi.DSCModelMeshServingStatus `json:"modelmeshserving,omitempty"` | ||
|
||
// DataServicePipeline component status. | ||
// Require OpenShift Pipelines Operator to be installed before enable component |
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.
// Require OpenShift Pipelines Operator to be installed before enable component | |
// Requires OpenShift Pipelines Operator to be installed before enable component |
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.
done
DataSciencePipelines componentApi.DSCDataSciencePipelinesStatus `json:"datasciencepipelines,omitempty"` | ||
|
||
// Kserve component status. | ||
// Require OpenShift Serverless and OpenShift Service Mesh Operators to be installed before enable component |
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.
// Require OpenShift Serverless and OpenShift Service Mesh Operators to be installed before enable component | |
// Requires OpenShift Serverless and OpenShift Service Mesh Operators to be installed before enable component |
I wonder if this is still true in all cases actually...I guess they shouldn't be absolutely necessary for RawDeployment mode? 🤔
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 is something I don't know, the comment was there alrady (just copy pasted, and now removed since it does not make any sense on the status subresource)
Kueue componentApi.DSCKueueStatus `json:"kueue,omitempty"` | ||
|
||
// CodeFlare component status. | ||
// If CodeFlare Operator has been installed in the cluster, it should be uninstalled first before enabled component. |
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.
// If CodeFlare Operator has been installed in the cluster, it should be uninstalled first before enabled component. | |
// If CodeFlare Operator has been installed in the cluster, it should be uninstalled first before enabling component. |
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.
done
This PR can't be merged just yet 😢Please run For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/12245986753 |
This PR can't be merged just yet 😢Please run For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/12246154643 |
@grdryn @VaishnaviHire e2e tests are a little bit of a mess, I'll refactor them out once we get this and #1437 merged if that's fine with you |
/lgtm |
acb2d22
to
fcfcba0
Compare
@VaishnaviHire @grdryn mind another review ? rebased on top of main |
} | ||
|
||
readyCondition := meta.FindStatusCondition(ci.GetStatus().Conditions, status.ConditionTypeReady) | ||
if readyCondition != nil && readyCondition.Status != metav1.ConditionTrue { |
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 ready if there is no ready condition?
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.
good spot, let me fix it
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.
Pushed a commit, now the logic is that:
- if the component is not
managed
, skip checking its readiness - if the component is
managed
, then it is ready if the ready condition is present with statusTrue
- the message DSC's
Ready
condition message has been made generic as multiple factors could contribute to set it to ready (i.e. a cluster without managed components is stillReady
)
@lburgazzoli Branch needs a rebase |
This commit includes: - exposing common components status to the DSC as part of status.components field - introduce a new Ready conditions that becomes true only when all the components are also Ready - reduces DSC chattering, by reducing the number of updates per reconcile Signed-off-by: Luca Burgazzoli <[email protected]>
195e7fa
to
238ae87
Compare
done |
/lgtm |
817b465
into
opendatahub-io:main
Description
This commit includes:
status.components field
components are also Ready
Notes:
https://issues.redhat.com/browse/RHOAIENG-15042
How Has This Been Tested?
e2e tests in progress
Screenshot or short clip
Merge criteria
Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).The developer has manually tested the changes and verified that the changes work