mirror of https://github.com/knative/caching.git
upgrade to latest dependencies (#432)
bumping knative.dev/hack 8368e1f...f99a255: > f99a255 Schema tool for reflective schema generation. (# 51) bumping knative.dev/pkg 8fbab7e...737401c: > 737401c upgrade to latest dependencies (# 2047) > 7f753ea Slash off 5s from TestAdmissionValidResponseForResource (# 2046) > 1002883 Add kn-plugin-admin to downstream tests (# 1983) > 04fdbd7 Add WaitForCacheSyncQuick and use it in tests (# 2045) Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
parent
5ce2f83e58
commit
49fcc5f83e
4
go.mod
4
go.mod
|
@ -17,6 +17,6 @@ require (
|
|||
k8s.io/client-go v0.19.7
|
||||
k8s.io/code-generator v0.19.7
|
||||
k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6
|
||||
knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf
|
||||
knative.dev/pkg v0.0.0-20210303192215-8fbab7ebb77b
|
||||
knative.dev/hack v0.0.0-20210305150220-f99a25560134
|
||||
knative.dev/pkg v0.0.0-20210308052421-737401c38b22
|
||||
)
|
||||
|
|
8
go.sum
8
go.sum
|
@ -1186,10 +1186,10 @@ k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL
|
|||
k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o=
|
||||
k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg=
|
||||
k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf h1:u4cY4jr2LYvhoz/1HBWEPsMiLkm0HMdDTfmmw1RE8zE=
|
||||
knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
|
||||
knative.dev/pkg v0.0.0-20210303192215-8fbab7ebb77b h1:AynUh7MBUe44E60vh0vIyF2Bes4AOoTT2ejy9xrF0FU=
|
||||
knative.dev/pkg v0.0.0-20210303192215-8fbab7ebb77b/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
|
||||
knative.dev/hack v0.0.0-20210305150220-f99a25560134 h1:lUllAp28TkevQIgWrsjow8ZLnXJy3AraRzGFm/ffD2c=
|
||||
knative.dev/hack v0.0.0-20210305150220-f99a25560134/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
|
||||
knative.dev/pkg v0.0.0-20210308052421-737401c38b22 h1:f3IFaya7jysL+2oUJkPADTUhUn12R8AY3n6kWsgzp4w=
|
||||
knative.dev/pkg v0.0.0-20210308052421-737401c38b22/go.mod h1:fP690UCcs5x+qQVhjJxNcm97OWIiUdFC1dqbD3Gsp64=
|
||||
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# knative.dev/hack
|
||||
|
||||
`hack` is a collection of scripts used to bootstrap CI processes and other vital
|
||||
entrypoint functionallity.
|
||||
entrypoint functionality.
|
||||
|
||||
## Using the `presubmit-tests.sh` helper script
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ import (
|
|||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/util/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/client-go/tools/record"
|
||||
"k8s.io/client-go/util/workqueue"
|
||||
|
@ -692,13 +693,29 @@ func RunInformers(stopCh <-chan struct{}, informers ...Informer) (func(), error)
|
|||
}
|
||||
|
||||
for i, informer := range informers {
|
||||
if ok := cache.WaitForCacheSync(stopCh, informer.HasSynced); !ok {
|
||||
if ok := WaitForCacheSyncQuick(stopCh, informer.HasSynced); !ok {
|
||||
return wg.Wait, fmt.Errorf("failed to wait for cache at index %d to sync", i)
|
||||
}
|
||||
}
|
||||
return wg.Wait, nil
|
||||
}
|
||||
|
||||
// WaitForCacheSyncQuick is the same as cache.WaitForCacheSync but with a much reduced
|
||||
// check-rate for the sync period.
|
||||
func WaitForCacheSyncQuick(stopCh <-chan struct{}, cacheSyncs ...cache.InformerSynced) bool {
|
||||
err := wait.PollImmediateUntil(time.Millisecond,
|
||||
func() (bool, error) {
|
||||
for _, syncFunc := range cacheSyncs {
|
||||
if !syncFunc() {
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
return true, nil
|
||||
},
|
||||
stopCh)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// StartAll kicks off all of the passed controllers with DefaultThreadsPerController.
|
||||
func StartAll(ctx context.Context, controllers ...*Impl) {
|
||||
wg := sync.WaitGroup{}
|
||||
|
|
|
@ -655,10 +655,10 @@ k8s.io/kube-openapi/pkg/util/sets
|
|||
k8s.io/utils/buffer
|
||||
k8s.io/utils/integer
|
||||
k8s.io/utils/trace
|
||||
# knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf
|
||||
# knative.dev/hack v0.0.0-20210305150220-f99a25560134
|
||||
## explicit
|
||||
knative.dev/hack
|
||||
# knative.dev/pkg v0.0.0-20210303192215-8fbab7ebb77b
|
||||
# knative.dev/pkg v0.0.0-20210308052421-737401c38b22
|
||||
## explicit
|
||||
knative.dev/pkg/apis
|
||||
knative.dev/pkg/apis/duck
|
||||
|
|
Loading…
Reference in New Issue