Closed nasark closed 7 months ago
Backported to quinteros
in commit 0b59f6762f7fc60d648ec23c83bacfbbb1bbb765.
commit 0b59f6762f7fc60d648ec23c83bacfbbb1bbb765
Author: Brandon Dunne <brandondunne@hotmail.com>
Date: Tue Jan 30 16:32:25 2024 -0500
Merge pull request #1044 from nasark/findcatalogsource_error_handling
Error handling for FindCatalogSourceByName
(cherry picked from commit 0d1c69b871f5deb3b7a2038a06f30d7b1fffb426)
The
FindCatalogSourceByName
was returning an empty catalog source object if the catalog source was not found instead of returningnil
i.e. (from debug logging)This was nullifying the openshift checks we have in place for deploying the strimzi operator https://github.com/ManageIQ/manageiq-pods/blob/master/manageiq-operator/internal/controller/manageiq_controller.go#L529
In addition it was found that the following error is thrown if performing a
client.Get()
call on a resource for which the CRDs are not installed (instead of throwing errors.IsNotFound()):This occurs when using plain k8s as the openshift CRDs (operators.coreos.com) are not installed
@miq-bot add_labels bug, quinteros/yes? @miq-bot assign @bdunne @miq-bot add_reviewer @Fryguy
Ref: https://github.com/ManageIQ/manageiq-pods/issues/1043