mirror of https://github.com/knative/caching.git
upgrade to latest dependencies (#378)
Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
parent
f2bc7482b3
commit
7983fcd03d
2
go.mod
2
go.mod
|
@ -16,7 +16,7 @@ require (
|
|||
k8s.io/code-generator v0.18.8
|
||||
k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29
|
||||
knative.dev/hack v0.0.0-20201028205534-fe80f1c8af68
|
||||
knative.dev/pkg v0.0.0-20201028171634-6a24d54694a8
|
||||
knative.dev/pkg v0.0.0-20201029122234-6d905b3f84a6
|
||||
)
|
||||
|
||||
replace (
|
||||
|
|
6
go.sum
6
go.sum
|
@ -1972,8 +1972,6 @@ knative.dev/caching v0.0.0-20190719140829-2032732871ff/go.mod h1:dHXFU6CGlLlbzaW
|
|||
knative.dev/caching v0.0.0-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
|
||||
knative.dev/eventing-contrib v0.6.1-0.20190723221543-5ce18048c08b/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
|
||||
knative.dev/eventing-contrib v0.11.2/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
|
||||
knative.dev/hack v0.0.0-20201027221733-0d7f2f064b7b h1:tBUkvMhcWZny+7CJTs5Ona8S3OCKJkgAwgZ7mkgWL3Y=
|
||||
knative.dev/hack v0.0.0-20201027221733-0d7f2f064b7b/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
|
||||
knative.dev/hack v0.0.0-20201028205534-fe80f1c8af68 h1:ygwpOK8B0PXurq88GHhym2uxKiiMJ+bRFwFeZHqGJNc=
|
||||
knative.dev/hack v0.0.0-20201028205534-fe80f1c8af68/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
|
||||
knative.dev/pkg v0.0.0-20191101194912-56c2594e4f11/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
|
||||
|
@ -1984,8 +1982,8 @@ knative.dev/pkg v0.0.0-20200505191044-3da93ebb24c2/go.mod h1:Q6sL35DdGs8hIQZKdaC
|
|||
knative.dev/pkg v0.0.0-20200515002500-16d7b963416f/go.mod h1:tMOHGbxtRz8zYFGEGpV/bpoTEM1o89MwYFC4YJXl3GY=
|
||||
knative.dev/pkg v0.0.0-20200528142800-1c6815d7e4c9/go.mod h1:QgNZTxnwpB/oSpNcfnLVlw+WpEwwyKAvJlvR3hgeltA=
|
||||
knative.dev/pkg v0.0.0-20200711004937-22502028e31a/go.mod h1:AqAJV6rYi8IGikDjJ/9ZQd9qKdkXVlesVnVjwx62YB8=
|
||||
knative.dev/pkg v0.0.0-20201028171634-6a24d54694a8 h1:mby4d9HiUPk9J0X6hjKD1Gvye1OJSWsX2Y5lzUCGUxA=
|
||||
knative.dev/pkg v0.0.0-20201028171634-6a24d54694a8/go.mod h1:gSgUoSIvJZoCHurWwZJQHiVDTvMkAJd6OFe8KwtzdX0=
|
||||
knative.dev/pkg v0.0.0-20201029122234-6d905b3f84a6 h1:J7VRiR73Mnc7UeiPo0mCPBIZVYcBBKZO+wPqFc8nlrM=
|
||||
knative.dev/pkg v0.0.0-20201029122234-6d905b3f84a6/go.mod h1:G805KH4tlnB6CIVHWIpE82pjx3/+2r9gUqNSOa78tns=
|
||||
knative.dev/test-infra v0.0.0-20200407185800-1b88cb3b45a5/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
|
||||
knative.dev/test-infra v0.0.0-20200505052144-5ea2f705bb55/go.mod h1:WqF1Azka+FxPZ20keR2zCNtiQA1MP9ZB4BH4HuI+SIU=
|
||||
knative.dev/test-infra v0.0.0-20200513011557-d03429a76034/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE=
|
||||
|
|
|
@ -79,17 +79,17 @@ func roundTrip(instance interface{}, input, output Populatable) error {
|
|||
// Serialize the input to JSON and deserialize that into the provided instance
|
||||
// of the type that we are checking.
|
||||
if before, err := json.Marshal(input); err != nil {
|
||||
return fmt.Errorf("error serializing duck type %T error: %s", input, err)
|
||||
return fmt.Errorf("error serializing duck type %T error: %w", input, err)
|
||||
} else if err := json.Unmarshal(before, instance); err != nil {
|
||||
return fmt.Errorf("error deserializing duck type %T into %T error: %s", input, instance, err)
|
||||
return fmt.Errorf("error deserializing duck type %T into %T error: %w", input, instance, err)
|
||||
}
|
||||
|
||||
// Serialize the instance we are checking to JSON and deserialize that into the
|
||||
// output resource.
|
||||
if after, err := json.Marshal(instance); err != nil {
|
||||
return fmt.Errorf("error serializing %T error: %s", instance, err)
|
||||
return fmt.Errorf("error serializing %T error: %w", instance, err)
|
||||
} else if err := json.Unmarshal(after, output); err != nil {
|
||||
return fmt.Errorf("error deserializing %T into duck type %T error: %s", instance, output, err)
|
||||
return fmt.Errorf("error deserializing %T into duck type %T error: %w", instance, output, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -582,6 +582,7 @@ func IsPermanentError(err error) bool {
|
|||
// Is implements the Is() interface of error. It returns whether the target
|
||||
// error can be treated as equivalent to a permanentError.
|
||||
func (permanentError) Is(target error) bool {
|
||||
//nolint: errorlint // This check is actually fine.
|
||||
_, ok := target.(permanentError)
|
||||
return ok
|
||||
}
|
||||
|
|
|
@ -212,7 +212,7 @@ func UpdateLevelFromConfigMap(logger *zap.SugaredLogger, atomicLevel zap.AtomicL
|
|||
// reset to global level
|
||||
loggingCfg, err := zapConfigFromJSON(config.LoggingConfig)
|
||||
switch {
|
||||
case err == errEmptyLoggerConfig:
|
||||
case errors.Is(err, errEmptyLoggerConfig):
|
||||
level = zap.NewAtomicLevel().Level()
|
||||
case err != nil:
|
||||
logger.With(zap.Error(err)).Errorf("Failed to parse logger configuration. "+
|
||||
|
|
|
@ -85,7 +85,7 @@ func getOpenCensusSecret(component string, lister SecretFetcher) (*corev1.Secret
|
|||
secret, err = lister("opencensus")
|
||||
}
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to fetch opencensus secret for %q, cannot use requireSecure=true: %+v", component, err)
|
||||
return nil, fmt.Errorf("unable to fetch opencensus secret for %q, cannot use requireSecure=true: %w", component, err)
|
||||
}
|
||||
|
||||
return secret, nil
|
||||
|
|
|
@ -363,7 +363,7 @@ func getStackdriverSecret(ctx context.Context, secretFetcher SecretFetcher) (*co
|
|||
}
|
||||
|
||||
if secErr != nil {
|
||||
return nil, fmt.Errorf("error getting Secret [%v] in namespace [%v]: %v", secretName, secretNamespace, secErr)
|
||||
return nil, fmt.Errorf("error getting Secret [%v] in namespace [%v]: %w", secretName, secretNamespace, secErr)
|
||||
}
|
||||
|
||||
return sec, nil
|
||||
|
|
|
@ -18,6 +18,7 @@ package network
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
|
@ -76,7 +77,8 @@ func dialBackOffHelper(ctx context.Context, network, address string, bo wait.Bac
|
|||
for {
|
||||
c, err := dialer.DialContext(ctx, network, address)
|
||||
if err != nil {
|
||||
if err, ok := err.(net.Error); ok && err.Timeout() {
|
||||
var errNet net.Error
|
||||
if errors.As(err, &errNet) && errNet.Timeout() {
|
||||
if bo.Steps < 1 {
|
||||
break
|
||||
}
|
||||
|
|
|
@ -75,7 +75,8 @@ var _ error = (*ReconcilerEvent)(nil)
|
|||
// Is returns if the target error is a ReconcilerEvent type checking that
|
||||
// EventType and Reason match.
|
||||
func (e *ReconcilerEvent) Is(target error) bool {
|
||||
if t, ok := target.(*ReconcilerEvent); ok {
|
||||
var t *ReconcilerEvent
|
||||
if errors.As(target, &t) {
|
||||
if t != nil && t.EventType == e.EventType && t.Reason == e.Reason {
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -740,7 +740,7 @@ k8s.io/utils/trace
|
|||
# knative.dev/hack v0.0.0-20201028205534-fe80f1c8af68
|
||||
## explicit
|
||||
knative.dev/hack
|
||||
# knative.dev/pkg v0.0.0-20201028171634-6a24d54694a8
|
||||
# knative.dev/pkg v0.0.0-20201029122234-6d905b3f84a6
|
||||
## explicit
|
||||
knative.dev/pkg/apis
|
||||
knative.dev/pkg/apis/duck
|
||||
|
|
Loading…
Reference in New Issue