Repository: knative-sandbox/eventing-kafka-broker
Pull request #1038 (2021-06-24 09:20:58)

[main] Upgrade to latest dependencies
Cron -knative-prow-robot

/cc knative-sandbox/channel-wg-leads
/assign knative-sandbox/channel-wg-leads

Produced by: knative-sandbox/knobots/actions/update-deps

Details:
```
bumping knative.dev/eventing 0cb7873...2fcbc0a:
  > 2fcbc0a Glue Delivery.Timeout to RetryConfig.RequestTimeout (# 5507)
  > d69382b upgrade to latest dependencies (# 5547)
```

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

This pull-request has been approved by: *<a href="https://github.com/knative-sandbox/eventing-kafka-broker/pull/1038#" title="Author self-approved">knative-automation</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **rhuss** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @rhuss` 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-sandbox%2Feventing-kafka-broker).

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

- **[OWNERS](https://github.com/knative-sandbox/eventing-kafka-broker/blob/main/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":["rhuss"]} -->

Patch:
diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES
index 0d120a04c..24c126c6f 100644
--- a/OWNERS_ALIASES
+++ b/OWNERS_ALIASES
@@ -1,4 +1,5 @@
-# This file is auto-generated from peribolos
+# This file is auto-generated from peribolos.
+# Do not modify this file, instead modify peribolos/knative-sandbox.yaml
 
 aliases:
   api-core-wg-leads:
diff --git a/control-plane/pkg/core/config/utils.go b/control-plane/pkg/core/config/utils.go
index 7018a28da..efea8777c 100644
--- a/control-plane/pkg/core/config/utils.go
+++ b/control-plane/pkg/core/config/utils.go
@@ -55,7 +55,7 @@ func EgressConfigFromDelivery(
 	defaultBackoffDelayMs uint64,
 ) (*contract.EgressConfig, error) {
 
-	if delivery == nil || (delivery.DeadLetterSink == nil && delivery.Retry == nil) {
+	if delivery == nil || (delivery.DeadLetterSink == nil && delivery.Retry == nil && delivery.Timeout == nil) {
 		return nil, nil
 	}
 
@@ -72,7 +72,7 @@ func EgressConfigFromDelivery(
 	if delivery.Retry != nil {
 		egressConfig.Retry = uint32(*delivery.Retry)
 		var err error
-		delay, err := BackoffDelayFromISO8601String(delivery.BackoffDelay, defaultBackoffDelayMs)
+		delay, err := DurationMillisFromISO8601String(delivery.BackoffDelay, defaultBackoffDelayMs)
 		if err != nil {
 			return nil, fmt.Errorf("failed to parse Spec.Delivery.BackoffDelay: %w", err)
 		}
@@ -80,6 +80,18 @@ func EgressConfigFromDelivery(
 		egressConfig.BackoffPolicy = BackoffPolicyFromString(delivery.BackoffPolicy)
 	}
 
+	if delivery.Timeout != nil {
+		var err error
+		timeout, err := DurationMillisFromISO8601String(
+			delivery.Timeout,
+			0, /* 0 means absent, allowing the data plane to default it */
+		)
+		if err != nil {
+			return nil, fmt.Errorf("failed to parse Spec.Delivery.Timeout: %w", err)
+		}
+		egressConfig.Timeout = timeout
+	}
+
 	return egressConfig, nil
 }
 
@@ -102,17 +114,17 @@ func BackoffPolicyFromString(backoffPolicy *duck.BackoffPolicyType) contract.Bac
 	}
 }
 
-// BackoffDelayFromISO8601String returns the BackoffDelay from the given string.
+// DurationMillisFromISO8601String returns the duration in milliseconds from the given string.
 //
 // Default value is the specified defaultDelay.
-func BackoffDelayFromISO8601String(backoffDelay *string, defaultDelay uint64) (uint64, error) {
-	if backoffDelay == nil {
-		return defaultDelay, nil
+func DurationMillisFromISO8601String(durationStr *string, defaultDurationMillis uint64) (uint64, error) {
+	if durationStr == nil {
+		return defaultDurationMillis, nil
 	}
 
-	d, err := period.Parse(*backoffDelay, false)
+	d, err := period.Parse(*durationStr, false)
 	if err != nil {
-		return 0, fmt.Errorf("failed to parse backoffDelay: %w", err)
+		return 0, fmt.Errorf("failed to parse duration string: %w", err)
 	}
 
 	ms, _ := d.Duration()
diff --git a/data-plane/THIRD-PARTY.txt b/data-plane/THIRD-PARTY.txt
index c5fcaf506..c15d6344f 100644
--- a/data-plane/THIRD-PARTY.txt
+++ b/data-plane/THIRD-PARTY.txt
@@ -66,8 +66,8 @@ Lists of 153 third-party dependencies.
      (Apache License, Version 2.0) Fabric8 :: Kubernetes :: Server Mock (io.fabric8:kubernetes-server-mock:5.4.1 - http://fabric8.io/kubernetes-server-mock/)
      (Apache License, Version 2.0) Fabric8 :: Mock Web Server (io.fabric8:mockwebserver:0.1.8 - http://fabric8.io/)
      (The Apache Software License, Version 2.0) zjsonpatch (io.fabric8:zjsonpatch:0.3.0 - https://github.com/fabric8io/zjsonpatch/)
-     (The Apache Software License, Version 2.0) micrometer-core (io.micrometer:micrometer-core:1.7.0 - https://github.com/micrometer-metrics/micrometer)
-     (The Apache Software License, Version 2.0) micrometer-registry-prometheus (io.micrometer:micrometer-registry-prometheus:1.7.0 - https://github.com/micrometer-metrics/micrometer)
+     (The Apache Software License, Version 2.0) micrometer-core (io.micrometer:micrometer-core:1.7.1 - https://github.com/micrometer-metrics/micrometer)
+     (The Apache Software License, Version 2.0) micrometer-registry-prometheus (io.micrometer:micrometer-registry-prometheus:1.7.1 - https://github.com/micrometer-metrics/micrometer)
      (Apache License, Version 2.0) Netty/Buffer (io.netty:netty-buffer:4.1.65.Final - https://netty.io/netty-buffer/)
      (Apache License, Version 2.0) Netty/Codec (io.netty:netty-codec:4.1.65.Final - https://netty.io/netty-codec/)
      (Apache License, Version 2.0) Netty/Codec/DNS (io.netty:netty-codec-dns:4.1.65.Final - https://netty.io/netty-codec-dns/)
diff --git a/data-plane/pom.xml b/data-plane/pom.xml
index 79226a174..32c7146b3 100644
--- a/data-plane/pom.xml
+++ b/data-plane/pom.xml
@@ -43,7 +43,7 @@
     <!-- dependencies version -->
     <vertx.version>4.1.0</vertx.version>
     <cloudevents.sdk.version>2.2.0</cloudevents.sdk.version>
-    <micrometer.version>1.7.0</micrometer.version>
+    <micrometer.version>1.7.1</micrometer.version>
     <opentelemetry.version>1.1.0</opentelemetry.version>
     <jackson.version>2.12.3</jackson.version>
     <protobuf.version>3.17.2</protobuf.version>
diff --git a/go.mod b/go.mod
index 73cb324c0..5e0e76489 100644
--- a/go.mod
+++ b/go.mod
@@ -21,7 +21,7 @@ require (
 	k8s.io/apiserver v0.20.7
 	k8s.io/client-go v0.20.7
 	k8s.io/utils v0.0.0-20210111153108-fddb29f9d009
-	knative.dev/eventing v0.23.1-0.20210623160544-0cb787308255
+	knative.dev/eventing v0.23.1-0.20210624083445-2fcbc0ac500d
 	knative.dev/hack v0.0.0-20210622141627-e28525d8d260
 	knative.dev/pkg v0.0.0-20210622173328-dd0db4b05c80
 	knative.dev/reconciler-test v0.0.0-20210623134345-88c84739abd9
diff --git a/go.sum b/go.sum
index b79d2dba8..0bb159867 100644
--- a/go.sum
+++ b/go.sum
@@ -1222,14 +1222,13 @@ k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAG
 k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ=
 k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
-knative.dev/eventing v0.23.1-0.20210623160544-0cb787308255 h1:qD+rUgPdUrQR5ABIGOMXnFtXtM5LwTLu8/445kzS+/U=
-knative.dev/eventing v0.23.1-0.20210623160544-0cb787308255/go.mod h1:cHeF82RO/9T0mZvKACrYviARZDiXGLZ2VGPei6AvlGo=
+knative.dev/eventing v0.23.1-0.20210624083445-2fcbc0ac500d h1:EKha5vYrqbZo2336nu8APUcIyhVuvt8q2CdO+7b/zSE=
+knative.dev/eventing v0.23.1-0.20210624083445-2fcbc0ac500d/go.mod h1:9xo0SWkIfpXrx0lvGQO7MUlPF8cu+QCMd2gGxj6wxrU=
 knative.dev/hack v0.0.0-20210622141627-e28525d8d260 h1:f2eMtOubAOc/Q7JlvFPDKXiPlJVK+VpX2Cot8hRzCgQ=
 knative.dev/hack v0.0.0-20210622141627-e28525d8d260/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
 knative.dev/hack/schema v0.0.0-20210622141627-e28525d8d260/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
 knative.dev/pkg v0.0.0-20210622173328-dd0db4b05c80 h1:GHJ3lglE0/YHfBMMJqluqUNLOmsNXh7s7DBnfrkpRMM=
 knative.dev/pkg v0.0.0-20210622173328-dd0db4b05c80/go.mod h1:kGegTnbZ+ljFjAE3E1+8wgaH2LMv8qYi+72o3F3cbdc=
-knative.dev/reconciler-test v0.0.0-20210623120544-4d687fd0fec1/go.mod h1:4wqv2WyWUC5yhTesRUVwgjv/fHTHny1RYBfdB6tVDok=
 knative.dev/reconciler-test v0.0.0-20210623134345-88c84739abd9 h1:j+ZLX0o1vBxEpTc7J6QT6sSBblQHpZhJP4vxbFe+C5Y=
 knative.dev/reconciler-test v0.0.0-20210623134345-88c84739abd9/go.mod h1:4wqv2WyWUC5yhTesRUVwgjv/fHTHny1RYBfdB6tVDok=
 modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/go-uuid/.travis.yml b/third_party/VENDOR-LICENSE/github.com/hashicorp/go-uuid/.travis.yml
old mode 100755
new mode 100644
diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/go-uuid/LICENSE b/third_party/VENDOR-LICENSE/github.com/hashicorp/go-uuid/LICENSE
old mode 100755
new mode 100644
diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/go-uuid/README.md b/third_party/VENDOR-LICENSE/github.com/hashicorp/go-uuid/README.md
old mode 100755
new mode 100644
diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/go-uuid/go.mod b/third_party/VENDOR-LICENSE/github.com/hashicorp/go-uuid/go.mod
old mode 100755
new mode 100644
diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/go-uuid/uuid.go b/third_party/VENDOR-LICENSE/github.com/hashicorp/go-uuid/uuid.go
old mode 100755
new mode 100644
diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/.gitignore b/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/.gitignore
old mode 100755
new mode 100644
diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/2q.go b/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/2q.go
old mode 100755
new mode 100644
diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/LICENSE b/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/LICENSE
old mode 100755
new mode 100644
diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/README.md b/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/README.md
old mode 100755
new mode 100644
diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/arc.go b/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/arc.go
old mode 100755
new mode 100644
diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/doc.go b/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/doc.go
old mode 100755
new mode 100644
diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/go.mod b/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/go.mod
old mode 100755
new mode 100644
diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/lru.go b/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/lru.go
old mode 100755
new mode 100644
diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/simplelru/lru.go b/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/simplelru/lru.go
old mode 100755
new mode 100644
diff --git a/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/simplelru/lru_interface.go b/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/simplelru/lru_interface.go
old mode 100755
new mode 100644
diff --git a/vendor/knative.dev/eventing/pkg/kncloudevents/retries.go b/vendor/knative.dev/eventing/pkg/kncloudevents/retries.go
index 416049b46..ee816efa1 100644
--- a/vendor/knative.dev/eventing/pkg/kncloudevents/retries.go
+++ b/vendor/knative.dev/eventing/pkg/kncloudevents/retries.go
@@ -104,6 +104,14 @@ func RetryConfigFromDeliverySpec(spec v1.DeliverySpec) (RetryConfig, error) {
 		}
 	}
 
+	if spec.Timeout != nil {
+		timeout, err := period.Parse(*spec.Timeout)
+		if err != nil {
+			return retryConfig, fmt.Errorf("failed to parse Spec.Timeout: %w", err)
+		}
+		retryConfig.RequestTimeout, _ = timeout.Duration()
+	}
+
 	return retryConfig, nil
 }
 
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 6a8cfcd91..9d2f43332 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1026,7 +1026,7 @@ k8s.io/utils/buffer
 k8s.io/utils/integer
 k8s.io/utils/pointer
 k8s.io/utils/trace
-# knative.dev/eventing v0.23.1-0.20210623160544-0cb787308255
+# knative.dev/eventing v0.23.1-0.20210624083445-2fcbc0ac500d
 ## explicit
 knative.dev/eventing/pkg/apis/config
 knative.dev/eventing/pkg/apis/duck


Test patch:
diff --git a/control-plane/pkg/core/config/utils_test.go b/control-plane/pkg/core/config/utils_test.go
index 6d80c21bb..1317ed6ba 100644
--- a/control-plane/pkg/core/config/utils_test.go
+++ b/control-plane/pkg/core/config/utils_test.go
@@ -111,7 +111,7 @@ func TestBackoffPolicyFromString(t *testing.T) {
 	}
 }
 
-func TestBackoffDelayFromString(t *testing.T) {
+func TestDurationMillisFromISO8601String(t *testing.T) {
 
 	tests := []struct {
 		name         string
@@ -170,12 +170,12 @@ func TestBackoffDelayFromString(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
-			got, err := BackoffDelayFromISO8601String(tt.backoffDelay, tt.defaultDelay)
+			got, err := DurationMillisFromISO8601String(tt.backoffDelay, tt.defaultDelay)
 			if (err != nil) != tt.wantError {
 				t.Errorf("wantError = %v got %v", tt.wantError, err)
 			}
 			if got != tt.want {
-				t.Errorf("BackoffDelayFromISO8601String() = %v, want %v", got, tt.want)
+				t.Errorf("DurationMillisFromISO8601String() = %v, want %v", got, tt.want)
 			}
 		})
 	}
@@ -275,6 +275,7 @@ func TestEgressConfigFromDelivery(t *testing.T) {
 				Retry:          pointer.Int32Ptr(3),
 				BackoffPolicy:  &exponential,
 				BackoffDelay:   pointer.StringPtr("PT1S"),
+				Timeout:        pointer.StringPtr("PT2S"),
 			},
 			defaultBackoffDelayMs: 0,
 			want: &contract.EgressConfig{
@@ -282,6 +283,7 @@ func TestEgressConfigFromDelivery(t *testing.T) {
 				Retry:         3,
 				BackoffPolicy: contract.BackoffPolicy_Exponential,
 				BackoffDelay:  uint64(time.Second.Milliseconds()),
+				Timeout:       uint64(time.Second.Milliseconds() * 2),
 			},
 			wantErr: false,
 		},
@@ -299,6 +301,20 @@ func TestEgressConfigFromDelivery(t *testing.T) {
 			},
 			wantErr: false,
 		},
+		{
+			name:     "only timeout",
+			ctx:      ctx,
+			resolver: resolver.NewURIResolver(ctx, func(name types.NamespacedName) {}),
+			parent:   &eventing.KafkaSink{},
+			delivery: &eventingduck.DeliverySpec{
+				Timeout: pointer.StringPtr("PT2S"),
+			},
+			defaultBackoffDelayMs: 0,
+			want: &contract.EgressConfig{
+				Timeout: uint64(time.Second.Milliseconds() * 2),
+			},
+			wantErr: false,
+		},
 		{
 			name:     "only retry - use default backoff delay",
 			ctx:      ctx,
diff --git a/control-plane/pkg/reconciler/trigger/trigger_test.go b/control-plane/pkg/reconciler/trigger/trigger_test.go
index 0b7cd65c6..49cef136e 100644
--- a/control-plane/pkg/reconciler/trigger/trigger_test.go
+++ b/control-plane/pkg/reconciler/trigger/trigger_test.go
@@ -322,6 +322,7 @@ func triggerReconciliation(t *testing.T, format string, configs broker.Configs)
 										Retry:         3,
 										BackoffPolicy: contract.BackoffPolicy_Exponential,
 										BackoffDelay:  uint64(time.Second.Milliseconds()),
+										Timeout:       uint64((time.Second * 2).Milliseconds()),
 									},
 								},
 							},
@@ -1408,6 +1409,7 @@ func withDelivery(trigger *eventing.Trigger) {
 		Retry:          pointer.Int32Ptr(3),
 		BackoffPolicy:  &exponential,
 		BackoffDelay:   pointer.StringPtr("PT1S"),
+		Timeout:        pointer.StringPtr("PT2S"),
 	}
 }