Merge pull request #124389 from holgerson97/master

Refactoring: improved logging for errors
This commit is contained in:
Kubernetes Prow Robot 2024-10-23 01:17:51 +01:00 committed by GitHub
commit 35b4695e5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,6 +21,7 @@ import (
"sync" "sync"
"k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/util/wait"
"k8s.io/klog/v2"
) )
type merger interface { type merger interface {
@ -75,6 +76,8 @@ func (m *mux) ChannelWithContext(ctx context.Context, source string) chan interf
func (m *mux) listen(source string, listenChannel <-chan interface{}) { func (m *mux) listen(source string, listenChannel <-chan interface{}) {
for update := range listenChannel { for update := range listenChannel {
m.merger.Merge(source, update) if err := m.merger.Merge(source, update); err != nil {
klog.InfoS("failed merging update", "err", err)
}
} }
} }