Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Fix SyncReconciler passing reflect.Type as key to logger
Browse files Browse the repository at this point in the history
* This causes logging implementations such as Zap to panic.

Signed-off-by: Gabriele Cipriano <gcipriano@vmware.com>
  • Loading branch information
Samze authored and gabrielecipriano committed Feb 1, 2021
1 parent aa9f43e commit dd40123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reconcilers/reconcilers.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func (r *SyncReconciler) validate(ctx context.Context) error {
func (r *SyncReconciler) Reconcile(ctx context.Context, parent client.Object) (ctrl.Result, error) {
result, err := r.sync(ctx, parent)
if err != nil {
r.Log.Error(err, "unable to sync", reflect.TypeOf(parent), parent)
r.Log.Error(err, "unable to sync", typeName(parent), parent)
return ctrl.Result{}, err
}

Expand Down

0 comments on commit dd40123

Please sign in to comment.