diff --git a/go.mod b/go.mod index 69713028ca..1cf043a551 100644 --- a/go.mod +++ b/go.mod @@ -28,9 +28,9 @@ require ( k8s.io/api v0.18.8 k8s.io/apimachinery v0.18.8 k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible - knative.dev/eventing v0.17.1-0.20200929080328-74b9bed2ebf2 - knative.dev/pkg v0.0.0-20200929052028-236c084e37a3 - knative.dev/serving v0.17.1-0.20200929093229-7960ee24cc7b + knative.dev/eventing v0.18.0 + knative.dev/pkg v0.0.0-20200922164940-4bf40ad82aab + knative.dev/serving v0.17.1-0.20200929160229-0a890efa0030 sigs.k8s.io/yaml v1.2.0 ) diff --git a/go.sum b/go.sum index d679e147ea..a730891575 100644 --- a/go.sum +++ b/go.sum @@ -1945,8 +1945,8 @@ k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ knative.dev/caching v0.0.0-20190719140829-2032732871ff/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg= knative.dev/caching v0.0.0-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg= knative.dev/caching v0.0.0-20200922173540-a6b8bbd6999a/go.mod h1:P624eQ2AZLjwPBRuSqlnkWjRYoVeGdZ/uGXPrYP/USk= -knative.dev/eventing v0.17.1-0.20200929080328-74b9bed2ebf2 h1:xLuRGXbanrO3qlYSM/Q2dYbkjhAadtZ5cIBS5neeviA= -knative.dev/eventing v0.17.1-0.20200929080328-74b9bed2ebf2/go.mod h1:Rv5V1Sk/XeG6vdEpRu+zDhEUDg2SgbkOJWRNssUyt50= +knative.dev/eventing v0.18.0 h1:DKRDpIAYZtFt959m4m9oWHnNBBH97yMP+nekrqmjOF8= +knative.dev/eventing v0.18.0/go.mod h1:Rv5V1Sk/XeG6vdEpRu+zDhEUDg2SgbkOJWRNssUyt50= 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/networking v0.0.0-20200922180040-a71b40c69b15 h1:UhUyfzy5VTEdkWXlkJAKLDPkPK9MKNpENfn17rlYtcs= @@ -1959,11 +1959,10 @@ 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-20200922164940-4bf40ad82aab h1:4Q+sGqdN4ecLPZnIJcLDdQArEE9oOtRYiU2J6NPCCjU= knative.dev/pkg v0.0.0-20200922164940-4bf40ad82aab/go.mod h1:MCyt5KqLaai6ENUitOgRAQsu7Gw7cAIIiXQ2IS+O0NI= -knative.dev/pkg v0.0.0-20200929052028-236c084e37a3 h1:MUx6fJvPZekqDYhzSEQdomzxLqnkX/tQ7qmwRiyiZoY= -knative.dev/pkg v0.0.0-20200929052028-236c084e37a3/go.mod h1:/HM1zJbhqiicYwpkfA3GvhO3EoIXb2bNZOsb9zi2WEk= -knative.dev/serving v0.17.1-0.20200929093229-7960ee24cc7b h1:5U/2jL90tKG64Q4b3i7sUsvNvxLoQOOcZvPyzyIvf28= -knative.dev/serving v0.17.1-0.20200929093229-7960ee24cc7b/go.mod h1:9U9j3D5yT7nPyVQFp4cnYugbqxF9LbHZVaxCOhNajFI= +knative.dev/serving v0.17.1-0.20200929160229-0a890efa0030 h1:EG7xAxMpL08Jj2xP3KnSfkDIt7bB/tmMIdy9tAyCel0= +knative.dev/serving v0.17.1-0.20200929160229-0a890efa0030/go.mod h1:9U9j3D5yT7nPyVQFp4cnYugbqxF9LbHZVaxCOhNajFI= 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= @@ -1971,8 +1970,6 @@ knative.dev/test-infra v0.0.0-20200519015156-82551620b0a9/go.mod h1:A5b2OAXTOeHT knative.dev/test-infra v0.0.0-20200707183444-aed09e56ddc7/go.mod h1:RjYAhXnZqeHw9+B0zsbqSPlae0lCvjekO/nw5ZMpLCs= knative.dev/test-infra v0.0.0-20200921012245-37f1a12adbd3 h1:abacWewpeP9QUByQAunuOA8F9hQ6Ryr2P63r38ns5sA= knative.dev/test-infra v0.0.0-20200921012245-37f1a12adbd3/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc= -knative.dev/test-infra v0.0.0-20200928212629-45266e61aa32 h1:0OGLqAQJbh82fJfPZu1oCsNO3mS2t/iHeVxkwVkYGO4= -knative.dev/test-infra v0.0.0-20200928212629-45266e61aa32/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= diff --git a/hack/update-deps.sh b/hack/update-deps.sh index 8fc1850354..d97476e651 100755 --- a/hack/update-deps.sh +++ b/hack/update-deps.sh @@ -24,7 +24,7 @@ set -o pipefail cd "${ROOT_DIR}" # Used to pin floating deps to a release version. -VERSION="master" +VERSION="release-0.18" # The list of dependencies that we track at HEAD and periodically # float forward in this repository. FLOATING_DEPS=( diff --git a/pkg/client/injection/reconciler/broker/v1beta1/broker/controller.go b/pkg/client/injection/reconciler/broker/v1beta1/broker/controller.go index 85aee9f2e0..07f10b36ee 100644 --- a/pkg/client/injection/reconciler/broker/v1beta1/broker/controller.go +++ b/pkg/client/injection/reconciler/broker/v1beta1/broker/controller.go @@ -57,7 +57,7 @@ func NewImpl(ctx context.Context, r Interface, classValue string, optionsFns ... // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } brokerInformer := broker.Get(ctx) diff --git a/pkg/client/injection/reconciler/broker/v1beta1/broker/reconciler.go b/pkg/client/injection/reconciler/broker/v1beta1/broker/reconciler.go index c28cba67e7..0a54e67c9c 100644 --- a/pkg/client/injection/reconciler/broker/v1beta1/broker/reconciler.go +++ b/pkg/client/injection/reconciler/broker/v1beta1/broker/reconciler.go @@ -128,13 +128,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister brokerv1beta1.BrokerLister, recorder record.EventRecorder, r Interface, classValue string, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -188,7 +188,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -214,7 +214,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -338,7 +338,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Bro } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/broker/v1beta1/trigger/controller.go b/pkg/client/injection/reconciler/broker/v1beta1/trigger/controller.go index 2dfb403d4b..8aa6cc59ed 100644 --- a/pkg/client/injection/reconciler/broker/v1beta1/trigger/controller.go +++ b/pkg/client/injection/reconciler/broker/v1beta1/trigger/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } triggerInformer := trigger.Get(ctx) diff --git a/pkg/client/injection/reconciler/broker/v1beta1/trigger/reconciler.go b/pkg/client/injection/reconciler/broker/v1beta1/trigger/reconciler.go index b3e5a4968e..dc1b7a118c 100644 --- a/pkg/client/injection/reconciler/broker/v1beta1/trigger/reconciler.go +++ b/pkg/client/injection/reconciler/broker/v1beta1/trigger/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister brokerv1beta1.TriggerLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Tri } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/events/v1/cloudauditlogssource/controller.go b/pkg/client/injection/reconciler/events/v1/cloudauditlogssource/controller.go index ad96da7913..d94bc1bcc5 100644 --- a/pkg/client/injection/reconciler/events/v1/cloudauditlogssource/controller.go +++ b/pkg/client/injection/reconciler/events/v1/cloudauditlogssource/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } cloudauditlogssourceInformer := cloudauditlogssource.Get(ctx) diff --git a/pkg/client/injection/reconciler/events/v1/cloudauditlogssource/reconciler.go b/pkg/client/injection/reconciler/events/v1/cloudauditlogssource/reconciler.go index 3a0f134b16..47af991409 100644 --- a/pkg/client/injection/reconciler/events/v1/cloudauditlogssource/reconciler.go +++ b/pkg/client/injection/reconciler/events/v1/cloudauditlogssource/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister eventsv1.CloudAuditLogsSourceLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1.CloudAud } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/events/v1/cloudbuildsource/controller.go b/pkg/client/injection/reconciler/events/v1/cloudbuildsource/controller.go index 9938c06e68..6b8c936eb1 100644 --- a/pkg/client/injection/reconciler/events/v1/cloudbuildsource/controller.go +++ b/pkg/client/injection/reconciler/events/v1/cloudbuildsource/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } cloudbuildsourceInformer := cloudbuildsource.Get(ctx) diff --git a/pkg/client/injection/reconciler/events/v1/cloudbuildsource/reconciler.go b/pkg/client/injection/reconciler/events/v1/cloudbuildsource/reconciler.go index 1f463cb079..c9d2353326 100644 --- a/pkg/client/injection/reconciler/events/v1/cloudbuildsource/reconciler.go +++ b/pkg/client/injection/reconciler/events/v1/cloudbuildsource/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister eventsv1.CloudBuildSourceLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1.CloudBui } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/events/v1/cloudpubsubsource/controller.go b/pkg/client/injection/reconciler/events/v1/cloudpubsubsource/controller.go index 4ce7b5a56e..79842b5d7c 100644 --- a/pkg/client/injection/reconciler/events/v1/cloudpubsubsource/controller.go +++ b/pkg/client/injection/reconciler/events/v1/cloudpubsubsource/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } cloudpubsubsourceInformer := cloudpubsubsource.Get(ctx) diff --git a/pkg/client/injection/reconciler/events/v1/cloudpubsubsource/reconciler.go b/pkg/client/injection/reconciler/events/v1/cloudpubsubsource/reconciler.go index ab29e90797..c75df14425 100644 --- a/pkg/client/injection/reconciler/events/v1/cloudpubsubsource/reconciler.go +++ b/pkg/client/injection/reconciler/events/v1/cloudpubsubsource/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister eventsv1.CloudPubSubSourceLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1.CloudPub } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/events/v1/cloudschedulersource/controller.go b/pkg/client/injection/reconciler/events/v1/cloudschedulersource/controller.go index 9ba54062bb..acbc27eb89 100644 --- a/pkg/client/injection/reconciler/events/v1/cloudschedulersource/controller.go +++ b/pkg/client/injection/reconciler/events/v1/cloudschedulersource/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } cloudschedulersourceInformer := cloudschedulersource.Get(ctx) diff --git a/pkg/client/injection/reconciler/events/v1/cloudschedulersource/reconciler.go b/pkg/client/injection/reconciler/events/v1/cloudschedulersource/reconciler.go index 5ba3906697..2b6a2555b0 100644 --- a/pkg/client/injection/reconciler/events/v1/cloudschedulersource/reconciler.go +++ b/pkg/client/injection/reconciler/events/v1/cloudschedulersource/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister eventsv1.CloudSchedulerSourceLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1.CloudSch } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/events/v1/cloudstoragesource/controller.go b/pkg/client/injection/reconciler/events/v1/cloudstoragesource/controller.go index e6ba627809..7ee08c543c 100644 --- a/pkg/client/injection/reconciler/events/v1/cloudstoragesource/controller.go +++ b/pkg/client/injection/reconciler/events/v1/cloudstoragesource/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } cloudstoragesourceInformer := cloudstoragesource.Get(ctx) diff --git a/pkg/client/injection/reconciler/events/v1/cloudstoragesource/reconciler.go b/pkg/client/injection/reconciler/events/v1/cloudstoragesource/reconciler.go index 141d123599..c30b0d7d08 100644 --- a/pkg/client/injection/reconciler/events/v1/cloudstoragesource/reconciler.go +++ b/pkg/client/injection/reconciler/events/v1/cloudstoragesource/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister eventsv1.CloudStorageSourceLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1.CloudSto } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/events/v1beta1/cloudauditlogssource/controller.go b/pkg/client/injection/reconciler/events/v1beta1/cloudauditlogssource/controller.go index 8a42adec77..41c38ef7f3 100644 --- a/pkg/client/injection/reconciler/events/v1beta1/cloudauditlogssource/controller.go +++ b/pkg/client/injection/reconciler/events/v1beta1/cloudauditlogssource/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } cloudauditlogssourceInformer := cloudauditlogssource.Get(ctx) diff --git a/pkg/client/injection/reconciler/events/v1beta1/cloudauditlogssource/reconciler.go b/pkg/client/injection/reconciler/events/v1beta1/cloudauditlogssource/reconciler.go index adeddeb59e..eb66df4518 100644 --- a/pkg/client/injection/reconciler/events/v1beta1/cloudauditlogssource/reconciler.go +++ b/pkg/client/injection/reconciler/events/v1beta1/cloudauditlogssource/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister eventsv1beta1.CloudAuditLogsSourceLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Clo } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/events/v1beta1/cloudbuildsource/controller.go b/pkg/client/injection/reconciler/events/v1beta1/cloudbuildsource/controller.go index 11e0c0f247..e7b62f3590 100644 --- a/pkg/client/injection/reconciler/events/v1beta1/cloudbuildsource/controller.go +++ b/pkg/client/injection/reconciler/events/v1beta1/cloudbuildsource/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } cloudbuildsourceInformer := cloudbuildsource.Get(ctx) diff --git a/pkg/client/injection/reconciler/events/v1beta1/cloudbuildsource/reconciler.go b/pkg/client/injection/reconciler/events/v1beta1/cloudbuildsource/reconciler.go index 284d23933b..3d65e8f421 100644 --- a/pkg/client/injection/reconciler/events/v1beta1/cloudbuildsource/reconciler.go +++ b/pkg/client/injection/reconciler/events/v1beta1/cloudbuildsource/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister eventsv1beta1.CloudBuildSourceLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Clo } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/events/v1beta1/cloudpubsubsource/controller.go b/pkg/client/injection/reconciler/events/v1beta1/cloudpubsubsource/controller.go index 97834d77c4..b17054db03 100644 --- a/pkg/client/injection/reconciler/events/v1beta1/cloudpubsubsource/controller.go +++ b/pkg/client/injection/reconciler/events/v1beta1/cloudpubsubsource/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } cloudpubsubsourceInformer := cloudpubsubsource.Get(ctx) diff --git a/pkg/client/injection/reconciler/events/v1beta1/cloudpubsubsource/reconciler.go b/pkg/client/injection/reconciler/events/v1beta1/cloudpubsubsource/reconciler.go index 7493636a89..759120654e 100644 --- a/pkg/client/injection/reconciler/events/v1beta1/cloudpubsubsource/reconciler.go +++ b/pkg/client/injection/reconciler/events/v1beta1/cloudpubsubsource/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister eventsv1beta1.CloudPubSubSourceLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Clo } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/events/v1beta1/cloudschedulersource/controller.go b/pkg/client/injection/reconciler/events/v1beta1/cloudschedulersource/controller.go index fb2f19ce27..a08f491960 100644 --- a/pkg/client/injection/reconciler/events/v1beta1/cloudschedulersource/controller.go +++ b/pkg/client/injection/reconciler/events/v1beta1/cloudschedulersource/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } cloudschedulersourceInformer := cloudschedulersource.Get(ctx) diff --git a/pkg/client/injection/reconciler/events/v1beta1/cloudschedulersource/reconciler.go b/pkg/client/injection/reconciler/events/v1beta1/cloudschedulersource/reconciler.go index 552b1150b5..18ab98d6a3 100644 --- a/pkg/client/injection/reconciler/events/v1beta1/cloudschedulersource/reconciler.go +++ b/pkg/client/injection/reconciler/events/v1beta1/cloudschedulersource/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister eventsv1beta1.CloudSchedulerSourceLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Clo } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/events/v1beta1/cloudstoragesource/controller.go b/pkg/client/injection/reconciler/events/v1beta1/cloudstoragesource/controller.go index 1dc73b1d9f..eb0401a3c5 100644 --- a/pkg/client/injection/reconciler/events/v1beta1/cloudstoragesource/controller.go +++ b/pkg/client/injection/reconciler/events/v1beta1/cloudstoragesource/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } cloudstoragesourceInformer := cloudstoragesource.Get(ctx) diff --git a/pkg/client/injection/reconciler/events/v1beta1/cloudstoragesource/reconciler.go b/pkg/client/injection/reconciler/events/v1beta1/cloudstoragesource/reconciler.go index 3ce730d94b..1648fe5467 100644 --- a/pkg/client/injection/reconciler/events/v1beta1/cloudstoragesource/reconciler.go +++ b/pkg/client/injection/reconciler/events/v1beta1/cloudstoragesource/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister eventsv1beta1.CloudStorageSourceLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Clo } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/intevents/v1/pullsubscription/controller.go b/pkg/client/injection/reconciler/intevents/v1/pullsubscription/controller.go index 427dbafe5c..7527522ada 100644 --- a/pkg/client/injection/reconciler/intevents/v1/pullsubscription/controller.go +++ b/pkg/client/injection/reconciler/intevents/v1/pullsubscription/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } pullsubscriptionInformer := pullsubscription.Get(ctx) diff --git a/pkg/client/injection/reconciler/intevents/v1/pullsubscription/reconciler.go b/pkg/client/injection/reconciler/intevents/v1/pullsubscription/reconciler.go index 89a0acb48f..2af6688fbb 100644 --- a/pkg/client/injection/reconciler/intevents/v1/pullsubscription/reconciler.go +++ b/pkg/client/injection/reconciler/intevents/v1/pullsubscription/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister inteventsv1.PullSubscriptionLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1.PullSubs } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/intevents/v1/topic/controller.go b/pkg/client/injection/reconciler/intevents/v1/topic/controller.go index c682096b63..3791d8f478 100644 --- a/pkg/client/injection/reconciler/intevents/v1/topic/controller.go +++ b/pkg/client/injection/reconciler/intevents/v1/topic/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } topicInformer := topic.Get(ctx) diff --git a/pkg/client/injection/reconciler/intevents/v1/topic/reconciler.go b/pkg/client/injection/reconciler/intevents/v1/topic/reconciler.go index 5be8a0721d..4c52621b79 100644 --- a/pkg/client/injection/reconciler/intevents/v1/topic/reconciler.go +++ b/pkg/client/injection/reconciler/intevents/v1/topic/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister inteventsv1.TopicLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1.Topic, d } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/intevents/v1alpha1/brokercell/controller.go b/pkg/client/injection/reconciler/intevents/v1alpha1/brokercell/controller.go index 4f0b8269c7..f40a603849 100644 --- a/pkg/client/injection/reconciler/intevents/v1alpha1/brokercell/controller.go +++ b/pkg/client/injection/reconciler/intevents/v1alpha1/brokercell/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } brokercellInformer := brokercell.Get(ctx) diff --git a/pkg/client/injection/reconciler/intevents/v1alpha1/brokercell/reconciler.go b/pkg/client/injection/reconciler/intevents/v1alpha1/brokercell/reconciler.go index 2963b274de..95b0c1c68a 100644 --- a/pkg/client/injection/reconciler/intevents/v1alpha1/brokercell/reconciler.go +++ b/pkg/client/injection/reconciler/intevents/v1alpha1/brokercell/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister inteventsv1alpha1.BrokerCellLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1alpha1.Br } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/intevents/v1beta1/pullsubscription/controller.go b/pkg/client/injection/reconciler/intevents/v1beta1/pullsubscription/controller.go index 37cdf5fe5f..fb048b42db 100644 --- a/pkg/client/injection/reconciler/intevents/v1beta1/pullsubscription/controller.go +++ b/pkg/client/injection/reconciler/intevents/v1beta1/pullsubscription/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } pullsubscriptionInformer := pullsubscription.Get(ctx) diff --git a/pkg/client/injection/reconciler/intevents/v1beta1/pullsubscription/reconciler.go b/pkg/client/injection/reconciler/intevents/v1beta1/pullsubscription/reconciler.go index 5cfb9bbb67..72164a45cb 100644 --- a/pkg/client/injection/reconciler/intevents/v1beta1/pullsubscription/reconciler.go +++ b/pkg/client/injection/reconciler/intevents/v1beta1/pullsubscription/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister inteventsv1beta1.PullSubscriptionLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Pul } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/intevents/v1beta1/topic/controller.go b/pkg/client/injection/reconciler/intevents/v1beta1/topic/controller.go index 470d44c9d6..936d46e3c5 100644 --- a/pkg/client/injection/reconciler/intevents/v1beta1/topic/controller.go +++ b/pkg/client/injection/reconciler/intevents/v1beta1/topic/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } topicInformer := topic.Get(ctx) diff --git a/pkg/client/injection/reconciler/intevents/v1beta1/topic/reconciler.go b/pkg/client/injection/reconciler/intevents/v1beta1/topic/reconciler.go index 8bde0d1da4..2c3dd9689e 100644 --- a/pkg/client/injection/reconciler/intevents/v1beta1/topic/reconciler.go +++ b/pkg/client/injection/reconciler/intevents/v1beta1/topic/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister inteventsv1beta1.TopicLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Top } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/pkg/client/injection/reconciler/messaging/v1beta1/channel/controller.go b/pkg/client/injection/reconciler/messaging/v1beta1/channel/controller.go index 790f7fff97..d43f19a3d4 100644 --- a/pkg/client/injection/reconciler/messaging/v1beta1/channel/controller.go +++ b/pkg/client/injection/reconciler/messaging/v1beta1/channel/controller.go @@ -54,7 +54,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } channelInformer := channel.Get(ctx) diff --git a/pkg/client/injection/reconciler/messaging/v1beta1/channel/reconciler.go b/pkg/client/injection/reconciler/messaging/v1beta1/channel/reconciler.go index 667518c6ac..e5cbb1e0f5 100644 --- a/pkg/client/injection/reconciler/messaging/v1beta1/channel/reconciler.go +++ b/pkg/client/injection/reconciler/messaging/v1beta1/channel/reconciler.go @@ -125,13 +125,13 @@ var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister messagingv1beta1.ChannelLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.(reconciler.LeaderAware); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -184,7 +184,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -210,7 +210,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { if errors.IsNotFound(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -327,7 +327,7 @@ func (r *reconcilerImpl) updateStatus(ctx context.Context, existing *v1beta1.Cha } if diff, err := kmp.SafeDiff(existing.Status, desired.Status); err == nil && diff != "" { - logging.FromContext(ctx).Debug("Updating status with: ", diff) + logging.FromContext(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/vendor/knative.dev/pkg/apis/condition_set.go b/vendor/knative.dev/pkg/apis/condition_set.go index 1d81355b36..e354167b9e 100644 --- a/vendor/knative.dev/pkg/apis/condition_set.go +++ b/vendor/knative.dev/pkg/apis/condition_set.go @@ -234,7 +234,7 @@ func (r conditionsImpl) ClearCondition(t ConditionType) error { } // Terminal conditions are not handled as they can't be nil if r.isTerminal(t) { - return fmt.Errorf("clearing terminal conditions not implemented") + return fmt.Errorf("Clearing terminal conditions not implemented") } cond := r.GetCondition(t) if cond == nil { diff --git a/vendor/knative.dev/pkg/apis/duck/v1/destination.go b/vendor/knative.dev/pkg/apis/duck/v1/destination.go index 87f0983fd0..78aa52717a 100644 --- a/vendor/knative.dev/pkg/apis/duck/v1/destination.go +++ b/vendor/knative.dev/pkg/apis/duck/v1/destination.go @@ -35,11 +35,11 @@ type Destination struct { // Validate the Destination has all the necessary fields and check the // Namespace matches that of the parent object (using apis.ParentMeta). -func (d *Destination) Validate(ctx context.Context) *apis.FieldError { - if d == nil { +func (dest *Destination) Validate(ctx context.Context) *apis.FieldError { + if dest == nil { return nil } - return ValidateDestination(ctx, *d).ViaField(apis.CurrentField) + return ValidateDestination(ctx, *dest).ViaField(apis.CurrentField) } // ValidateDestination validates Destination. @@ -65,11 +65,11 @@ func ValidateDestination(ctx context.Context, dest Destination) *apis.FieldError // GetRef gets the KReference from this Destination, if one is present. If no ref is present, // then nil is returned. -func (d *Destination) GetRef() *KReference { - if d == nil { +func (dest *Destination) GetRef() *KReference { + if dest == nil { return nil } - return d.Ref + return dest.Ref } func (d *Destination) SetDefaults(ctx context.Context) { diff --git a/vendor/knative.dev/pkg/apis/duck/v1/status_types.go b/vendor/knative.dev/pkg/apis/duck/v1/status_types.go index bf740e0651..bb662eeea3 100644 --- a/vendor/knative.dev/pkg/apis/duck/v1/status_types.go +++ b/vendor/knative.dev/pkg/apis/duck/v1/status_types.go @@ -89,15 +89,15 @@ func (s *Status) GetCondition(t apis.ConditionType) *apis.Condition { // By default apis.ConditionReady and apis.ConditionSucceeded will be copied over to the // sink. Other conditions types are tested against a list of predicates. If any of the predicates // return true the condition type will be copied to the sink -func (s *Status) ConvertTo(ctx context.Context, sink *Status, predicates ...func(apis.ConditionType) bool) { - sink.ObservedGeneration = s.ObservedGeneration - if s.Annotations != nil { +func (source *Status) ConvertTo(ctx context.Context, sink *Status, predicates ...func(apis.ConditionType) bool) { + sink.ObservedGeneration = source.ObservedGeneration + if source.Annotations != nil { // This will deep copy the map. - sink.Annotations = kmeta.UnionMaps(s.Annotations) + sink.Annotations = kmeta.UnionMaps(source.Annotations) } - conditions := make(apis.Conditions, 0, len(s.Conditions)) - for _, c := range s.Conditions { + conditions := make(apis.Conditions, 0, len(source.Conditions)) + for _, c := range source.Conditions { // Copy over the "happy" condition, which is the only condition that // we can reliably transfer. diff --git a/vendor/knative.dev/pkg/apis/duck/v1beta1/status_types.go b/vendor/knative.dev/pkg/apis/duck/v1beta1/status_types.go index 722902676e..ff7c68c269 100644 --- a/vendor/knative.dev/pkg/apis/duck/v1beta1/status_types.go +++ b/vendor/knative.dev/pkg/apis/duck/v1beta1/status_types.go @@ -106,13 +106,13 @@ func (s *Status) GetCondition(t apis.ConditionType) *apis.Condition { } // ConvertTo helps implement apis.Convertible for types embedding this Status. -func (s *Status) ConvertTo(ctx context.Context, sink *Status) { - sink.ObservedGeneration = s.ObservedGeneration - if s.Annotations != nil { +func (source *Status) ConvertTo(ctx context.Context, sink *Status) { + sink.ObservedGeneration = source.ObservedGeneration + if source.Annotations != nil { // This will deep copy the map. - sink.Annotations = kmeta.UnionMaps(s.Annotations) + sink.Annotations = kmeta.UnionMaps(source.Annotations) } - for _, c := range s.Conditions { + for _, c := range source.Conditions { switch c.Type { // Copy over the "happy" condition, which is the only condition that // we can reliably transfer. 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 9345cdea01..70e4eb7d19 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 @@ -73,7 +73,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat // If there's a comment of the form "// +groupGoName=SomeUniqueShortName", use that as // the Go group identifier in CamelCase. It defaults - groupGoNames[groupPackageName] = namer.IC(strings.SplitN(gv.Group.NonEmpty(), ".", 2)[0]) + groupGoNames[groupPackageName] = namer.IC(strings.Split(gv.Group.NonEmpty(), ".")[0]) if override := types.ExtractCommentTags("+", p.Comments)["groupGoName"]; override != nil { groupGoNames[groupPackageName] = namer.IC(override[0]) } @@ -236,7 +236,7 @@ func typedInformerPackage(groupPkgName string, gv clientgentypes.GroupVersion, e func versionClientsPackages(basePackage string, boilerplate []byte, customArgs *informergenargs.CustomArgs) []generator.Package { packagePath := filepath.Join(basePackage, "client") - return []generator.Package{ + vers := []generator.Package{ // Impl &generator.DefaultPackage{ PackageName: "client", @@ -283,12 +283,13 @@ func versionClientsPackages(basePackage string, boilerplate []byte, customArgs * }, }, } + return vers } func versionFactoryPackages(basePackage string, boilerplate []byte, customArgs *informergenargs.CustomArgs) []generator.Package { packagePath := filepath.Join(basePackage, "informers", "factory") - return []generator.Package{ + vers := []generator.Package{ // Impl &generator.DefaultPackage{ PackageName: "factory", @@ -337,6 +338,7 @@ func versionFactoryPackages(basePackage string, boilerplate []byte, customArgs * }, }, } + return vers } func versionInformerPackages(basePackage string, groupPkgName string, gv clientgentypes.GroupVersion, groupGoName string, boilerplate []byte, typesToGenerate []*types.Type, customArgs *informergenargs.CustomArgs) []generator.Package { diff --git a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_controller.go b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_controller.go index e63e082ed1..177d99caa4 100644 --- a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_controller.go +++ b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_controller.go @@ -196,7 +196,7 @@ func NewImpl(ctx {{.contextContext|raw}}, r Interface{{if .hasClass}}, classValu // Check the options function input. It should be 0 or 1. if len(optionsFns) > 1 { - logger.Fatal("Up to one options function is supported, found: ", len(optionsFns)) + logger.Fatalf("up to one options function is supported, found %d", len(optionsFns)) } {{.type|lowercaseSingular}}Informer := {{.informerGet|raw}}(ctx) diff --git a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_reconciler.go b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_reconciler.go index a347a17ee7..16c8a01611 100644 --- a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_reconciler.go +++ b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_reconciler.go @@ -306,13 +306,13 @@ var reconcilerNewReconciler = ` func NewReconciler(ctx {{.contextContext|raw}}, logger *{{.zapSugaredLogger|raw}}, client {{.clientsetInterface|raw}}, lister {{.resourceLister|raw}}, recorder {{.recordEventRecorder|raw}}, r Interface{{if .hasClass}}, classValue string{{end}}, options ...{{.controllerOptions|raw}} ) {{.controllerReconciler|raw}} { // Check the options function input. It should be 0 or 1. if len(options) > 1 { - logger.Fatal("Up to one options struct is supported, found: ", len(options)) + logger.Fatalf("up to one options struct is supported, found %d", len(options)) } // Fail fast when users inadvertently implement the other LeaderAware interface. // For the typed reconcilers, Promote shouldn't take any arguments. if _, ok := r.({{.reconcilerLeaderAware|raw}}); ok { - logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) + logger.Fatalf("%T implements the incorrect LeaderAware interface. Promote() should not take an argument as genreconciler handles the enqueuing automatically.", r) } // TODO: Consider validating when folks implement ReadOnlyFinalizer, but not Finalizer. @@ -368,7 +368,7 @@ func (r *reconcilerImpl) Reconcile(ctx {{.contextContext|raw}}, key string) erro // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) if err != nil { - logger.Error("Invalid resource key: ", key) + logger.Errorf("invalid resource key: %s", key) return nil } @@ -396,7 +396,7 @@ func (r *reconcilerImpl) Reconcile(ctx {{.contextContext|raw}}, key string) erro if {{.apierrsIsNotFound|raw}}(err) { // The resource may no longer exist, in which case we stop processing. - logger.Debugf("Resource %q no longer exists", key) + logger.Debugf("resource %q no longer exists", key) return nil } else if err != nil { return err @@ -528,7 +528,7 @@ func (r *reconcilerImpl) updateStatus(ctx {{.contextContext|raw}}, existing *{{. } if diff, err := {{.kmpSafeDiff|raw}}(existing.Status, desired.Status); err == nil && diff != "" { - {{.loggingFromContext|raw}}(ctx).Debug("Updating status with: ", diff) + {{.loggingFromContext|raw}}(ctx).Debugf("Updating status with: %s", diff) } existing.Status = desired.Status diff --git a/vendor/knative.dev/pkg/controller/controller.go b/vendor/knative.dev/pkg/controller/controller.go index ee35f37bff..300f76e824 100644 --- a/vendor/knative.dev/pkg/controller/controller.go +++ b/vendor/knative.dev/pkg/controller/controller.go @@ -505,7 +505,7 @@ func (c *Impl) processNextWorkItem() bool { // Embed the key into the logger and attach that to the context we pass // to the Reconciler. - logger := c.logger.With(zap.String(logkey.TraceID, uuid.New().String()), zap.String(logkey.Key, keyStr)) + logger := c.logger.With(zap.String(logkey.TraceId, uuid.New().String()), zap.String(logkey.Key, keyStr)) ctx := logging.WithLogger(context.Background(), logger) // Run Reconcile, passing it the namespace/name string of the diff --git a/vendor/knative.dev/pkg/hack/update-deps.sh b/vendor/knative.dev/pkg/hack/update-deps.sh index a39fc858fe..a998073f3c 100644 --- a/vendor/knative.dev/pkg/hack/update-deps.sh +++ b/vendor/knative.dev/pkg/hack/update-deps.sh @@ -26,7 +26,7 @@ cd ${ROOT_DIR} # The list of dependencies that we track at HEAD and periodically # float forward in this repository. FLOATING_DEPS=( - "knative.dev/test-infra@master" + "knative.dev/test-infra@release-0.18" ) # Parse flags to determine any we should pass to dep. diff --git a/vendor/knative.dev/pkg/logging/config.go b/vendor/knative.dev/pkg/logging/config.go index 65409032a6..2fbd235df9 100644 --- a/vendor/knative.dev/pkg/logging/config.go +++ b/vendor/knative.dev/pkg/logging/config.go @@ -240,7 +240,6 @@ func ConfigMapName() string { // JsonToLoggingConfig converts a json string of a Config. // Returns a non-nil Config always. -// nolint:stylecheck // No rename due to backwards incompatibility. func JsonToLoggingConfig(jsonCfg string) (*Config, error) { if jsonCfg == "" { return nil, errEmptyJSONLogginString @@ -260,7 +259,6 @@ func JsonToLoggingConfig(jsonCfg string) (*Config, error) { } // LoggingConfigToJson converts a Config to a json string. -// nolint:stylecheck // No rename due to backwards incompatibility. func LoggingConfigToJson(cfg *Config) (string, error) { if cfg == nil || cfg.LoggingConfig == "" { return "", nil diff --git a/vendor/knative.dev/pkg/logging/logkey/constants.go b/vendor/knative.dev/pkg/logging/logkey/constants.go index 9e1c4d81e1..e90abec975 100644 --- a/vendor/knative.dev/pkg/logging/logkey/constants.go +++ b/vendor/knative.dev/pkg/logging/logkey/constants.go @@ -23,8 +23,8 @@ const ( // Key is the key (namespace/name) being reconciled. Key = "knative.dev/key" - // TraceID is the key used to track an asynchronous or long running operation. - TraceID = "knative.dev/traceid" + // TraceId is the key used to track an asynchronous or long running operation. + TraceId = "knative.dev/traceid" // Namespace is the key used for namespace in structured logs Namespace = "knative.dev/namespace" diff --git a/vendor/knative.dev/pkg/metrics/config.go b/vendor/knative.dev/pkg/metrics/config.go index bb55d410b0..fdf3cb855a 100644 --- a/vendor/knative.dev/pkg/metrics/config.go +++ b/vendor/knative.dev/pkg/metrics/config.go @@ -346,7 +346,6 @@ func prometheusPort() (int, error) { // JsonToMetricsOptions converts a json string of a // ExporterOptions. Returns a non-nil ExporterOptions always. -// nolint:stylecheck // No rename due to backwards incompatibility. func JsonToMetricsOptions(jsonOpts string) (*ExporterOptions, error) { var opts ExporterOptions if jsonOpts == "" { @@ -361,7 +360,6 @@ func JsonToMetricsOptions(jsonOpts string) (*ExporterOptions, error) { } // MetricsOptionsToJson converts a ExporterOptions to a json string. -// nolint:stylecheck // No rename due to backwards incompatibility. func MetricsOptionsToJson(opts *ExporterOptions) (string, error) { if opts == nil { return "", nil diff --git a/vendor/knative.dev/pkg/metrics/metrics.go b/vendor/knative.dev/pkg/metrics/metrics.go index 5b53057ca6..cb69c01576 100644 --- a/vendor/knative.dev/pkg/metrics/metrics.go +++ b/vendor/knative.dev/pkg/metrics/metrics.go @@ -19,12 +19,12 @@ package metrics import ( "context" "net/url" + "sync/atomic" "time" "go.opencensus.io/stats" "go.opencensus.io/stats/view" "go.opencensus.io/tag" - "go.uber.org/atomic" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/metrics" "k8s.io/client-go/util/workqueue" @@ -67,20 +67,22 @@ func (m counterMetric) Inc() { type gaugeMetric struct { mutators []tag.Mutator measure *stats.Int64Measure - total atomic.Int64 + total int64 } -var _ workqueue.GaugeMetric = (*gaugeMetric)(nil) +var ( + _ workqueue.GaugeMetric = (*gaugeMetric)(nil) +) // Inc implements CounterMetric func (m *gaugeMetric) Inc() { - total := m.total.Inc() + total := atomic.AddInt64(&m.total, 1) Record(context.Background(), m.measure.M(total), stats.WithTags(m.mutators...)) } // Dec implements GaugeMetric func (m *gaugeMetric) Dec() { - total := m.total.Dec() + total := atomic.AddInt64(&m.total, -1) Record(context.Background(), m.measure.M(total), stats.WithTags(m.mutators...)) } @@ -110,7 +112,9 @@ type latencyMetric struct { measure *stats.Float64Measure } -var _ metrics.LatencyMetric = (*latencyMetric)(nil) +var ( + _ metrics.LatencyMetric = (*latencyMetric)(nil) +) // Observe implements LatencyMetric func (m latencyMetric) Observe(verb string, u url.URL, t time.Duration) { diff --git a/vendor/knative.dev/pkg/metrics/stackdriver_exporter.go b/vendor/knative.dev/pkg/metrics/stackdriver_exporter.go index e5e8e4756a..97487feb64 100644 --- a/vendor/knative.dev/pkg/metrics/stackdriver_exporter.go +++ b/vendor/knative.dev/pkg/metrics/stackdriver_exporter.go @@ -51,7 +51,7 @@ const ( // secretDataFieldKey is the name of the k8s Secret field that contains the Secret's key. secretDataFieldKey = "key.json" // stackdriverApiTimeout is the timeout value of Stackdriver API service side. - stackdriverAPITimeout = 12 * time.Second + stackdriverApiTimeout = 12 * time.Second ) var ( @@ -193,7 +193,7 @@ func newStackdriverExporter(config *metricsConfig, logger *zap.SugaredLogger) (v GetMetricPrefix: mpf, ReportingInterval: config.reportingPeriod, DefaultMonitoringLabels: &sd.Labels{}, - Timeout: stackdriverAPITimeout, + Timeout: stackdriverApiTimeout, BundleCountThreshold: TestOverrideBundleCount, }) if err != nil { @@ -291,7 +291,7 @@ func getStackdriverExporterClientOptions(config *metricsConfig) ([]option.Client // SetStackdriverSecretLocation must have been called by calling package for this to work. if config.stackdriverClientConfig.UseSecret { if config.secret == nil { - return co, fmt.Errorf("no secret provided for component %q; cannot use stackdriver-use-secret=true", config.component) + return co, fmt.Errorf("No secret provided for component %q; cannot use stackdriver-use-secret=true", config.component) } if opt, err := convertSecretToExporterOption(config.secret); err == nil { @@ -374,7 +374,7 @@ func convertSecretToExporterOption(secret *corev1.Secret) (option.ClientOption, if data, ok := secret.Data[secretDataFieldKey]; ok { return option.WithCredentialsJSON(data), nil } - return nil, fmt.Errorf("expected Secret to store key in data field named [%s]", secretDataFieldKey) + return nil, fmt.Errorf("Expected Secret to store key in data field named [%s]", secretDataFieldKey) } // ensureKubeclient is the lazy initializer for kubeclient. diff --git a/vendor/knative.dev/pkg/metrics/workqueue.go b/vendor/knative.dev/pkg/metrics/workqueue.go index 5b1188d1f1..80a29cdc44 100644 --- a/vendor/knative.dev/pkg/metrics/workqueue.go +++ b/vendor/knative.dev/pkg/metrics/workqueue.go @@ -35,7 +35,9 @@ type WorkqueueProvider struct { WorkDuration *stats.Float64Measure } -var _ workqueue.MetricsProvider = (*WorkqueueProvider)(nil) +var ( + _ workqueue.MetricsProvider = (*WorkqueueProvider)(nil) +) // NewAddsMetric implements MetricsProvider func (wp *WorkqueueProvider) NewAddsMetric(name string) workqueue.CounterMetric { diff --git a/vendor/knative.dev/pkg/reconciler/events.go b/vendor/knative.dev/pkg/reconciler/events.go index 6c635643b1..cc9ac7ebbb 100644 --- a/vendor/knative.dev/pkg/reconciler/events.go +++ b/vendor/knative.dev/pkg/reconciler/events.go @@ -24,7 +24,7 @@ import ( // Event leverages go's 1.13 error wrapping. type Event error -// EventIs reports whether any error in err's chain matches target. +// Is reports whether any error in err's chain matches target. // // The chain consists of err itself followed by the sequence of errors obtained by // repeatedly calling Unwrap. @@ -34,7 +34,7 @@ type Event error // (text from errors/wrap.go) var EventIs = errors.Is -// EventAs finds the first error in err's chain that matches target, and if so, sets +// As finds the first error in err's chain that matches target, and if so, sets // target to that error value and returns true. // // The chain consists of err itself followed by the sequence of errors obtained by diff --git a/vendor/knative.dev/pkg/reconciler/testing/hooks.go b/vendor/knative.dev/pkg/reconciler/testing/hooks.go index f60d6ebeda..cde3d7d21e 100644 --- a/vendor/knative.dev/pkg/reconciler/testing/hooks.go +++ b/vendor/knative.dev/pkg/reconciler/testing/hooks.go @@ -20,9 +20,9 @@ package testing import ( "errors" "sync" + "sync/atomic" "time" - "go.uber.org/atomic" "k8s.io/apimachinery/pkg/runtime" kubetesting "k8s.io/client-go/testing" ) @@ -80,7 +80,7 @@ that all hooks complete in a timely manner. */ type Hooks struct { completionCh chan int32 - completionIndex *atomic.Int32 + completionIndex int32 // Denotes whether or not the registered hooks should no longer be called // because they have already been waited upon. @@ -96,14 +96,14 @@ type Hooks struct { func NewHooks() *Hooks { return &Hooks{ completionCh: make(chan int32, 100), - completionIndex: atomic.NewInt32(-1), + completionIndex: -1, } } // OnCreate attaches a create hook to the given Fake. The hook function is // executed every time a resource of the given type is created. func (h *Hooks) OnCreate(fake *kubetesting.Fake, resource string, rf CreateHookFunc) { - index := h.completionIndex.Inc() + index := atomic.AddInt32(&h.completionIndex, 1) fake.PrependReactor("create", resource, func(a kubetesting.Action) (bool, runtime.Object, error) { obj := a.(kubetesting.CreateActionImpl).Object @@ -119,7 +119,7 @@ func (h *Hooks) OnCreate(fake *kubetesting.Fake, resource string, rf CreateHookF // OnUpdate attaches an update hook to the given Fake. The hook function is // executed every time a resource of the given type is updated. func (h *Hooks) OnUpdate(fake *kubetesting.Fake, resource string, rf UpdateHookFunc) { - index := h.completionIndex.Inc() + index := atomic.AddInt32(&h.completionIndex, 1) fake.PrependReactor("update", resource, func(a kubetesting.Action) (bool, runtime.Object, error) { obj := a.(kubetesting.UpdateActionImpl).Object @@ -135,7 +135,7 @@ func (h *Hooks) OnUpdate(fake *kubetesting.Fake, resource string, rf UpdateHookF // OnDelete attaches a delete hook to the given Fake. The hook function is // executed every time a resource of the given type is deleted. func (h *Hooks) OnDelete(fake *kubetesting.Fake, resource string, rf DeleteHookFunc) { - index := h.completionIndex.Inc() + index := atomic.AddInt32(&h.completionIndex, 1) fake.PrependReactor("delete", resource, func(a kubetesting.Action) (bool, runtime.Object, error) { name := a.(kubetesting.DeleteActionImpl).Name @@ -159,7 +159,7 @@ func (h *Hooks) WaitForHooks(timeout time.Duration) error { h.closed = true }() - ci := int(h.completionIndex.Load()) + ci := int(atomic.LoadInt32(&h.completionIndex)) if ci == -1 { return nil } @@ -173,7 +173,7 @@ func (h *Hooks) WaitForHooks(timeout time.Duration) error { case i := <-h.completionCh: hookCompletions[i] = HookComplete if len(hookCompletions) == ci { - h.completionIndex.Dec() + atomic.StoreInt32(&h.completionIndex, -1) return nil } case <-timer: diff --git a/vendor/knative.dev/pkg/test/logging/spew_encoder.go b/vendor/knative.dev/pkg/test/logging/spew_encoder.go index 38c83c8541..2ba5774c25 100644 --- a/vendor/knative.dev/pkg/test/logging/spew_encoder.go +++ b/vendor/knative.dev/pkg/test/logging/spew_encoder.go @@ -29,7 +29,7 @@ import ( "go.uber.org/zap" "go.uber.org/zap/buffer" - "go.uber.org/zap/zapcore" + . "go.uber.org/zap/zapcore" ) var ( @@ -42,7 +42,7 @@ var ( ) func init() { - zap.RegisterEncoder("spew", func(encoderConfig zapcore.EncoderConfig) (zapcore.Encoder, error) { + zap.RegisterEncoder("spew", func(encoderConfig EncoderConfig) (Encoder, error) { return NewSpewEncoder(encoderConfig), nil }) } @@ -54,21 +54,21 @@ func init() { // designed to make human-readable log only and get the most information to the user on any data type. // // Code is mostly from console_encoder.go in zapcore. -func NewSpewEncoder(cfg zapcore.EncoderConfig) *SpewEncoder { +func NewSpewEncoder(cfg EncoderConfig) *SpewEncoder { enc := SpewEncoder{} - enc.MapObjectEncoder = zapcore.NewMapObjectEncoder() + enc.MapObjectEncoder = NewMapObjectEncoder() enc.EncoderConfig = &cfg return &enc } // SpewEncoder implements zapcore.Encoder interface type SpewEncoder struct { - *zapcore.MapObjectEncoder - *zapcore.EncoderConfig + *MapObjectEncoder + *EncoderConfig } // Implements zapcore.Encoder interface -func (enc *SpewEncoder) Clone() zapcore.Encoder { +func (enc *SpewEncoder) Clone() Encoder { n := NewSpewEncoder(*(enc.EncoderConfig)) for k, v := range enc.Fields { n.Fields[k] = v @@ -86,7 +86,7 @@ func putSliceEncoder(e *sliceArrayEncoder) { } // Implements zapcore.Encoder interface. -func (enc *SpewEncoder) EncodeEntry(ent zapcore.Entry, fields []zapcore.Field) (*buffer.Buffer, error) { +func (enc *SpewEncoder) EncodeEntry(ent Entry, fields []Field) (*buffer.Buffer, error) { line := _pool.Get() // Could probably rewrite this portion and remove the copied @@ -106,7 +106,7 @@ func (enc *SpewEncoder) EncodeEntry(ent zapcore.Entry, fields []zapcore.Field) ( if nameEncoder == nil { // Fall back to FullNameEncoder for backward compatibility. - nameEncoder = zapcore.FullNameEncoder + nameEncoder = FullNameEncoder } nameEncoder(ent.LoggerName, arr) @@ -140,19 +140,19 @@ func (enc *SpewEncoder) EncodeEntry(ent zapcore.Entry, fields []zapcore.Field) ( if enc.LineEnding != "" { line.AppendString(enc.LineEnding) } else { - line.AppendString(zapcore.DefaultLineEnding) + line.AppendString(DefaultLineEnding) } return line, nil } -func (enc *SpewEncoder) writeContext(line *buffer.Buffer, extra []zapcore.Field) { +func (enc *SpewEncoder) writeContext(line *buffer.Buffer, extra []Field) { if len(extra) == 0 && len(enc.Fields) == 0 { return } // This could probably be more efficient, but .AddTo() is convenient - context := zapcore.NewMapObjectEncoder() + context := NewMapObjectEncoder() for k, v := range enc.Fields { context.Fields[k] = v } diff --git a/vendor/knative.dev/pkg/test/logging/tlogger.go b/vendor/knative.dev/pkg/test/logging/tlogger.go index 6f58f30144..c497d73843 100644 --- a/vendor/knative.dev/pkg/test/logging/tlogger.go +++ b/vendor/knative.dev/pkg/test/logging/tlogger.go @@ -160,7 +160,6 @@ func (o *TLogger) interfacesToFields(things ...interface{}) []interface{} { return fields } -// nolint:stylecheck // Returning the error first is okay and expected here. func (o *TLogger) errorWithRuntimeCheck(stringThenKeysAndValues ...interface{}) (error, string, []interface{}) { if len(stringThenKeysAndValues) == 0 { return nil, "", nil @@ -347,8 +346,8 @@ func (o *TLogger) cloneWithNewLogger(l *zap.Logger) *TLogger { // If any are errors, it fails the subtest. // Currently experimental and likely to be removed func (o *TLogger) Collect(key string, value interface{}) { - list, hasKey := o.errs[key] - if hasKey { + list, has_key := o.errs[key] + if has_key { list = append(list, value) } else { list = make([]interface{}, 1) diff --git a/vendor/knative.dev/pkg/test/zipkin/util.go b/vendor/knative.dev/pkg/test/zipkin/util.go index 6871c2f073..01ad465b50 100644 --- a/vendor/knative.dev/pkg/test/zipkin/util.go +++ b/vendor/knative.dev/pkg/test/zipkin/util.go @@ -117,7 +117,7 @@ func SetupZipkinTracingFromConfigTracingOrFail(ctx context.Context, t testing.TB func SetupZipkinTracing(ctx context.Context, kubeClientset *kubernetes.Clientset, logf logging.FormatLogger, zipkinRemotePort int, zipkinNamespace string) (err error) { setupOnce.Do(func() { if e := monitoring.CheckPortAvailability(zipkinRemotePort); e != nil { - err = fmt.Errorf("zipkin port not available on the machine: %w", err) + err = fmt.Errorf("Zipkin port not available on the machine: %w", err) return } diff --git a/vendor/knative.dev/pkg/tracing/config/tracing.go b/vendor/knative.dev/pkg/tracing/config/tracing.go index baa3377d1e..ecc2cc7cda 100644 --- a/vendor/knative.dev/pkg/tracing/config/tracing.go +++ b/vendor/knative.dev/pkg/tracing/config/tracing.go @@ -132,7 +132,6 @@ func NewTracingConfigFromConfigMap(config *corev1.ConfigMap) (*Config, error) { // JsonToTracingConfig converts a json string of a Config. // Returns a non-nil Config always and an eventual error. -// nolint:stylecheck // No rename due to backwards incompatibility. func JsonToTracingConfig(jsonCfg string) (*Config, error) { if jsonCfg == "" { return defaultConfig(), errors.New("empty json tracing config") @@ -151,7 +150,6 @@ func JsonToTracingConfig(jsonCfg string) (*Config, error) { } // TracingConfigToJson converts a Config to a json string. -// nolint:stylecheck // No rename due to backwards incompatibility. func TracingConfigToJson(cfg *Config) (string, error) { if cfg == nil { return "", nil diff --git a/vendor/knative.dev/test-infra/scripts/infra-library.sh b/vendor/knative.dev/test-infra/scripts/infra-library.sh index df71bb4538..a27934997b 100644 --- a/vendor/knative.dev/test-infra/scripts/infra-library.sh +++ b/vendor/knative.dev/test-infra/scripts/infra-library.sh @@ -85,7 +85,7 @@ function acquire_cluster_admin_role() { kubectl create clusterrolebinding cluster-admin-binding \ --clusterrole=cluster-admin --user="$(gcloud config get-value core/account)" else - kubectl create clusterrolebinding cluster-admin-binding \ + kubectl create clusterrolebinding cluster-admin-binding-"${USER}" \ --clusterrole=cluster-admin --user="${USER}" fi fi diff --git a/vendor/modules.txt b/vendor/modules.txt index 6c3ee94ba4..365126f6e3 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1027,7 +1027,7 @@ k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/pointer k8s.io/utils/trace -# knative.dev/eventing v0.17.1-0.20200929080328-74b9bed2ebf2 +# knative.dev/eventing v0.18.0 ## explicit knative.dev/eventing/pkg/apis/config knative.dev/eventing/pkg/apis/configs @@ -1146,7 +1146,7 @@ knative.dev/eventing/test/test_images/transformevents knative.dev/networking/pkg knative.dev/networking/pkg/apis/networking knative.dev/networking/pkg/apis/networking/v1alpha1 -# knative.dev/pkg v0.0.0-20200929052028-236c084e37a3 +# knative.dev/pkg v0.0.0-20200922164940-4bf40ad82aab ## explicit knative.dev/pkg/apiextensions/storageversion knative.dev/pkg/apiextensions/storageversion/cmd/migrate @@ -1258,7 +1258,7 @@ knative.dev/pkg/webhook/resourcesemantics knative.dev/pkg/webhook/resourcesemantics/conversion knative.dev/pkg/webhook/resourcesemantics/defaulting knative.dev/pkg/webhook/resourcesemantics/validation -# knative.dev/serving v0.17.1-0.20200929093229-7960ee24cc7b +# knative.dev/serving v0.17.1-0.20200929160229-0a890efa0030 ## explicit knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1 @@ -1298,7 +1298,7 @@ knative.dev/serving/pkg/client/listers/autoscaling/v1alpha1 knative.dev/serving/pkg/client/listers/serving/v1 knative.dev/serving/pkg/client/listers/serving/v1alpha1 knative.dev/serving/pkg/client/listers/serving/v1beta1 -# knative.dev/test-infra v0.0.0-20200928212629-45266e61aa32 +# knative.dev/test-infra v0.0.0-20200921012245-37f1a12adbd3 knative.dev/test-infra/scripts # sigs.k8s.io/structured-merge-diff/v3 v3.0.1-0.20200706213357-43c19bbb7fba sigs.k8s.io/structured-merge-diff/v3/value