opendatahub-io / opendatahub-operator

Open Data Hub operator to manage ODH component integrations
https://opendatahub.io
Apache License 2.0
59 stars 127 forks source link

Fix: Return if DSC already exists #1116

Closed VaishnaviHire closed 1 month ago

VaishnaviHire commented 1 month ago

Description

Jira Issue: https://issues.redhat.com/browse/RHOAIENG-9753

Root Cause: Commit introduced a change that failed to identify already existing DSC in Managed clusters.

This change fixes above issue and has been tested on Managed cluster

Operator Error

{"level":"error","ts":"2024-07-11T21:42:46Z","logger":"setup","msg":"unable to create default DSC CR by the operator","error":"failed to create DataScienceCluster custom resource: context deadline exceeded","stacktrace":"main.main.func2\n\t/workspace/main.go:245\nsigs.k8s.io/controller-runtime/pkg/manager.RunnableFunc.Start\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.6/pkg/manager/manager.go:336\nsigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.6/pkg/manager/runnable_group.go:219"}
{"level":"info","ts":"2024-07-11T21:42:46Z","msg":"Stopping and waiting for non leader election runnables"}
{"level":"info","ts":"2024-07-11T21:42:46Z","msg":"Stopping and waiting for leader election runnables"}

How Has This Been Tested?

Screenshot or short clip

Merge criteria

zdtsw commented 1 month ago

i am fine with this fix to unbock , but we need to be careful, since it is not called by anything else it is safe to call here. but caller should handle this "err"

openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zdtsw

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: - ~~[OWNERS](https://github.com/opendatahub-io/opendatahub-operator/blob/incubation/OWNERS)~~ [zdtsw] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment