Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/eventing e581d36...7e1c082:
  > 7e1c082 [main] Format Go code (# 7819)
bumping knative.dev/pkg b8b7ca1...5fe2303:
  > 5fe2303 drop vendor licenses (# 3001)
  > f69f148 Optionally generate an init func for an informer (# 2989)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation committed Mar 29, 2024
1 parent bf5740a commit 20abbd2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ require (
k8s.io/apimachinery v0.29.2
k8s.io/client-go v0.29.2
k8s.io/code-generator v0.29.2
knative.dev/eventing v0.40.1-0.20240327210418-e581d36f9f2a
knative.dev/eventing v0.40.1-0.20240328132724-7e1c08246ca3
knative.dev/eventing-kafka v0.40.1-0.20240207142533-d23eb248d3ac
knative.dev/eventing-redis v0.40.1-0.20240328131421-e89a50a6b21a
knative.dev/hack v0.0.0-20240327150553-47368d631660
knative.dev/pkg v0.0.0-20240327172111-b8b7ca1f7904
knative.dev/pkg v0.0.0-20240328165227-5fe230325f5a
knative.dev/reconciler-test v0.0.0-20240327131444-6346b918a853
sigs.k8s.io/controller-runtime v0.13.1
)
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -783,16 +783,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/eventing-kafka v0.40.1-0.20240207142533-d23eb248d3ac h1:ZchQuCUvW4Hgn/6I+SRuaPei5JDtUqQ1he44tJ728hA=
knative.dev/eventing-kafka v0.40.1-0.20240207142533-d23eb248d3ac/go.mod h1:qGgNS+zY1A3xKqJFZ3KIWeWKZHIewBS1XmpRvTNQRJA=
knative.dev/eventing-redis v0.40.1-0.20240328131421-e89a50a6b21a h1:TjVZEqChLw01VX7O3zxsPRndozrFQCR2gbitRtxZI2w=
knative.dev/eventing-redis v0.40.1-0.20240328131421-e89a50a6b21a/go.mod h1:+muolJziOLEyvsDmvv21liUIK2tyJzMk9x/7XQBZxr8=
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/pkg v0.0.0-20240327172111-b8b7ca1f7904 h1:AT4AIwO3p1qZtmEzW5tWPftrUxts8Tlpra7EjNS/2PY=
knative.dev/pkg v0.0.0-20240327172111-b8b7ca1f7904/go.mod h1:LgcT4KPEcw24alWzzkFAN2acHq38au8NZqybU16TStI=
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/reconciler-test v0.0.0-20240327131444-6346b918a853 h1:YNnU474EU6U4iBEVGV9zZmEH/IbZIQwJ4I4OU4PHodQ=
knative.dev/reconciler-test v0.0.0-20240327131444-6346b918a853/go.mod h1:e3ZGbaE4B/7hIDyxxkEIYyGdkXB/51gMaEdH8pPpXIM=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
Expand Down
3 changes: 3 additions & 0 deletions vendor/knative.dev/pkg/codegen/cmd/injection-gen/args/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type CustomArgs struct {
ListersPackage string
ForceKinds string
ListerHasPointerElem bool
DisableInformerInit bool
}

// NewDefaults returns default arguments for the generator.
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type injectionGenerator struct {
imports namer.ImportTracker
typedInformerPackage string
groupInformerFactoryPackage string
disableInformerInit bool
}

var _ generator.Generator = (*injectionGenerator)(nil)
Expand Down Expand Up @@ -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)
Expand All @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ func versionInformerPackages(basePackage string, groupPkgName string, gv clientg
imports: generator.NewImportTracker(),
typedInformerPackage: typedInformerPackage,
groupInformerFactoryPackage: factoryPackagePath,
disableInformerInit: customArgs.DisableInformerInit,
})
return generators
},
Expand Down
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,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/apis/config
knative.dev/eventing/pkg/apis/duck
Expand Down Expand Up @@ -990,7 +990,7 @@ knative.dev/eventing-redis/pkg/source/apis/sources/v1alpha1
# knative.dev/hack v0.0.0-20240327150553-47368d631660
## explicit; go 1.18
knative.dev/hack
# 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
Expand Down

0 comments on commit 20abbd2

Please sign in to comment.