-
Notifications
You must be signed in to change notification settings - Fork 160
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
Report reconciliation errors as part of the component' status (pt1) #1684
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 |
6480990
to
806a697
Compare
/test opendatahub-operator-e2e |
2 similar comments
/test opendatahub-operator-e2e |
/test opendatahub-operator-e2e |
/test all |
/test opendatahub-operator-e2e |
86f903e
to
6f3ab48
Compare
if err := cli.Get(ctx, client.ObjectKey{Name: kserveConfigMapName, Namespace: dscispec.ApplicationsNamespace}, &kserveConfigMap); err != nil { | ||
err := cli.Get(ctx, client.ObjectKey{Name: kserveConfigMapName, Namespace: dscispec.ApplicationsNamespace}, &kserveConfigMap) | ||
if errors.IsNotFound(err) { | ||
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.
this will set k.Statu.sDefaultDeploymentMode to "" ?
or should it return string(Serverless), 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.
This is something not introduced by this PR, I've only added the IsNotFound
check to avoid swallowing an error
@grdryn should know more
controllers/components/modelregistry/modelregistry_controller_actions.go
Outdated
Show resolved
Hide resolved
controllers/components/modelregistry/modelregistry_controller_actions.go
Outdated
Show resolved
Hide resolved
controllers/components/modelregistry/modelregistry_controller_actions.go
Outdated
Show resolved
Hide resolved
controllers/components/datasciencepipelines/datasciencepipelines_controller_actions.go
Show resolved
Hide resolved
763187b
to
d1697d7
Compare
/test opendatahub-operator-e2e |
/retest |
This commit introduces some enhancement to what and how components are reporting theirs status by: - Includes a `Ready` top-level condition which summarizes more detailed conditions - Includes a `ProvisioningSucceeded` condition that reports any provisioning error, i.e. a deployment fails to be provisioned because of any invalid fields, some pre-requisites are not met ```yaml apiVersion: components.platform.opendatahub.io/v1alpha1 kind: ModelRegistry metadata: name: default-modelregistry spec: registriesNamespace: odh-model-registries status: conditions: - lastTransitionTime: "2025-02-03T13:10:32Z" message: 0/1 deployments ready reason: DeploymentsNotReady status: "False" type: Ready - lastTransitionTime: "2025-02-03T12:55:45Z" status: "True" type: ProvisioningSucceeded - lastTransitionTime: "2025-02-03T13:10:32Z" message: 0/1 deployments ready reason: DeploymentsNotReady status: "False" type: DeploymentsAvailable - lastTransitionTime: "2025-02-03T12:55:32Z" status: "True" type: ServerlessAvailable ``` > [!NOTE] > in the case we want a condition to be set to `False`, but that should not affect > the top level condition, it is possible to set the `severity` field as `Info`. > The default is `Error` and it is being represented by an empty value. > >```yaml > - lastTransitionTime: "2025-02-03T13:10:42Z" > reason: FooReasin > severity: Info > status: "True" > type: Foo >``` If needed, additional conditions can be added by individual component or services: ```go _, err := reconciler.ReconcilerFor(mgr, &componentApi.ModelRegistry{}). // ... WithConditions( status.ConditionDeploymentsAvailable, status.ConditionServerlessAvailable). Build(ctx) ``` To help managing conditions, a `conditions.Manager` type has been inrtoduced, largely inspired by Knative's conditions set code [1], but improved to handle our specific use cases. [1] https://github.com/knative/pkg/blob/main/apis/condition_set.go
Co-authored-by: Wen Zhou <wenzhou@redhat.com>
…actions.go Co-authored-by: Wen Zhou <wenzhou@redhat.com>
…actions.go Co-authored-by: Wen Zhou <wenzhou@redhat.com>
156d904
to
25374d6
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.
LGTM
good to have another eyes on this @grdryn maybe ?
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Description
This commit introduces some enhancement to what and how components are
reporting theirs status by:
Ready
top-level condition which summarizes more detailedconditions
ProvisioningSucceeded
condition that reports anyprovisioning error, i.e. a deployment fails to be provisioned because
of any invalid fields, some pre-requisites are not met
Note
in the case we want a condition to be set to
False
, but that should not affect the top level condition, it is possible to set theseverity
field asInfo
(the default isError
and it is being represented by an empty value):If needed, additional conditions can be added by individual component or
services:
To help managing conditions, a
conditions.Manager
type has beeninrtoduced, largely inspired by Knative's conditions set code [1], but
improved to handle our specific use cases.
[1] https://github.com/knative/pkg/blob/main/apis/condition_set.go
https://issues.redhat.com/browse/RHOAIENG-18216
How Has This Been Tested?
Screenshot or short clip
Merge criteria