Skip to content

Commit

Permalink
Merge pull request #480 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 14, 2024
2 parents 3857fa5 + ba42633 commit 449cdbc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion controllers/ironicapi_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,8 @@ func (r *IronicAPIReconciler) 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
3 changes: 2 additions & 1 deletion controllers/ironicconductor_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ func (r *IronicConductorReconciler) findObjectsForSrc(ctx context.Context, src c
}
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/ironicinspector_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,8 @@ func (r *IronicInspectorReconciler) findObjectsForSrc(ctx context.Context, src c
}
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/ironicneutronagent_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ func (r *IronicNeutronAgentReconciler) findObjectsForSrc(ctx context.Context, sr
}
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 449cdbc

Please sign in to comment.