Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/pkg 1ca1f09...5fe2303:
  > 5fe2303 drop vendor licenses (# 3001)
  > f69f148 Optionally generate an init func for an informer (# 2989)
  > b8b7ca1 upgrade to latest dependencies (# 3000)
bumping knative.dev/networking ae03989...e7cfc5b:
  > e7cfc5b drop vendor licenses (# 954)
  > 8c13911 upgrade to latest dependencies (# 953)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation committed Mar 29, 2024
1 parent 57385ce commit e0d63e6
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 @@ -13,8 +13,8 @@ require (
k8s.io/apimachinery v0.29.2
k8s.io/client-go v0.29.2
knative.dev/hack v0.0.0-20240327150553-47368d631660
knative.dev/networking v0.0.0-20240327140628-ae039896b125
knative.dev/pkg v0.0.0-20240327140624-1ca1f09c329e
knative.dev/networking v0.0.0-20240328164909-e7cfc5b7276f
knative.dev/pkg v0.0.0-20240328165227-5fe230325f5a
sigs.k8s.io/yaml v1.4.0
)

Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -696,10 +696,10 @@ k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCf
k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
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-20240327140624-1ca1f09c329e h1:Cg28hbL35g5Qd3tC0PKSX2FMMD8IZnTYxRr4VLIUgd8=
knative.dev/pkg v0.0.0-20240327140624-1ca1f09c329e/go.mod h1:uYSh5G3A/pFmzgowpvKeyphLbXVkY4x7zEhReKwsVeU=
knative.dev/networking v0.0.0-20240328164909-e7cfc5b7276f h1:zUKDqyqgooQdd+g9JWXtbQBXdYfHnqbyMoIaTmQ43eQ=
knative.dev/networking v0.0.0-20240328164909-e7cfc5b7276f/go.mod h1:uCy8+UXsCtZyb9fmQWrZm7byeZtyGj1fpHxHVKn+prg=
knative.dev/pkg v0.0.0-20240328165227-5fe230325f5a h1:HYKynG9QjRuVxrXEYnSMWBXboyOqHBgoQZt0xe4+RMA=
knative.dev/pkg v0.0.0-20240328165227-5fe230325f5a/go.mod h1:LgcT4KPEcw24alWzzkFAN2acHq38au8NZqybU16TStI=
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=
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 @@ -918,7 +918,7 @@ k8s.io/utils/trace
# knative.dev/hack v0.0.0-20240327150553-47368d631660
## explicit; go 1.18
knative.dev/hack
# knative.dev/networking v0.0.0-20240327140628-ae039896b125
# knative.dev/networking v0.0.0-20240328164909-e7cfc5b7276f
## explicit; go 1.21
knative.dev/networking/config
knative.dev/networking/pkg
Expand Down Expand Up @@ -969,7 +969,7 @@ knative.dev/networking/test/test_images/runtime/handlers
knative.dev/networking/test/test_images/timeout
knative.dev/networking/test/test_images/wsserver
knative.dev/networking/test/types
# knative.dev/pkg v0.0.0-20240327140624-1ca1f09c329e
# 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 e0d63e6

Please sign in to comment.