diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index c042e032..d663e1c8 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -352,7 +352,7 @@ }, { "ImportPath": "k8s.io/apimachinery", - "Rev": "954b62493c18" + "Rev": "656274101191" }, { "ImportPath": "k8s.io/gengo", diff --git a/go.mod b/go.mod index 0e790153..4b01f42d 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,7 @@ require ( golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 google.golang.org/appengine v1.5.0 // indirect k8s.io/api v0.0.0-20200124032216-924612ff3bca - k8s.io/apimachinery v0.0.0-20200124032037-954b62493c18 + k8s.io/apimachinery v0.0.0-20200125072041-656274101191 k8s.io/klog v1.0.0 k8s.io/utils v0.0.0-20191217005138-9e5e9d854fcc sigs.k8s.io/yaml v1.1.0 @@ -39,5 +39,5 @@ replace ( golang.org/x/sys => golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // pinned to release-branch.go1.13 golang.org/x/tools => golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7 // pinned to release-branch.go1.13 k8s.io/api => k8s.io/api v0.0.0-20200124032216-924612ff3bca - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20200124032037-954b62493c18 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20200125072041-656274101191 ) diff --git a/go.sum b/go.sum index 24e42e35..4d091945 100644 --- a/go.sum +++ b/go.sum @@ -189,7 +189,7 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= k8s.io/api v0.0.0-20200124032216-924612ff3bca/go.mod h1:WYGNSV/2aSDAMvHS6cmemi/htNIV58hkcMDRVUi/6tw= -k8s.io/apimachinery v0.0.0-20200124032037-954b62493c18/go.mod h1:OAtNFcsmF2+2JlejTQ9O5Qu7PHEA9GlSn28VjH8ssNs= +k8s.io/apimachinery v0.0.0-20200125072041-656274101191/go.mod h1:OAtNFcsmF2+2JlejTQ9O5Qu7PHEA9GlSn28VjH8ssNs= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= diff --git a/tools/cache/shared_informer.go b/tools/cache/shared_informer.go index f7dc1345..6aefd56c 100644 --- a/tools/cache/shared_informer.go +++ b/tools/cache/shared_informer.go @@ -25,7 +25,6 @@ import ( "k8s.io/apimachinery/pkg/util/clock" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/util/retry" "k8s.io/utils/buffer" "k8s.io/klog" @@ -700,34 +699,26 @@ func (p *processorListener) pop() { func (p *processorListener) run() { // this call blocks until the channel is closed. When a panic happens during the notification - // we will catch it, **the offending item will be skipped!**, and after a short delay (one minute) + // we will catch it, **the offending item will be skipped!**, and after a short delay (one second) // the next notification will be attempted. This is usually better than the alternative of never // delivering again. stopCh := make(chan struct{}) wait.Until(func() { - // this gives us a few quick retries before a long pause and then a few more quick retries - err := wait.ExponentialBackoff(retry.DefaultRetry, func() (bool, error) { - for next := range p.nextCh { - switch notification := next.(type) { - case updateNotification: - p.handler.OnUpdate(notification.oldObj, notification.newObj) - case addNotification: - p.handler.OnAdd(notification.newObj) - case deleteNotification: - p.handler.OnDelete(notification.oldObj) - default: - utilruntime.HandleError(fmt.Errorf("unrecognized notification: %T", next)) - } + for next := range p.nextCh { + switch notification := next.(type) { + case updateNotification: + p.handler.OnUpdate(notification.oldObj, notification.newObj) + case addNotification: + p.handler.OnAdd(notification.newObj) + case deleteNotification: + p.handler.OnDelete(notification.oldObj) + default: + utilruntime.HandleError(fmt.Errorf("unrecognized notification: %T", next)) } - // the only way to get here is if the p.nextCh is empty and closed - return true, nil - }) - - // the only way to get here is if the p.nextCh is empty and closed - if err == nil { - close(stopCh) } - }, 1*time.Minute, stopCh) + // the only way to get here is if the p.nextCh is empty and closed + close(stopCh) + }, 1*time.Second, stopCh) } // shouldResync deterimines if the listener needs a resync. If the listener's resyncPeriod is 0,