From 229ae0dba2706893b13b75b4d12f1cddb4b56f20 Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Fri, 29 Mar 2024 01:42:42 +0000 Subject: [PATCH] upgrade to latest dependencies bumping knative.dev/pkg b8b7ca1...5fe2303: > 5fe2303 drop vendor licenses (# 3001) > f69f148 Optionally generate an init func for an informer (# 2989) bumping knative.dev/eventing e581d36...7e1c082: > 7e1c082 [main] Format Go code (# 7819) bumping knative.dev/serving e779e28...e8a04ac: > e8a04ac Update net-contour nightly (# 15059) > e47ffe3 drop vendor licenses (# 15050) > ac4f3a8 Update net-kourier nightly (# 15058) > 0646e25 Update net-gateway-api nightly (# 15057) > b9a1a81 Update net-istio nightly (# 15055) Signed-off-by: Knative Automation --- go.mod | 6 +++--- go.sum | 12 ++++++------ .../pkg/codegen/cmd/injection-gen/args/args.go | 3 +++ .../codegen/cmd/injection-gen/generators/informer.go | 6 +++++- .../codegen/cmd/injection-gen/generators/packages.go | 1 + vendor/modules.txt | 6 +++--- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index c765f66de..bba1298c2 100644 --- a/go.mod +++ b/go.mod @@ -14,10 +14,10 @@ require ( k8s.io/api v0.29.2 k8s.io/apimachinery v0.29.2 k8s.io/client-go v0.29.2 - knative.dev/eventing v0.40.1-0.20240327210418-e581d36f9f2a + knative.dev/eventing v0.40.1-0.20240328132724-7e1c08246ca3 knative.dev/hack v0.0.0-20240327150553-47368d631660 - knative.dev/pkg v0.0.0-20240327172111-b8b7ca1f7904 - knative.dev/serving v0.40.1-0.20240328120758-e779e28bbee1 + knative.dev/pkg v0.0.0-20240328165227-5fe230325f5a + knative.dev/serving v0.40.1-0.20240328170111-e8a04ac38af0 ) require ( diff --git a/go.sum b/go.sum index 37fbeaea1..d6b4ff24f 100644 --- a/go.sum +++ b/go.sum @@ -724,16 +724,16 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/eventing v0.40.1-0.20240327210418-e581d36f9f2a h1:IcopvDTfpZ57wgJnWKvaLl1ob4E9xi49Azc5yhSwUTk= -knative.dev/eventing v0.40.1-0.20240327210418-e581d36f9f2a/go.mod h1:19sfPiy4dK2jBIHgszOTk43qOvfCXz1GTIncRY3trB8= +knative.dev/eventing v0.40.1-0.20240328132724-7e1c08246ca3 h1:+5XTIq9iJgk1Br0Ex5nEJBhy9wGMVaFY6HzW0/E0mrU= +knative.dev/eventing v0.40.1-0.20240328132724-7e1c08246ca3/go.mod h1:19sfPiy4dK2jBIHgszOTk43qOvfCXz1GTIncRY3trB8= knative.dev/hack v0.0.0-20240327150553-47368d631660 h1:tW6NgyjMnSXBS75+k+Xh5uNiLhJ9TFswS9hrkC3OQOc= knative.dev/hack v0.0.0-20240327150553-47368d631660/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= knative.dev/networking v0.0.0-20240327140628-ae039896b125 h1:w9XY50H8EmPj0C3QGeScCcCqt8Y3vjPEujf/LeH7RLY= knative.dev/networking v0.0.0-20240327140628-ae039896b125/go.mod h1:YlLpTHRi0i/5XVD3QoqEfFhSmAfRj9sZR2NQEOF9dVc= -knative.dev/pkg v0.0.0-20240327172111-b8b7ca1f7904 h1:AT4AIwO3p1qZtmEzW5tWPftrUxts8Tlpra7EjNS/2PY= -knative.dev/pkg v0.0.0-20240327172111-b8b7ca1f7904/go.mod h1:LgcT4KPEcw24alWzzkFAN2acHq38au8NZqybU16TStI= -knative.dev/serving v0.40.1-0.20240328120758-e779e28bbee1 h1:IB/nBSRuX69rSlfHk5HtDJsQ+/+EkWyNjoKLGeMVrp8= -knative.dev/serving v0.40.1-0.20240328120758-e779e28bbee1/go.mod h1:emRubGwMhrtkaVc9HK8USf9EAPb6Lo3C+jmtJnbqkpA= +knative.dev/pkg v0.0.0-20240328165227-5fe230325f5a h1:HYKynG9QjRuVxrXEYnSMWBXboyOqHBgoQZt0xe4+RMA= +knative.dev/pkg v0.0.0-20240328165227-5fe230325f5a/go.mod h1:LgcT4KPEcw24alWzzkFAN2acHq38au8NZqybU16TStI= +knative.dev/serving v0.40.1-0.20240328170111-e8a04ac38af0 h1:umfGcTnYRpBEibbw2xSkiPrliBgDbXQRYA7xzZNpHuk= +knative.dev/serving v0.40.1-0.20240328170111-e8a04ac38af0/go.mod h1:emRubGwMhrtkaVc9HK8USf9EAPb6Lo3C+jmtJnbqkpA= 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/codegen/cmd/injection-gen/args/args.go b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/args/args.go index 7cd8122d5..265b4e40a 100644 --- a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/args/args.go +++ b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/args/args.go @@ -30,6 +30,7 @@ type CustomArgs struct { ListersPackage string ForceKinds string ListerHasPointerElem bool + DisableInformerInit bool } // NewDefaults returns default arguments for the generator. @@ -49,6 +50,8 @@ func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) { fs.BoolVar(&ca.ListerHasPointerElem, "lister-has-pointer-elem", false, "") fs.MarkDeprecated("lister-has-pointer-elem", "this flag has no effect") + + fs.BoolVar(&ca.DisableInformerInit, "disable-informer-init", false, "disable generating the init function for the informer") } // Validate checks the given arguments. diff --git a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/informer.go b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/informer.go index c4fb215f1..c0b3bf3ea 100644 --- a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/informer.go +++ b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/informer.go @@ -37,6 +37,7 @@ type injectionGenerator struct { imports namer.ImportTracker typedInformerPackage string groupInformerFactoryPackage string + disableInformerInit bool } var _ generator.Generator = (*injectionGenerator)(nil) @@ -98,6 +99,7 @@ func (g *injectionGenerator) GenerateType(c *generator.Context, t *types.Type, w Package: "context", Name: "WithValue", }), + "disableInformerInit": g.disableInformerInit, } sw.Do(injectionInformer, m) @@ -106,14 +108,16 @@ func (g *injectionGenerator) GenerateType(c *generator.Context, t *types.Type, w } var injectionInformer = ` +{{ if not .disableInformerInit }} func init() { {{.injectionRegisterInformer|raw}}(withInformer) } +{{ end }} // Key is used for associating the Informer inside the context.Context. type Key struct{} -func withInformer(ctx {{.contextContext|raw}}) ({{.contextContext|raw}}, {{.controllerInformer|raw}}) { +{{ if .disableInformerInit }} func WithInformer {{ else }} func withInformer {{ end }} (ctx {{.contextContext|raw}}) ({{.contextContext|raw}}, {{.controllerInformer|raw}}) { f := {{.factoryGet|raw}}(ctx) inf := f.{{.groupGoName}}().{{.versionGoName}}().{{.type|publicPlural}}() return {{ .contextWithValue|raw }}(ctx, Key{}, inf), inf.Informer() diff --git a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/packages.go b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/packages.go index 43768927a..f0ca43f2b 100644 --- a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/packages.go +++ b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/packages.go @@ -412,6 +412,7 @@ func versionInformerPackages(basePackage string, groupPkgName string, gv clientg imports: generator.NewImportTracker(), typedInformerPackage: typedInformerPackage, groupInformerFactoryPackage: factoryPackagePath, + disableInformerInit: customArgs.DisableInformerInit, }) return generators }, diff --git a/vendor/modules.txt b/vendor/modules.txt index 29d455947..cea380529 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -974,7 +974,7 @@ k8s.io/utils/pointer k8s.io/utils/ptr k8s.io/utils/strings/slices k8s.io/utils/trace -# knative.dev/eventing v0.40.1-0.20240327210418-e581d36f9f2a +# knative.dev/eventing v0.40.1-0.20240328132724-7e1c08246ca3 ## explicit; go 1.21 knative.dev/eventing/pkg/adapter/v2 knative.dev/eventing/pkg/adapter/v2/test @@ -1033,7 +1033,7 @@ knative.dev/hack knative.dev/networking/pkg/apis/networking knative.dev/networking/pkg/apis/networking/v1alpha1 knative.dev/networking/pkg/config -# knative.dev/pkg v0.0.0-20240327172111-b8b7ca1f7904 +# knative.dev/pkg v0.0.0-20240328165227-5fe230325f5a ## explicit; go 1.21 knative.dev/pkg/apis knative.dev/pkg/apis/duck @@ -1097,7 +1097,7 @@ knative.dev/pkg/webhook/psbinding knative.dev/pkg/webhook/resourcesemantics knative.dev/pkg/webhook/resourcesemantics/defaulting knative.dev/pkg/webhook/resourcesemantics/validation -# knative.dev/serving v0.40.1-0.20240328120758-e779e28bbee1 +# knative.dev/serving v0.40.1-0.20240328170111-e8a04ac38af0 ## explicit; go 1.21 knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1