Skip to content

Commit 998ac19

Browse files
Merge pull request #632 from stuggi/improve_index
Make sure to log error in findObjectsForSrc()
2 parents 90de66c + d5dd362 commit 998ac19

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

controllers/glance_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ func (r *GlanceReconciler) findObjectsForSrc(ctx context.Context, src client.Obj
279279
}
280280
err := r.List(ctx, crList, listOps)
281281
if err != nil {
282-
return []reconcile.Request{}
282+
l.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace()))
283+
return requests
283284
}
284285

285286
for _, item := range crList.Items {

controllers/glanceapi_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,8 @@ func (r *GlanceAPIReconciler) findObjectsForSrc(ctx context.Context, src client.
365365
}
366366
err := r.List(ctx, crList, listOps)
367367
if err != nil {
368-
return []reconcile.Request{}
368+
l.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace()))
369+
return requests
369370
}
370371

371372
for _, item := range crList.Items {

0 commit comments

Comments
 (0)