Skip to content

Commit

Permalink
chore: fixed wrong logging
Browse files Browse the repository at this point in the history
  • Loading branch information
matteogastaldello committed Feb 12, 2025
1 parent 167e2d1 commit c13b7e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (c *Controller) handleErr(err error, obj event.Event) {

if retries := c.queue.NumRequeues(obj); retries < maxRetries {
c.logger.WithValues("retries", retries).
WithValues("obj", fmt.Sprintf("%v", obj)).
WithValues("obj", fmt.Sprintf("%v", obj.EventType)).

Check warning on line 50 in pkg/controller/worker.go

View check run for this annotation

Codecov / codecov/patch

pkg/controller/worker.go#L50

Added line #L50 was not covered by tests
Debug("processing event, retrying", "error", err)

dig := event.DigestForEvent(obj)
Expand All @@ -71,7 +71,7 @@ func (c *Controller) processItem(ctx context.Context, obj interface{}) error {

el, err := c.fetch(ctx, evt.ObjectRef, false)
if err != nil {
c.logger.Debug("Resolving unstructured object", "error", evt.ObjectRef.String())
// if the object is not found, we will not retry to process it and we not throw an error

Check warning on line 74 in pkg/controller/worker.go

View check run for this annotation

Codecov / codecov/patch

pkg/controller/worker.go#L74

Added line #L74 was not covered by tests
return nil
}

Expand Down

0 comments on commit c13b7e5

Please sign in to comment.