Repository: knative-sandbox/eventing-kafka
Pull request #228 (2020-11-24 05:06:45)

Skipping a flaky test
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

Fixes #

<!-- Please include the 'why' behind your changes if no issue exists -->

## Proposed Changes

- skip a flaky test, to reduce noise 

<!--
If this change has user-visible impact, follow the instructions below.
Examples include:

- 🎁 Add new feature
- 🐛 Fix bug
- 🧽 Update or clean up current behavior
- 🗑️ Remove feature or internal logic

Otherwise delete the rest of this template.
-->

**Release Note**

<!--
🗒️ If this change has user-visible impact, write a release note in the block
below. Include the string "action required" if additional action is required of
users switching to the new release, for example in case of a breaking change.

Write as if you are speaking to users, not other Knative contributors. If this
change has no user-visible impact, no release-note is needed.
-->

```release-note

```

**Docs**

<!--
📖 If this change has user-visible impact, link to an issue or PR in
https://github.com/knative/docs.
-->


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/228#" 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: I found this issue: https://github.com/knative-sandbox/eventing-kafka/issues/218   from @pierDipi 

I'd like to skip the test for now @travis-minke-sap 
knative-metrics-robot: The following is the coverage report on the affected files.
Say `/test pull-knative-sandbox-eventing-kafka-go-coverage` to re-run this coverage report

