From 2df3d52c5f3c4baedddc9ca4406f9173a8164552 Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Wed, 31 May 2023 13:09:39 +0000 Subject: [PATCH] upgrade to latest dependencies bumping knative.dev/hack 5812c57...5b7907f:%0A > 5b7907f Update actions (# 289)%0A > c133d5d Install Istio for tests (# 291)%0Abumping knative.dev/pkg ec20442...5671699:%0A > 5671699 drop the dynamic type (# 2750)%0A > 9bda38b Fix some webhook testing tech debt (# 2751) Signed-off-by: Knative Automation --- go.mod | 4 +-- go.sum | 8 ++--- vendor/knative.dev/pkg/injection/clients.go | 19 ---------- vendor/knative.dev/pkg/injection/informers.go | 35 ------------------- vendor/knative.dev/pkg/injection/interface.go | 29 --------------- vendor/modules.txt | 4 +-- 6 files changed, 8 insertions(+), 91 deletions(-) diff --git a/go.mod b/go.mod index 273f77b92..d7ffbf317 100644 --- a/go.mod +++ b/go.mod @@ -11,8 +11,8 @@ require ( k8s.io/client-go v0.26.5 k8s.io/code-generator v0.26.5 k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 - knative.dev/hack v0.0.0-20230524013611-5812c57cc1ac - knative.dev/pkg v0.0.0-20230524013411-ec20442c6ead + knative.dev/hack v0.0.0-20230530201435-5b7907fbe350 + knative.dev/pkg v0.0.0-20230531073936-5671699f23d9 ) require ( diff --git a/go.sum b/go.sum index 45db0d1af..54ef2c748 100644 --- a/go.sum +++ b/go.sum @@ -806,10 +806,10 @@ k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+O k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8= k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/hack v0.0.0-20230524013611-5812c57cc1ac h1:XQrhtfWPsyuxwSxv4GhcFnqZh75Nq+L1iZWhFMz4aPg= -knative.dev/hack v0.0.0-20230524013611-5812c57cc1ac/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= -knative.dev/pkg v0.0.0-20230524013411-ec20442c6ead h1:dcBDhkP6hd9VaV9nLukg75bIrvJs4YiSVOv0h2evOFc= -knative.dev/pkg v0.0.0-20230524013411-ec20442c6ead/go.mod h1:dqC6IrvyBE7E+oZocs5PkVhq1G59pDTA7r8U17EAKMk= +knative.dev/hack v0.0.0-20230530201435-5b7907fbe350 h1:lSV9uFTohrQd7i5OUhLnR87PwUHJplQKJSEiZgzP/VY= +knative.dev/hack v0.0.0-20230530201435-5b7907fbe350/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= +knative.dev/pkg v0.0.0-20230531073936-5671699f23d9 h1:xd7E2nuQ358cXR4jB7Y5+FH88Mm+SQTZty5pXa1TSfs= +knative.dev/pkg v0.0.0-20230531073936-5671699f23d9/go.mod h1:dqC6IrvyBE7E+oZocs5PkVhq1G59pDTA7r8U17EAKMk= 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= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/vendor/knative.dev/pkg/injection/clients.go b/vendor/knative.dev/pkg/injection/clients.go index 92e991218..b71ef1d94 100644 --- a/vendor/knative.dev/pkg/injection/clients.go +++ b/vendor/knative.dev/pkg/injection/clients.go @@ -62,22 +62,3 @@ func (i *impl) FetchAllClients(ctx context.Context) []interface{} { } return clients } - -// DynamicClientInjector holds the type of a callback that attaches a particular -// client type to a context. -type DynamicClientInjector func(context.Context) context.Context - -func (i *impl) RegisterDynamicClient(ci DynamicClientInjector) { - i.m.Lock() - defer i.m.Unlock() - - i.dynamicClients = append(i.dynamicClients, ci) -} - -func (i *impl) GetDynamicClients() []DynamicClientInjector { - i.m.RLock() - defer i.m.RUnlock() - - // Copy the slice before returning. - return append(i.dynamicClients[:0:0], i.dynamicClients...) -} diff --git a/vendor/knative.dev/pkg/injection/informers.go b/vendor/knative.dev/pkg/injection/informers.go index ce5d481e8..9356f8d7f 100644 --- a/vendor/knative.dev/pkg/injection/informers.go +++ b/vendor/knative.dev/pkg/injection/informers.go @@ -28,10 +28,6 @@ import ( // informer type to a context. type InformerInjector func(context.Context) (context.Context, controller.Informer) -// DynamicInformerInjector holds the type of a callback that attaches a particular -// informer type (backed by a Dynamic) to a context. -type DynamicInformerInjector func(context.Context) context.Context - // FilteredInformersInjector holds the type of a callback that attaches a set of particular // filtered informers type to a context. type FilteredInformersInjector func(context.Context) (context.Context, []controller.Informer) @@ -43,13 +39,6 @@ func (i *impl) RegisterInformer(ii InformerInjector) { i.informers = append(i.informers, ii) } -func (i *impl) RegisterDynamicInformer(ii DynamicInformerInjector) { - i.m.Lock() - defer i.m.Unlock() - - i.dynamicInformers = append(i.dynamicInformers, ii) -} - func (i *impl) RegisterFilteredInformers(fii FilteredInformersInjector) { i.m.Lock() defer i.m.Unlock() @@ -65,14 +54,6 @@ func (i *impl) GetInformers() []InformerInjector { return append(i.informers[:0:0], i.informers...) } -func (i *impl) GetDynamicInformers() []DynamicInformerInjector { - i.m.RLock() - defer i.m.RUnlock() - - // Copy the slice before returning. - return append(i.dynamicInformers[:0:0], i.dynamicInformers...) -} - func (i *impl) GetFilteredInformers() []FilteredInformersInjector { i.m.RLock() defer i.m.RUnlock() @@ -81,22 +62,6 @@ func (i *impl) GetFilteredInformers() []FilteredInformersInjector { return append(i.filteredInformers[:0:0], i.filteredInformers...) } -func (i *impl) SetupDynamic(ctx context.Context) context.Context { - // Based on the reconcilers we have linked, build up a set of clients and inject - // them onto the context. - for _, ci := range i.GetDynamicClients() { - ctx = ci(ctx) - } - - // Based on the reconcilers we have linked, build up a set of informers - // and inject them onto the context. - for _, ii := range i.GetDynamicInformers() { - ctx = ii(ctx) - } - - return ctx -} - func (i *impl) SetupInformers(ctx context.Context, cfg *rest.Config) (context.Context, []controller.Informer) { // Based on the reconcilers we have linked, build up a set of clients and inject // them onto the context. diff --git a/vendor/knative.dev/pkg/injection/interface.go b/vendor/knative.dev/pkg/injection/interface.go index 158864015..c6d5715ad 100644 --- a/vendor/knative.dev/pkg/injection/interface.go +++ b/vendor/knative.dev/pkg/injection/interface.go @@ -78,29 +78,6 @@ type Interface interface { SetupInformers(context.Context, *rest.Config) (context.Context, []controller.Informer) } -// DynamicInterface is the interface for interacting with dynamicclient-based injection -// implementations, such as Dynamic below. -type DynamicInterface interface { - // RegisterDynamicClient registers a new injector callback for associating - // a new dynamicclient-based client with a context. - RegisterDynamicClient(DynamicClientInjector) - - // GetDynamicClients fetches all of the registered dynamicclient-based client injectors. - GetDynamicClients() []DynamicClientInjector - - // RegisterDynamicInformer registers a new injector callback for associating - // a new dynamicclient-based informer with a context. - RegisterDynamicInformer(DynamicInformerInjector) - - // GetDynamicInformers fetches all of the registered dynamicclient-based informer injectors. - GetDynamicInformers() []DynamicInformerInjector - - // SetupDynamic runs all of the injectors against a context, starting with - // the clients and the given stream. A context infused with the various elements - // is returned. - SetupDynamic(context.Context) context.Context -} - type ControllerConstructor func(context.Context, configmap.Watcher) *controller.Impl // NamedControllerConstructor is a ControllerConstructor with an associated name. @@ -120,10 +97,6 @@ var ( // are being run for real. Default Interface = &impl{} - // Dynamic is the injection interface to use when bootstrapping a version - // of things based on the prototype dynamicclient-based reconciler framework. - Dynamic DynamicInterface = &impl{} - // Fake is the injection interface with which informers should register // to make themselves available to the controller process when it is being // unit tested. @@ -134,11 +107,9 @@ type impl struct { m sync.RWMutex clients []ClientInjector - dynamicClients []DynamicClientInjector clientFetchers []ClientFetcher factories []InformerFactoryInjector informers []InformerInjector - dynamicInformers []DynamicInformerInjector filteredInformers []FilteredInformersInjector ducks []DuckFactoryInjector } diff --git a/vendor/modules.txt b/vendor/modules.txt index c096043fc..8a47fdd4e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -682,10 +682,10 @@ k8s.io/utils/internal/third_party/forked/golang/net k8s.io/utils/net k8s.io/utils/strings/slices k8s.io/utils/trace -# knative.dev/hack v0.0.0-20230524013611-5812c57cc1ac +# knative.dev/hack v0.0.0-20230530201435-5b7907fbe350 ## explicit; go 1.18 knative.dev/hack -# knative.dev/pkg v0.0.0-20230524013411-ec20442c6ead +# knative.dev/pkg v0.0.0-20230531073936-5671699f23d9 ## explicit; go 1.18 knative.dev/pkg/apis knative.dev/pkg/apis/duck