Skip to content

Commit 64e0841

Browse files
Merge pull request #2589 from rzetelskik/fix-observer-nonretriable
Forget keys on nonretriable errors in observer
2 parents 62f1799 + 02f496f commit 64e0841

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/controllertools/observer.go

+2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ func (o *Observer) processNextItem(ctx context.Context) bool {
110110
default:
111111
if IsNonRetriable(err) {
112112
klog.InfoS("Hit non-retriable error. Dropping the item from the queue.", "Error", err)
113+
o.queue.Forget(key)
114+
return true
113115
}
114116
utilruntime.HandleError(fmt.Errorf("sync loop has failed: %w", err))
115117
}

0 commit comments

Comments
 (0)