File | Old Coverage | New Coverage | Delta
---- |:------------:|:------------:|:-----:
[pkg/channel/distributed/common/metrics/stats_reporter.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative-sandbox_eventing-kafka/228/pull-knative-sandbox-eventing-kafka-go-coverage/1331101943715598336/artifacts/line-cov.html#file0) | 75.0% | 12.5% | -62.5

codecov[bot]: # [Codecov](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/228?src=pr&el=h1) Report
> Merging [#228](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/228?src=pr&el=desc) (ec42d08) into [master](https://codecov.io/gh/knative-sandbox/eventing-kafka/commit/e71a1b1373574d96e9f951d7eb76eae8192ff466?el=desc) (e71a1b1) will **decrease** coverage by `0.42%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master     #228      +/-   ##
==========================================
- Coverage   75.99%   75.57%   -0.43%     
==========================================
  Files         112      112              
  Lines        4274     4274              
==========================================
- Hits         3248     3230      -18     
- Misses        831      850      +19     
+ Partials      195      194       -1     
```


| [Impacted Files](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/228?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...annel/distributed/common/metrics/stats\_reporter.go](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/228/diff?src=pr&el=tree#diff-cGtnL2NoYW5uZWwvZGlzdHJpYnV0ZWQvY29tbW9uL21ldHJpY3Mvc3RhdHNfcmVwb3J0ZXIuZ28=) | `25.00% <0.00%> (-45.84%)` | :arrow_down: |
| [...el/distributed/dispatcher/dispatcher/dispatcher.go](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/228/diff?src=pr&el=tree#diff-cGtnL2NoYW5uZWwvZGlzdHJpYnV0ZWQvZGlzcGF0Y2hlci9kaXNwYXRjaGVyL2Rpc3BhdGNoZXIuZ28=) | `68.08% <0.00%> (-7.45%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/228?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/228?src=pr&el=footer). Last update [e71a1b1...ec42d08](https://codecov.io/gh/knative-sandbox/eventing-kafka/pull/228?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

knative-prow-robot: @matzew: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-sandbox-eventing-kafka-go-coverage | ec42d08b6ad86e50269f37d130e59155303a0058 | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative-sandbox_eventing-kafka/228/pull-knative-sandbox-eventing-kafka-go-coverage/1331101943715598336) | `/test pull-knative-sandbox-eventing-kafka-go-coverage`

[Full PR test history](https://gubernator.knative.dev/pr/knative-sandbox_eventing-kafka/228). [Your PR dashboard](https://gubernator.knative.dev/pr/matzew).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->

Patch:
diff --git a/cmd/webhook/main.go b/cmd/webhook/main.go
index ef98e2976..6af200566 100644
--- a/cmd/webhook/main.go
+++ b/cmd/webhook/main.go
@@ -17,7 +17,6 @@ package main
 
 import (
 	channelwebhook "knative.dev/eventing-kafka/pkg/channel/webhook"
-	"knative.dev/eventing/pkg/logconfig"
 	"knative.dev/pkg/injection/sharedmain"
 	"knative.dev/pkg/signals"
 	"knative.dev/pkg/webhook"
@@ -33,7 +32,7 @@ func main() {
 
 	// Define Webhook Options
 	options := webhook.Options{
-		ServiceName: logconfig.WebhookName(),
+		ServiceName: webhook.NameFromEnv(),
 		Port:        webhook.PortFromEnv(8443),
 		SecretName:  Secret,
 	}
diff --git a/config/channel/distributed/300-eventing-kafka-configmap.yaml b/config/channel/distributed/300-eventing-kafka-configmap.yaml
index 6c106e3a7..f46fd7d7b 100644
--- a/config/channel/distributed/300-eventing-kafka-configmap.yaml
+++ b/config/channel/distributed/300-eventing-kafka-configmap.yaml
@@ -59,5 +59,5 @@ data:
       adminType: kafka # One of "kafka", "azure", "custom"
 kind: ConfigMap
 metadata:
-  name: config-eventing-kafka
+  name: config-kafka
   namespace: knative-eventing
diff --git a/pkg/channel/distributed/common/config/configwatcher.go b/pkg/channel/distributed/common/config/configwatcher.go
index aa2de8fb7..3cedada30 100644
--- a/pkg/channel/distributed/common/config/configwatcher.go
+++ b/pkg/channel/distributed/common/config/configwatcher.go
@@ -30,7 +30,7 @@ import (
 )
 
 // The EventingKafkaConfig and these EK sub-structs contain our custom configuration settings,
-// stored in the config-eventing-kafka configmap.  The sub-structs are explicitly declared so that they
+// stored in the config-kafka configmap.  The sub-structs are explicitly declared so that they
 // can have their own JSON tags in the overall EventingKafkaConfig
 type EKKubernetesConfig struct {
 	CpuLimit      resource.Quantity `json:"cpuLimit,omitempty"`
diff --git a/pkg/channel/distributed/common/config/constants.go b/pkg/channel/distributed/common/config/constants.go
index af53d434f..af2d7ad0c 100644
--- a/pkg/channel/distributed/common/config/constants.go
+++ b/pkg/channel/distributed/common/config/constants.go
@@ -19,7 +19,7 @@ package config
 // Package Constants
 const (
 	// The name of the configmap used to hold eventing-kafka settings
-	SettingsConfigMapName = "config-eventing-kafka"
+	SettingsConfigMapName = "config-kafka"
 	// The name of the keys in the Data section of the eventing-kafka configmap that holds Sarama and Eventing-Kafka configuration YAML
 	SaramaSettingsConfigKey        = "sarama"
 	EventingKafkaSettingsConfigKey = "eventing-kafka"
diff --git a/pkg/channel/distributed/common/kafka/sarama/sarama.go b/pkg/channel/distributed/common/kafka/sarama/sarama.go
index b66f148cb..6ebc55561 100644
--- a/pkg/channel/distributed/common/kafka/sarama/sarama.go
+++ b/pkg/channel/distributed/common/kafka/sarama/sarama.go
@@ -131,7 +131,7 @@ The following shows an example of the expected usage...
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: config-eventing-kafka
+  name: config-kafka
   namespace: knative-eventing
 data:
   sarama: |
diff --git a/vendor/knative.dev/eventing/pkg/logconfig/config.go b/vendor/knative.dev/eventing/pkg/logconfig/config.go
deleted file mode 100644
index 4678db8af..000000000
--- a/vendor/knative.dev/eventing/pkg/logconfig/config.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Copyright 2018 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 logconfig
-
-import (
-	"fmt"
-	"os"
-)
-
-const (
-	// Named Loggers are used to override the default log level. config-logging.yaml will use the follow:
-	//
-	// loglevel.controller: "info"
-	// loglevel.webhook: "info"
-
-	// Controller is the name of the override key used inside of the logging config for Controller.
-	Controller = "controller"
-
-	// Webhook is the name of the override key used inside of the logging config for Webhook Controller.
-	WebhookNameEnv = "WEBHOOK_NAME"
-)
-
-func WebhookName() string {
-	if webhook := os.Getenv(WebhookNameEnv); webhook != "" {
-		return webhook
-	}
-
-	panic(fmt.Sprintf(`The environment variable %q is not set
-
-If this is a process running on Kubernetes, then it should be using the downward
-API to initialize this variable via:
-
-  env:
-  - name: WEBHOOK_NAME
-    value: webhook
-`, WebhookNameEnv))
-}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 3b281c8e1..97578334d 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1167,7 +1167,6 @@ knative.dev/eventing/pkg/client/listers/sources/v1alpha2
 knative.dev/eventing/pkg/client/listers/sources/v1beta1
 knative.dev/eventing/pkg/client/listers/sources/v1beta2
 knative.dev/eventing/pkg/kncloudevents
-knative.dev/eventing/pkg/logconfig
 knative.dev/eventing/pkg/reconciler/source
 knative.dev/eventing/pkg/reconciler/sugar
 knative.dev/eventing/pkg/reconciler/testing


Test patch:
diff --git a/pkg/channel/distributed/common/metrics/stats_reporter_test.go b/pkg/channel/distributed/common/metrics/stats_reporter_test.go
index a9b9b0a64..cce90f6c9 100644
--- a/pkg/channel/distributed/common/metrics/stats_reporter_test.go
+++ b/pkg/channel/distributed/common/metrics/stats_reporter_test.go
@@ -44,6 +44,8 @@ import (
 
 // Test The MetricsServer's Report() Functionality
 func TestMetricsServer_Report(t *testing.T) {
+	// see https://github.com/knative-sandbox/eventing-kafka/issues/218
+	t.Skip("Flaky test, therefore skipping for now")
 
 	// Test Data
 	metricsPort := 9878
diff --git a/pkg/channel/distributed/common/testing/constants.go b/pkg/channel/distributed/common/testing/constants.go
index 2bfccd75e..4da092a7b 100644
--- a/pkg/channel/distributed/common/testing/constants.go
+++ b/pkg/channel/distributed/common/testing/constants.go
@@ -25,7 +25,7 @@ const (
 	NewPassword = "TestNewPassword"
 
 	KnativeEventingNamespace       = "knative-eventing"
-	SettingsConfigMapName          = "config-eventing-kafka"
+	SettingsConfigMapName          = "config-kafka"
 	SaramaSettingsConfigKey        = "sarama"
 	EventingKafkaSettingsConfigKey = "eventing-kafka"
 
diff --git a/test/e2e-tests.sh b/test/e2e-tests.sh
index 99e1052f1..aefa076f1 100755
--- a/test/e2e-tests.sh
+++ b/test/e2e-tests.sh
@@ -299,7 +299,7 @@ function install_distributed_channel_crds() {
   # Update The Kafka Secret With Strimzi Kafka Cluster Brokers (No Authentication)
   sed -i "s/brokers: \"\"/brokers: ${STRIMZI_KAFKA_CLUSTER_BROKERS_ENCODED}/" "${KAFKA_CRD_CONFIG_DIR}/${EVENTING_KAFKA_SECRET_TEMPLATE}"
 
-  # Update the config-eventing-kafka configmap to disable SASL/TLS for the tests
+  # Update the config-kafka configmap to disable SASL/TLS for the tests
   sed -i '/^ *TLS:/{n;s/true/false/};/^ *SASL:/{n;s/true/false/}' "${KAFKA_CRD_CONFIG_DIR}/${EVENTING_KAFKA_CONFIG_TEMPLATE}"
 
   # Install The eventing-kafka KafkaChannel Implementation