Skip to content

Commit

Permalink
improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgb committed Dec 8, 2023
1 parent 902384a commit 29d0dbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/propagate.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func (r *PropagateController) propagateUpdate(ctx context.Context, obj, parent *
return err
}
if err := r.Status().Patch(ctx, clone, applyPatch{encodedPatch}, fieldOwner, client.ForceOwnership); err != nil {
return fmt.Errorf("failed to update: %w", err)
return fmt.Errorf("failed to apply %s/%s: %w", clone.GetNamespace(), clone.GetName(), err)
}
logger.Info("updated", "from", parent.GetNamespace())
return nil
Expand All @@ -295,9 +295,9 @@ func (r *PropagateController) propagateUpdate(ctx context.Context, obj, parent *
return err
}
if err := r.Status().Patch(ctx, clone, applyPatch{encodedPatch}, fieldOwner, client.ForceOwnership); err != nil {
return fmt.Errorf("failed to update: %w", err)
return fmt.Errorf("failed to apply %s/%s: %w", clone.GetNamespace(), clone.GetName(), err)
}
logger.Info("updated a child resource", "subnamespace", child.Name)
logger.Info("applied a child resource", "subnamespace", child.Name)
}

return nil
Expand Down

0 comments on commit 29d0dbf

Please sign in to comment.