Skip to content

Commit caee386

Browse files
Merge pull request #231 from stuggi/improve_index
Make sure to log error in findObjectsForSrc()
2 parents 62d1cd5 + 1882cf2 commit caee386

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

controllers/designateapi_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,8 @@ func (r *DesignateAPIReconciler) findObjectsForSrc(ctx context.Context, src clie
367367
}
368368
err := r.Client.List(context.TODO(), crList, listOps)
369369
if err != nil {
370-
return []reconcile.Request{}
370+
l.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace()))
371+
return requests
371372
}
372373

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

controllers/designatecentral_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ func (r *DesignateCentralReconciler) findObjectsForSrc(ctx context.Context, src
322322
}
323323
err := r.Client.List(context.TODO(), crList, listOps)
324324
if err != nil {
325-
return []reconcile.Request{}
325+
l.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace()))
326+
return requests
326327
}
327328

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

controllers/designatemdns_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ func (r *DesignateMdnsReconciler) findObjectsForSrc(ctx context.Context, src cli
321321
}
322322
err := r.Client.List(context.TODO(), crList, listOps)
323323
if err != nil {
324-
return []reconcile.Request{}
324+
l.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace()))
325+
return requests
325326
}
326327

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

controllers/designateproducer_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ func (r *DesignateProducerReconciler) findObjectsForSrc(ctx context.Context, src
321321
}
322322
err := r.Client.List(context.TODO(), crList, listOps)
323323
if err != nil {
324-
return []reconcile.Request{}
324+
l.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace()))
325+
return requests
325326
}
326327

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

controllers/designateworker_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ func (r *DesignateWorkerReconciler) findObjectsForSrc(ctx context.Context, src c
321321
}
322322
err := r.Client.List(context.TODO(), crList, listOps)
323323
if err != nil {
324-
return []reconcile.Request{}
324+
l.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace()))
325+
return requests
325326
}
326327

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

0 commit comments

Comments
 (0)