Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove retry for sinks of ruler #125

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions pkg/ruler/kube_events_ruler.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,15 +292,6 @@ func (r *KubeEventsRuler) sinkNotifications(ctx context.Context) {
var err error
defer func() {
for _, n := range notificas {
if err == nil {
r.notificaQueue.Forget(n)
} else if numRequeues := r.notificaQueue.NumRequeues(n); numRequeues >= maxRetries {
r.notificaQueue.Forget(n)
klog.Infof("Dropping notification of event %s/%s out of the queue because of failing %d times: %v\n",
n.Event.Namespace, n.Event.Name, numRequeues, err)
} else {
r.notificaQueue.AddRateLimited(n)
}
r.notificaQueue.Done(n)
}
}()
Expand All @@ -312,7 +303,6 @@ func (r *KubeEventsRuler) sinkNotifications(ctx context.Context) {
if err = sinker.SinkNotifications(ctx, notificas); err != nil {
err = fmt.Errorf("error sinking notifications: %v", err)
klog.Error(err)
return
}
}
}()
Expand All @@ -338,15 +328,6 @@ func (r *KubeEventsRuler) sinkAlerts(ctx context.Context) {
var err error
defer func() {
for _, a := range alerts {
if err == nil {
r.alertQueue.Forget(a)
} else if numRequeues := r.alertQueue.NumRequeues(a); numRequeues >= maxRetries {
r.alertQueue.Forget(a)
klog.Infof("Dropping alert with labels %v out of the queue because of failing %d times: %v\n",
a.Alert.Labels, numRequeues, err)
} else {
r.alertQueue.AddRateLimited(a)
}
r.alertQueue.Done(a)
}
}()
Expand All @@ -358,7 +339,6 @@ func (r *KubeEventsRuler) sinkAlerts(ctx context.Context) {
if err = sinker.SinkAlerts(ctx, alerts); err != nil {
err = fmt.Errorf("error sinking alerts: %v", err)
klog.Error(err)
return
}
}
}()
Expand Down