Skip to content

Commit

Permalink
Merge pull request #169 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 761be47 + 8e7f0b2 commit 7b25075
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion controllers/barbicanapi_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,8 @@ func (r *BarbicanAPIReconciler) findObjectsForSrc(ctx context.Context, src clien
}
err := r.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/barbicankeystonelistener_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ func (r *BarbicanKeystoneListenerReconciler) findObjectsForSrc(ctx context.Conte
}
err := r.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/barbicanworker_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@ func (r *BarbicanWorkerReconciler) findObjectsForSrc(ctx context.Context, src cl
}
err := r.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 7b25075

Please sign in to comment.