Repository: knative-sandbox/eventing-kafka
Pull request #149 (2020-10-28 08:28:00)

Updates to latest
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

running:

```
./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh 

```


knative-prow-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative-sandbox/eventing-kafka/pull/149#" title="Author self-approved">matzew</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=knative-sandbox%2Feventing-kafka).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/knative-sandbox/eventing-kafka/blob/master/OWNERS)~~ [matzew]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
matzew: /assign @pierDipi @slinkydeveloper 
codecov[bot]: # [Codecov](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/149?src=pr&el=h1) Report
> Merging [#149](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/149?src=pr&el=desc) into [master](https://codecov.io/gh/knative-sandbox/eventing-kafka/commit/f2192431c8e7369120e547ac7aea5295e140ac98?el=desc) will **increase** coverage by `0.05%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/149/graphs/tree.svg?width=650&height=150&src=pr&token=W765CT93QC)](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/149?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master     #149      +/-   ##
==========================================
+ Coverage   75.21%   75.26%   +0.05%     
==========================================
  Files         111      111              
  Lines        3991     3991              
==========================================
+ Hits         3002     3004       +2     
+ Misses        806      805       -1     
+ Partials      183      182       -1     
```


| [Impacted Files](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/149?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...tributed/common/kafka/admin/eventhubcache/cache.go](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/149/diff?src=pr&el=tree#diff-cGtnL2NoYW5uZWwvZGlzdHJpYnV0ZWQvY29tbW9uL2thZmthL2FkbWluL2V2ZW50aHViY2FjaGUvY2FjaGUuZ28=) | `67.46% <0.00%> (+2.40%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/149?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/149?src=pr&el=footer). Last update [f219243...b761c2b](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/149?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/go.mod b/go.mod
index 3a46ccbe8..7e43b1cde 100644
--- a/go.mod
+++ b/go.mod
@@ -33,9 +33,9 @@ require (
 	k8s.io/apimachinery v0.18.8
 	k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
 	k8s.io/utils v0.0.0-20200603063816-c1c6865ac451
-	knative.dev/eventing v0.18.1-0.20201027234734-7ba58ca471c0
+	knative.dev/eventing v0.18.1-0.20201028080734-4cc2383cc70f
 	knative.dev/hack v0.0.0-20201027221733-0d7f2f064b7b
-	knative.dev/pkg v0.0.0-20201028000034-e39bfc4544a8
+	knative.dev/pkg v0.0.0-20201028051934-55f46ef531b4
 )
 
 replace (
diff --git a/go.sum b/go.sum
index 76927c12c..625247f7d 100644
--- a/go.sum
+++ b/go.sum
@@ -2048,8 +2048,8 @@ k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 h1:v8ud2Up6QK1lNOKFgiIVrZdMg7Mpm
 k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 knative.dev/caching v0.0.0-20190719140829-2032732871ff/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
 knative.dev/caching v0.0.0-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
-knative.dev/eventing v0.18.1-0.20201027234734-7ba58ca471c0 h1:YHGdn1t8SarClmhQNVbZ0aOuLEFUf6FX4794esSgV4w=
-knative.dev/eventing v0.18.1-0.20201027234734-7ba58ca471c0/go.mod h1:ZZaTVSV8CSlztDvrOQnbKPCd1jSe1RhpaSCqSiEpq4g=
+knative.dev/eventing v0.18.1-0.20201028080734-4cc2383cc70f h1:QSAgTpHadqnVIzqmuADqy2vqKzBMpv9Dyq4Zx2kAj+g=
+knative.dev/eventing v0.18.1-0.20201028080734-4cc2383cc70f/go.mod h1:ZZaTVSV8CSlztDvrOQnbKPCd1jSe1RhpaSCqSiEpq4g=
 knative.dev/eventing-contrib v0.6.1-0.20190723221543-5ce18048c08b/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
 knative.dev/eventing-contrib v0.11.2/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
 knative.dev/hack v0.0.0-20201027201633-1763a666eb41/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
@@ -2064,8 +2064,8 @@ knative.dev/pkg v0.0.0-20200515002500-16d7b963416f/go.mod h1:tMOHGbxtRz8zYFGEGpV
 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-20201027223833-826303ca0653/go.mod h1:QE0oLfNTKMOrbh5kpt8O58nDxbvEvz3t6R8xTdaWZrg=
-knative.dev/pkg v0.0.0-20201028000034-e39bfc4544a8 h1:Ib2LZMawsK2SfjK/f5TZYAh7K6tjvL/2NkHj26sfm5c=
-knative.dev/pkg v0.0.0-20201028000034-e39bfc4544a8/go.mod h1:QE0oLfNTKMOrbh5kpt8O58nDxbvEvz3t6R8xTdaWZrg=
+knative.dev/pkg v0.0.0-20201028051934-55f46ef531b4 h1:pbpTYCu6LlZpoQwFi3fh/T5eMjS9WV4Mxn+q+Nq57+s=
+knative.dev/pkg v0.0.0-20201028051934-55f46ef531b4/go.mod h1:QE0oLfNTKMOrbh5kpt8O58nDxbvEvz3t6R8xTdaWZrg=
 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=
diff --git a/pkg/apis/bindings/v1beta1/fuzzer.go b/pkg/apis/bindings/v1beta1/fuzzer.go
new file mode 100644
index 000000000..f6ff68a2c
--- /dev/null
+++ b/pkg/apis/bindings/v1beta1/fuzzer.go
@@ -0,0 +1,45 @@
+/*
+Copyright 2020 The Knative Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+	fuzz "github.com/google/gofuzz"
+	"k8s.io/apimachinery/pkg/api/apitesting/fuzzer"
+	"k8s.io/apimachinery/pkg/runtime/serializer"
+	pkgfuzzer "knative.dev/pkg/apis/testing/fuzzer"
+)
+
+// FuzzerFuncs includes fuzzing funcs for bindings.knative.dev v1beta1 types
+//
+// For other examples see
+// https://github.com/kubernetes/apimachinery/blob/master/pkg/apis/meta/fuzzer/fuzzer.go
+var FuzzerFuncs = fuzzer.MergeFuzzerFuncs(
+	func(codecs serializer.CodecFactory) []interface{} {
+		return []interface{}{
+			func(s *KafkaBindingStatus, c fuzz.Continue) {
+				c.FuzzNoCustom(s) // fuzz the status object
+
+				// Clear the random fuzzed condition
+				s.Status.SetConditions(nil)
+
+				// Fuzz the known conditions except their type value
+				s.InitializeConditions()
+				pkgfuzzer.FuzzConditions(&s.Status, c)
+			},
+		}
+	},
+)
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/source/config_watcher.go b/vendor/knative.dev/eventing/pkg/reconciler/source/config_watcher.go
index d25d6b103..56302213a 100644
--- a/vendor/knative.dev/eventing/pkg/reconciler/source/config_watcher.go
+++ b/vendor/knative.dev/eventing/pkg/reconciler/source/config_watcher.go
@@ -256,7 +256,9 @@ func (cw *ConfigWatcher) tracingConfigEnvVar() corev1.EnvVar {
 }
 
 // EmptyVarsGenerator generates empty env vars. Intended to be used in tests.
-type EmptyVarsGenerator struct{}
+type EmptyVarsGenerator struct {
+	ConfigAccessor
+}
 
 var _ ConfigAccessor = (*EmptyVarsGenerator)(nil)
 
@@ -267,15 +269,3 @@ func (g *EmptyVarsGenerator) ToEnvVars() []corev1.EnvVar {
 		{Name: EnvTracingCfg},
 	}
 }
-
-func (*EmptyVarsGenerator) LoggingConfig() *logging.Config {
-	return nil
-}
-
-func (*EmptyVarsGenerator) MetricsConfig() *metrics.ExporterOptions {
-	return nil
-}
-
-func (*EmptyVarsGenerator) TracingConfig() *tracingconfig.Config {
-	return nil
-}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 76d07a2d6..ce0d49b74 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1068,7 +1068,7 @@ k8s.io/utils/buffer
 k8s.io/utils/integer
 k8s.io/utils/pointer
 k8s.io/utils/trace
-# knative.dev/eventing v0.18.1-0.20201027234734-7ba58ca471c0
+# knative.dev/eventing v0.18.1-0.20201028080734-4cc2383cc70f
 ## explicit
 knative.dev/eventing/pkg/adapter/v2
 knative.dev/eventing/pkg/adapter/v2/util/crstatusevent
@@ -1198,7 +1198,7 @@ knative.dev/eventing/test/test_images/recordevents
 # knative.dev/hack v0.0.0-20201027221733-0d7f2f064b7b
 ## explicit
 knative.dev/hack
-# knative.dev/pkg v0.0.0-20201028000034-e39bfc4544a8
+# knative.dev/pkg v0.0.0-20201028051934-55f46ef531b4
 ## explicit
 knative.dev/pkg/apis
 knative.dev/pkg/apis/duck


Test patch:
diff --git a/pkg/apis/bindings/v1alpha1/roundtrip_test.go b/pkg/apis/bindings/v1alpha1/roundtrip_test.go
new file mode 100644
index 000000000..e7d6da0c0
--- /dev/null
+++ b/pkg/apis/bindings/v1alpha1/roundtrip_test.go
@@ -0,0 +1,63 @@
+/*
+Copyright 2020 The Knative Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+	"testing"
+
+	"k8s.io/apimachinery/pkg/api/apitesting/fuzzer"
+	"k8s.io/apimachinery/pkg/runtime"
+	utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+	pkgfuzzer "knative.dev/pkg/apis/testing/fuzzer"
+	"knative.dev/pkg/apis/testing/roundtrip"
+
+	"knative.dev/eventing-kafka/pkg/apis/bindings/v1beta1"
+)
+
+func TestBindingsRoundTripTypesToJSON(t *testing.T) {
+	scheme := runtime.NewScheme()
+	utilruntime.Must(AddToScheme(scheme))
+
+	fuzzerFuncs := fuzzer.MergeFuzzerFuncs(
+		pkgfuzzer.Funcs,
+		v1beta1.FuzzerFuncs,
+	)
+	roundtrip.ExternalTypesViaJSON(t, scheme, fuzzerFuncs)
+}
+
+func TestBindingsRoundTripTypesToAlphaHub(t *testing.T) {
+	scheme := runtime.NewScheme()
+
+	sb := runtime.SchemeBuilder{
+		AddToScheme,
+		v1beta1.AddToScheme,
+	}
+
+	utilruntime.Must(sb.AddToScheme(scheme))
+
+	hubs := runtime.NewScheme()
+	hubs.AddKnownTypes(SchemeGroupVersion,
+		&KafkaBinding{},
+	)
+
+	fuzzerFuncs := fuzzer.MergeFuzzerFuncs(
+		pkgfuzzer.Funcs,
+		v1beta1.FuzzerFuncs,
+	)
+
+	roundtrip.ExternalTypesViaHub(t, scheme, hubs, fuzzerFuncs)
+}
diff --git a/pkg/apis/bindings/v1beta1/roundtrip_test.go b/pkg/apis/bindings/v1beta1/roundtrip_test.go
new file mode 100644
index 000000000..fcddbc505
--- /dev/null
+++ b/pkg/apis/bindings/v1beta1/roundtrip_test.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2020 The Knative Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+	"testing"
+
+	"k8s.io/apimachinery/pkg/api/apitesting/fuzzer"
+	"k8s.io/apimachinery/pkg/runtime"
+	utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+	pkgfuzzer "knative.dev/pkg/apis/testing/fuzzer"
+	"knative.dev/pkg/apis/testing/roundtrip"
+)
+
+func TestBindingRoundTripTypesToJSON(t *testing.T) {
+	scheme := runtime.NewScheme()
+	utilruntime.Must(AddToScheme(scheme))
+
+	fuzzerFuncs := fuzzer.MergeFuzzerFuncs(
+		pkgfuzzer.Funcs,
+		FuzzerFuncs,
+	)
+	roundtrip.ExternalTypesViaJSON(t, scheme, fuzzerFuncs)
+}