From 91fb5833c3c67e9c6c2f13accc7b49f765bf178a Mon Sep 17 00:00:00 2001 From: knative-automation Date: Wed, 25 Nov 2020 07:01:35 -0800 Subject: [PATCH] upgrade to latest dependencies (#396) Signed-off-by: Knative Automation --- go.mod | 2 +- go.sum | 4 ++-- pkg/client/injection/client/client.go | 9 +++++++-- .../pkg/codegen/cmd/injection-gen/generators/client.go | 9 +++++++-- vendor/modules.txt | 2 +- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 1309f9a8..370e4097 100644 --- a/go.mod +++ b/go.mod @@ -18,5 +18,5 @@ require ( k8s.io/code-generator v0.18.12 k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29 knative.dev/hack v0.0.0-20201120192952-353db687ec5b - knative.dev/pkg v0.0.0-20201124204235-3154117dcfaf + knative.dev/pkg v0.0.0-20201125095035-9bf616d2f46a ) diff --git a/go.sum b/go.sum index b5aa5f69..f50b3eac 100644 --- a/go.sum +++ b/go.sum @@ -1133,8 +1133,8 @@ k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 h1:v8ud2Up6QK1lNOKFgiIVrZdMg7Mpm k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= knative.dev/hack v0.0.0-20201120192952-353db687ec5b h1:Lc+AKgwhAZUD98mN++qTHeeaP6FRmS8fcwc/rXkP8G0= knative.dev/hack v0.0.0-20201120192952-353db687ec5b/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= -knative.dev/pkg v0.0.0-20201124204235-3154117dcfaf h1:H5um6wZSd1Qmqqozr+/nHF2HyaMde6GNXM3+KbaYlJc= -knative.dev/pkg v0.0.0-20201124204235-3154117dcfaf/go.mod h1:wXZqP8MXCxb51yNFlecA13BwG7Hk370SWDFWV4dx4ug= +knative.dev/pkg v0.0.0-20201125095035-9bf616d2f46a h1:pdJpLaq50mLKrPWYSQgTH2p64Dk7Fq/xID6l0F69cVY= +knative.dev/pkg v0.0.0-20201125095035-9bf616d2f46a/go.mod h1:wXZqP8MXCxb51yNFlecA13BwG7Hk370SWDFWV4dx4ug= 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= diff --git a/pkg/client/injection/client/client.go b/pkg/client/injection/client/client.go index 96d0def9..964b92ea 100644 --- a/pkg/client/injection/client/client.go +++ b/pkg/client/injection/client/client.go @@ -42,8 +42,13 @@ func withClient(ctx context.Context, cfg *rest.Config) context.Context { func Get(ctx context.Context) versioned.Interface { untyped := ctx.Value(Key{}) if untyped == nil { - logging.FromContext(ctx).Panic( - "Unable to fetch knative.dev/caching/pkg/client/clientset/versioned.Interface from context.") + if injection.GetConfig(ctx) == nil { + logging.FromContext(ctx).Panic( + "Unable to fetch knative.dev/caching/pkg/client/clientset/versioned.Interface from context. This context is not the application context (which is typically given to constructors via sharedmain).") + } else { + logging.FromContext(ctx).Panic( + "Unable to fetch knative.dev/caching/pkg/client/clientset/versioned.Interface from context.") + } } return untyped.(versioned.Interface) } diff --git a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/client.go b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/client.go index 9add17e9..317e12a4 100644 --- a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/client.go +++ b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/client.go @@ -98,8 +98,13 @@ func withClient(ctx {{.contextContext|raw}}, cfg *{{.restConfig|raw}}) context.C func Get(ctx {{.contextContext|raw}}) {{.clientSetInterface|raw}} { untyped := ctx.Value(Key{}) if untyped == nil { - {{.loggingFromContext|raw}}(ctx).Panic( - "Unable to fetch {{.clientSetInterface}} from context.") + if injection.GetConfig(ctx) == nil { + {{.loggingFromContext|raw}}(ctx).Panic( + "Unable to fetch {{.clientSetInterface}} from context. This context is not the application context (which is typically given to constructors via sharedmain).") + } else { + {{.loggingFromContext|raw}}(ctx).Panic( + "Unable to fetch {{.clientSetInterface}} from context.") + } } return untyped.({{.clientSetInterface|raw}}) } diff --git a/vendor/modules.txt b/vendor/modules.txt index bc704e90..b674c731 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -742,7 +742,7 @@ k8s.io/utils/trace # knative.dev/hack v0.0.0-20201120192952-353db687ec5b ## explicit knative.dev/hack -# knative.dev/pkg v0.0.0-20201124204235-3154117dcfaf +# knative.dev/pkg v0.0.0-20201125095035-9bf616d2f46a ## explicit knative.dev/pkg/apis knative.dev/pkg/apis/duck