Repository: knative/pkg
Pull request #1612 (2020-08-12 07:32:12)

Add eventing-kafka-broker to released repositories

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

This pull-request has been approved by: *<a href="https://github.com/knative/pkg/pull/1612#" title="Author self-approved">pierDipi</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **vaikas**
You can assign the PR to them by writing `/assign @vaikas` in a comment when ready.

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

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

- **[OWNERS](https://github.com/knative/pkg/blob/master/OWNERS)**

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":["vaikas"]} -->
slinkydeveloper: /lgtm

So I suppose for this release @Harwayne is going to perform the release of eventing-kafka-broker, right?

Patch:
diff --git a/RELEASE-LEADS.md b/RELEASE-LEADS.md
index ee83b1c68..f3294ebe0 100644
--- a/RELEASE-LEADS.md
+++ b/RELEASE-LEADS.md
@@ -43,18 +43,18 @@ This roster is seeded with all approvers from Eventing workgroups.
 
 ## Schedule
 
-| Release | Release Date | Serving        | Eventing        | Unpin repos | PKG cut      |
-|---------|--------------|----------------|-----------------|-------------|--------------|
-| v0.17   | 2020-08-18   | yanweiguo      | Harwayne        | -           | 2020-08-11   |
-| v0.18   | 2020-09-29   | ZhiminXiang    | n3wscott        | 2020-08-19  | 2020-09-22   |
-| v0.19   | 2020-11-10   | julz           | nachocano       | 2020-09-30  | 2020-11-03   |
-| v0.20   | 2020-12-22   | nak3           | slinkydeveloper | 2020-11-11  | 2020-12-15   |
-| v0.21   | 2021-02-02   | mattmoor       | lionelvillard   | 2020-12-23  | 2021-01-26   |
-| v0.22   | 2021-03-16   | markusthoemmes | evankanderson   | 2020-02-03  | 2021-03-09   |
-| v0.23   | 2021-04-27   | tcnghia        | vaikas          | 2020-03-17  | 2021-04-20   |
-| v0.24   | 2021-06-08   | dprotaso       | matzew          | 2020-04-28  | 2021-06-01   |
-| v0.25   | 2021-07-20   | vagababov      | grantr          | 2020-06-09  | 2021-07-13   |
-| v0.26   | 2021-08-31   | JRBANCEL       | ...             | 2020-07-21  | 2021-08-24   |
+| Release | Release Date | Serving        | Eventing        | Unpin repos | PKG cut    |
+| ------- | ------------ | -------------- | --------------- | ----------- | ---------- |
+| v0.17   | 2020-08-18   | yanweiguo      | Harwayne        | -           | 2020-08-11 |
+| v0.18   | 2020-09-29   | ZhiminXiang    | n3wscott        | 2020-08-19  | 2020-09-22 |
+| v0.19   | 2020-11-10   | julz           | nachocano       | 2020-09-30  | 2020-11-03 |
+| v0.20   | 2020-12-22   | nak3           | slinkydeveloper | 2020-11-11  | 2020-12-15 |
+| v0.21   | 2021-02-02   | mattmoor       | lionelvillard   | 2020-12-23  | 2021-01-26 |
+| v0.22   | 2021-03-16   | markusthoemmes | evankanderson   | 2020-02-03  | 2021-03-09 |
+| v0.23   | 2021-04-27   | tcnghia        | vaikas          | 2020-03-17  | 2021-04-20 |
+| v0.24   | 2021-06-08   | dprotaso       | matzew          | 2020-04-28  | 2021-06-01 |
+| v0.25   | 2021-07-20   | vagababov      | grantr          | 2020-06-09  | 2021-07-13 |
+| v0.26   | 2021-08-31   | JRBANCEL       | ...             | 2020-07-21  | 2021-08-24 |
 
 # Release instruction
 
@@ -64,33 +64,36 @@ release.
 
 ## First week of the rotation
 
-###  Make sure you have the right permission
+### Make sure you have the right permission
 
 Check to make sure you already are in the "Knative Release Leads" team in
 https://github.com/knative/community/blob/master/peribolos/knative.yaml and
 https://github.com/knative/community/blob/master/peribolos/knative-sandbox.yaml
-. If not, send a PR like [this
-one](https://github.com/knative/community/pull/209) to grant yourself some super
-power.
+. If not, send a PR like
+[this one](https://github.com/knative/community/pull/209) to grant yourself some
+super power.
 
 ### Revert all pins to pin master branches again
 
 Revert all pins in all repositories to pin the **master** branches again, run
 `hack/update-deps.sh --upgrade` and PR the changes.
 
-You should only need to do this for `knative/{serving,eventing-contrib,eventing}` and `knative-sandbox/net-{istio,contour,kourier,http01,certmanager}`. However, you may want to double check `knative/{pkg,caching,networking}` as well in case the previous release leads missed a step during their last rotation.
+You should only need to do this for
+`knative/{serving,eventing-contrib,eventing}` and
+`knative-sandbox/net-{istio,contour,kourier,http01,certmanager}`. However, you
+may want to double check `knative/{pkg,caching,networking}` as well in case the
+previous release leads missed a step during their last rotation.
 
 Example PRs:
 
-* [knative/serving](https://github.com/knative/serving/pull/8579)
-* [knative/eventing](https://github.com/knative/eventing/pull/3546)
-* [knative/eventing-contrib](https://github.com/knative/eventing-contrib/pull/1272)
-* [knative-sandbox/net-istio](https://github.com/knative-sandbox/net-istio/pull/172)
-* [knative-sandbox/net-contour](https://github.com/knative-sandbox/net-contour/pull/154)
-* [knative-sandbox/net-kourier](https://github.com/knative-sandbox/net-kourier/pull/84)
-* [knative-sandbox/net-http01](https://github.com/knative-sandbox/net-http01/pull/42)
-* [knative-sandbox/net-certmanager](https://github.com/knative-sandbox/net-certmanager/pull/39)
-
+- [knative/serving](https://github.com/knative/serving/pull/8579)
+- [knative/eventing](https://github.com/knative/eventing/pull/3546)
+- [knative/eventing-contrib](https://github.com/knative/eventing-contrib/pull/1272)
+- [knative-sandbox/net-istio](https://github.com/knative-sandbox/net-istio/pull/172)
+- [knative-sandbox/net-contour](https://github.com/knative-sandbox/net-contour/pull/154)
+- [knative-sandbox/net-kourier](https://github.com/knative-sandbox/net-kourier/pull/84)
+- [knative-sandbox/net-http01](https://github.com/knative-sandbox/net-http01/pull/42)
+- [knative-sandbox/net-certmanager](https://github.com/knative-sandbox/net-certmanager/pull/39)
 
 ## 14 days prior to the release
 
@@ -183,6 +186,7 @@ The downstream repositories this needs to happen on are:
 - [knative/client](https://github.com/knative/client)
 - [knative/eventing-contrib](https://github.com/knative/eventing-contrib)
 - [knative/eventing](https://github.com/knative/eventing)
+- [knative-sandbox/eventing-kafka-broker](https://github.com/knative-sandbox/eventing-kafka-broker)
 - [knative-sandbox/net-certmanager](https://github.com/knative-sandbox/net-certmanager)
 - [knative-sandbox/net-contour](https://github.com/knative-sandbox/net-contour)
 - [knative-sandbox/net-http01](https://github.com/knative-sandbox/net-http01)
@@ -240,6 +244,7 @@ For **serving** that is:
 For **eventing** that is:
 
 - [knative/eventing-contrib](https://github.com/knative/eventing-contrib)
+- [knative-sandbox/eventing-kafka-broker](https://github.com/knative-sandbox/eventing-kafka-broker)
 
 The pins are similar to step 5 above, but now we're pinning `serving` and
 `eventing` respectively. Again, the pin PRs are sent against the **master**
@@ -256,6 +261,7 @@ remaining repositories (except `operator`):
 - [knative-sandbox/net-istio](https://github.com/knative-sandbox/net-istio)
 - [knative-sandbox/net-kourier](https://github.com/knative-sandbox/net-kourier)
 - [knative/eventing-contrib](https://github.com/knative/eventing-contrib)
+- [knative-sandbox/eventing-kafka-broker](https://github.com/knative-sandbox/eventing-kafka-broker)
 
 Release automation will automatically pick up the branches and will likewise
 create the respective tags.
@@ -263,7 +269,7 @@ create the respective tags.
 ## Right after the release
 
 Send a PR like [this one](https://github.com/knative/community/pull/209) to
-grant ACLs for the next release leads, and to remove yourself from the
-rotation. Include the next release leads in the PR as a reminder.
+grant ACLs for the next release leads, and to remove yourself from the rotation.
+Include the next release leads in the PR as a reminder.
 
 ---
diff --git a/go.mod b/go.mod
index 6264e7108..bd03a3082 100644
--- a/go.mod
+++ b/go.mod
@@ -52,7 +52,7 @@ require (
 	k8s.io/code-generator v0.18.6
 	k8s.io/gengo v0.0.0-20200205140755-e0e292d8aa12
 	k8s.io/klog v1.0.0
-	knative.dev/test-infra v0.0.0-20200811030605-72f8c9f3e933
+	knative.dev/test-infra v0.0.0-20200813220306-af5517f4f576
 	sigs.k8s.io/boskos v0.0.0-20200729174948-794df80db9c9
 )
 
diff --git a/go.sum b/go.sum
index 21eb0212a..f5d402238 100644
--- a/go.sum
+++ b/go.sum
@@ -1836,8 +1836,8 @@ knative.dev/test-infra v0.0.0-20200505052144-5ea2f705bb55/go.mod h1:WqF1Azka+FxP
 knative.dev/test-infra v0.0.0-20200513011557-d03429a76034/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE=
 knative.dev/test-infra v0.0.0-20200519015156-82551620b0a9/go.mod h1:A5b2OAXTOeHT3hHhVQm3dmtbuWvIDP7qzgtqxA3/2pE=
 knative.dev/test-infra v0.0.0-20200707183444-aed09e56ddc7/go.mod h1:RjYAhXnZqeHw9+B0zsbqSPlae0lCvjekO/nw5ZMpLCs=
-knative.dev/test-infra v0.0.0-20200811030605-72f8c9f3e933 h1:1nfmLI9iQ87ygMeKGLREhH+2KYa6XX/e6enu0PsasHY=
-knative.dev/test-infra v0.0.0-20200811030605-72f8c9f3e933/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc=
+knative.dev/test-infra v0.0.0-20200813220306-af5517f4f576 h1:gsZMM8J2MA3iTSMOt5MTMt84y6H5PkIFMmUakqqogJ0=
+knative.dev/test-infra v0.0.0-20200813220306-af5517f4f576/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc=
 modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
 modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
 modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
diff --git a/hash/bucketer.go b/hash/bucketer.go
index d0c1460a8..41d26d97c 100644
--- a/hash/bucketer.go
+++ b/hash/bucketer.go
@@ -111,6 +111,11 @@ func (bs *BucketSet) Owner(key string) string {
 	return ret
 }
 
+// HasBucket returns true if this BucketSet has the given bucket name.
+func (bs *BucketSet) HasBucket(bkt string) bool {
+	return bs.buckets.Has(bkt)
+}
+
 // BucketList returns the bucket names of this BucketSet in random order.
 func (bs *BucketSet) BucketList() []string {
 	bs.mu.RLock()
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 3aef976a9..4b39efd6f 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -997,7 +997,7 @@ k8s.io/utils/buffer
 k8s.io/utils/integer
 k8s.io/utils/pointer
 k8s.io/utils/trace
-# knative.dev/test-infra v0.0.0-20200811030605-72f8c9f3e933
+# knative.dev/test-infra v0.0.0-20200813220306-af5517f4f576
 ## explicit
 knative.dev/test-infra/scripts
 # sigs.k8s.io/boskos v0.0.0-20200729174948-794df80db9c9


Test patch:
diff --git a/hash/bucketer_test.go b/hash/bucketer_test.go
index 18497a087..8181175f2 100644
--- a/hash/bucketer_test.go
+++ b/hash/bucketer_test.go
@@ -118,6 +118,16 @@ func TestBucketSetBuckets(t *testing.T) {
 	}
 }
 
+func TestBucketSetHasBucket(t *testing.T) {
+	bs := NewBucketSet(sets.NewString(thisBucket, "aguacero", "chaparrón"))
+	if !bs.HasBucket(thisBucket) {
+		t.Errorf("HasBucket(%v) = false", thisBucket)
+	}
+	if bs.HasBucket(otherBucket) {
+		t.Errorf("HasBucket(%v) = true", otherBucket)
+	}
+}
+
 func TestBucketHas(t *testing.T) {
 	bs := NewBucketSet(buckets)
 	b := Bucket{
diff --git a/test/logstream/README.md b/test/logstream/README.md
new file mode 100644
index 000000000..6ebba429f
--- /dev/null
+++ b/test/logstream/README.md
@@ -0,0 +1,38 @@
+# How to use logstream
+
+This is a guide to start using `logstream` in your e2e testing.
+
+## Requirements
+
+1. The `SYSTEM_NAMESPACE` environment variable must be configured.  Many of the
+  knative test scripts already define this, and in some places (e.g. serving)
+  randomize it.  However, to facilitate usage outside of CI, you should consider
+  including a package like [this](https://github.com/knative/serving/blob/master/test/defaultsystem/system.go)
+  and linking it like [this](https://github.com/knative/serving/blob/e797247322b5aa35001152d2a2715dbc20a86cc4/test/conformance.go#L20-L23)
+
+
+2. Test resources must be named with [`test.ObjectNameForTest(t)`](https://github.com/knative/networking/blob/40ef99aa5db0d38730a89a1de7e5b28b8ef6eed5/vendor/knative.dev/pkg/test/helpers/name.go#L50)
+
+
+3. At the start of your test add: `t.Cleanup(logstream.Start(t))`
+
+
+With that, you will start getting logs from the processes in the system namespace interleaved into your test output via `t.Log`.
+
+
+## How it works
+
+In Knative we use `zap.Logger` for all of our logging, and most of those loggers (e.g. in the context of a reconcile) have been decorated with the "key" of the resource being processed.  `logstream` simply decodes these structured log messages and when the `key` matches the naming prefix that `ObjectNameForTest` uses, it includes it into the test's output.
+
+
+## Integrating in Libraries.
+
+When a shared component is set up and called from reconciliation, it may have it's own logger.  If that component is dealing with individual resources, it can scope individual log statements to that resource by decorating the logger with its key like so:
+
+```
+logger := logger.With(zap.String(logkey.Key, resourceKey))
+```
+
+Now, any log statements that the library prints through this logger will appear in the logstream!
+
+For an example of this pattern, see [the knative/networking prober library](https://github.com/knative/networking/blob/master/pkg/status/status.go).
\ No newline at end of file
diff --git a/test/logstream/kubelogs.go b/test/logstream/kubelogs.go
index 3a0f7b70f..137965345 100644
--- a/test/logstream/kubelogs.go
+++ b/test/logstream/kubelogs.go
@@ -41,7 +41,6 @@ type kubelogs struct {
 	once sync.Once
 	m    sync.RWMutex
 	keys map[string]logger
-	err  error
 }
 
 type logger func(string, ...interface{})
@@ -78,11 +77,7 @@ func (k *kubelogs) startForPod(pod *corev1.Pod) {
 			req := k.kc.Kube.CoreV1().Pods(psn).GetLogs(pn, options)
 			stream, err := req.Stream()
 			if err != nil {
-				func() {
-					k.m.Lock()
-					defer k.m.Unlock()
-					k.err = err
-				}()
+				k.handleGenericLine([]byte(err.Error()), pn)
 				return
 			}
 			defer stream.Close()
@@ -231,9 +226,5 @@ func (k *kubelogs) Start(t test.TLegacy) Canceler {
 		k.m.Lock()
 		defer k.m.Unlock()
 		delete(k.keys, name)
-
-		if k.err != nil {
-			t.Error("Error during logstream", "error", k.err)
-		}
 	}
 }
diff --git a/vendor/knative.dev/test-infra/scripts/e2e-tests.sh b/vendor/knative.dev/test-infra/scripts/e2e-tests.sh
index 25de3b4d5..a788b6827 100644
--- a/vendor/knative.dev/test-infra/scripts/e2e-tests.sh
+++ b/vendor/knative.dev/test-infra/scripts/e2e-tests.sh
@@ -185,6 +185,7 @@ function create_test_cluster() {
     "--cluster-name=${E2E_CLUSTER_NAME}"
     "--num-nodes=${E2E_MIN_CLUSTER_NODES}"
     "--machine-type=${E2E_CLUSTER_MACHINE}"
+    "--network=${E2E_NETWORK_NAME}"
     --up
   )
   if (( ! IS_BOSKOS )); then
@@ -220,7 +221,7 @@ function create_test_cluster() {
 
   # Create cluster and run the tests
   create_test_cluster_with_retries "${E2E_SCRIPT} ${test_cmd_args}" \
-    "${CLUSTER_CREATION_ARGS[@]}" "${extra_flags[@]}"
+    "${CLUSTER_CREATION_ARGS[@]}" "${extra_flags[@]}" "${EXTRA_KUBETEST2_FLAGS[@]}"
   local result="$?"
   # Ignore any errors below, this is a best-effort cleanup and shouldn't affect the test result.
   set +o errexit
@@ -377,6 +378,7 @@ E2E_SCRIPT=""
 E2E_CLUSTER_VERSION="latest"
 GKE_ADDONS=""
 EXTRA_CLUSTER_CREATION_FLAGS=()
+EXTRA_KUBETEST2_FLAGS=()
 E2E_SCRIPT_CUSTOM_FLAGS=()
 
 # Parse flags and initialize the test cluster.
@@ -413,6 +415,7 @@ function initialize() {
           --gcp-project) GCP_PROJECT=$1 ;;
           --cluster-version) E2E_CLUSTER_VERSION=$1 ;;
           --cluster-creation-flag) EXTRA_CLUSTER_CREATION_FLAGS+=("$1") ;;
+          --kubetest2-flag) EXTRA_KUBETEST2_FLAGS+=("$1") ;;
           *) abort "unknown option ${parameter}" ;;
         esac
     esac
@@ -430,12 +433,17 @@ function initialize() {
 
   (( IS_PROW )) && [[ -z "${GCP_PROJECT}" ]] && IS_BOSKOS=1
 
-  (( SKIP_ISTIO_ADDON )) || GKE_ADDONS="--addons=Istio"
+  if (( SKIP_ISTIO_ADDON )); then
+    GKE_ADDONS="--addons=NodeLocalDNS"
+  else
+    GKE_ADDONS="--addons=Istio,NodeLocalDNS"
+  fi
 
   readonly RUN_TESTS
   readonly GCP_PROJECT
   readonly IS_BOSKOS
   readonly EXTRA_CLUSTER_CREATION_FLAGS
+  readonly EXTRA_KUBETEST2_FLAGS
   readonly SKIP_KNATIVE_SETUP
   readonly SKIP_TEARDOWNS
   readonly GKE_ADDONS
diff --git a/vendor/knative.dev/test-infra/scripts/library.sh b/vendor/knative.dev/test-infra/scripts/library.sh
index 251a9c89f..1267f7986 100644
--- a/vendor/knative.dev/test-infra/scripts/library.sh
+++ b/vendor/knative.dev/test-infra/scripts/library.sh
@@ -408,7 +408,7 @@ function report_go_test() {
   json="$(mktemp_with_extension "${ARTIFACTS}"/json_XXXXXXXX json)"
   echo "Running go test with args: ${go_test_args[*]}"
   # TODO(chizhg): change to `--format testname`?
-  capture_output "${report}" gotestsum --format standard-verbose \
+  capture_output "${report}" gotestsum --format "${GO_TEST_VERBOSITY:-standard-verbose}" \
     --junitfile "${xml}" --junitfile-testsuite-name relative --junitfile-testcase-classname relative \
     --jsonfile "${json}" \
     -- "${go_test_args[@]}"