Skip to content

Commit

Permalink
Merge pull request #389 from stuggi/improve_index
Browse files Browse the repository at this point in the history
Make sure to log error in findObjectsForSrc()
  • Loading branch information
openshift-merge-bot[bot] authored Oct 10, 2024
2 parents 5f3da94 + d489bf6 commit baec96a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion controllers/amphoracontroller_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,8 @@ func (r *OctaviaAmphoraControllerReconciler) findObjectsForSrc(ctx context.Conte
}
err := r.Client.List(ctx, crList, listOps)
if err != nil {
return []reconcile.Request{}
l.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace()))
return requests
}

for _, item := range crList.Items {
Expand Down
3 changes: 2 additions & 1 deletion controllers/octaviaapi_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ func (r *OctaviaAPIReconciler) findObjectsForSrc(ctx context.Context, src client
}
err := r.Client.List(ctx, crList, listOps)
if err != nil {
return []reconcile.Request{}
l.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace()))
return requests
}

for _, item := range crList.Items {
Expand Down

0 comments on commit baec96a

Please sign in to comment.