Skip to content

Commit

Permalink
Merge pull request #632 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 90de66c + d5dd362 commit 998ac19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion controllers/glance_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ func (r *GlanceReconciler) findObjectsForSrc(ctx context.Context, src client.Obj
}
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/glanceapi_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@ func (r *GlanceAPIReconciler) findObjectsForSrc(ctx context.Context, src client.
}
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 998ac19

Please sign in to comment.