Repository: knative/serving
Pull request #10441 (2020-12-24 11:19:51)

[Automated] Update net-contour nightly
Produced via:
```shell
for x in net-contour.yaml contour.yaml; do
  curl https://storage.googleapis.com/knative-nightly/net-contour/latest/$x > ${GITHUB_WORKSPACE}/./third_party/contour-latest/$x
done
```
/assign @knative/networking-wg-leads
/cc @knative/networking-wg-leads

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

This pull-request has been approved by: *<a href="https://github.com/knative/serving/pull/10441#" 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 **zhiminxiang** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @zhiminxiang` 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%2Fserving).

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

- **[third_party/OWNERS](https://github.com/knative/serving/blob/master/third_party/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":["zhiminxiang"]} -->
codecov[bot]: # [Codecov](https://codecov.io/gh/knative/serving/pull/10441?src=pr&el=h1) Report
> Merging [#10441](https://codecov.io/gh/knative/serving/pull/10441?src=pr&el=desc) (2497f88) into [master](https://codecov.io/gh/knative/serving/commit/e8f91153ba56ac20275d32d59c46673cbec0418d?el=desc) (e8f9115) will **decrease** coverage by `0.04%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/knative/serving/pull/10441/graphs/tree.svg?width=650&height=150&src=pr&token=MPpDfAj4Ui)](https://codecov.io/gh/knative/serving/pull/10441?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #10441      +/-   ##
==========================================
- Coverage   88.04%   87.99%   -0.05%     
==========================================
  Files         186      186              
  Lines        8799     8799              
==========================================
- Hits         7747     7743       -4     
- Misses        812      815       +3     
- Partials      240      241       +1     
```


| [Impacted Files](https://codecov.io/gh/knative/serving/pull/10441?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/autoscaler/statforwarder/leases.go](https://codecov.io/gh/knative/serving/pull/10441/diff?src=pr&el=tree#diff-cGtnL2F1dG9zY2FsZXIvc3RhdGZvcndhcmRlci9sZWFzZXMuZ28=) | `76.97% <0.00%> (-1.44%)` | :arrow_down: |
| [pkg/activator/net/revision\_backends.go](https://codecov.io/gh/knative/serving/pull/10441/diff?src=pr&el=tree#diff-cGtnL2FjdGl2YXRvci9uZXQvcmV2aXNpb25fYmFja2VuZHMuZ28=) | `90.41% <0.00%> (-0.92%)` | :arrow_down: |

------

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

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

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-serving-istio-stable-no-mesh-tls | 2497f881943e63cf5514c9ad7f28cd1374b0f108 | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative_serving/10441/pull-knative-serving-istio-stable-no-mesh-tls/1342067487469998080) | `/test pull-knative-serving-istio-stable-no-mesh-tls`

[Full PR test history](https://gubernator.knative.dev/pr/knative_serving/10441). [Your PR dashboard](https://gubernator.knative.dev/pr/knative-automation).

<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 -->
vagababov: /lgtm
/retest
knative-prow-robot: New changes are detected. LGTM label has been removed.
knative-prow-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative/serving/pull/10441#" 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 **vagababov** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @vagababov` 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%2Fserving).

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

- **[third_party/OWNERS](https://github.com/knative/serving/blob/master/third_party/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":["vagababov"]} -->
knative-prow-robot: @knative-automation: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-serving-istio-stable-no-mesh | 34f9a7f93303bb3cae15b035d2ef9054972ad721 | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative_serving/10441/pull-knative-serving-istio-stable-no-mesh/1343879708328071168) | `/test pull-knative-serving-istio-stable-no-mesh`

[Full PR test history](https://gubernator.knative.dev/pr/knative_serving/10441). [Your PR dashboard](https://gubernator.knative.dev/pr/knative-automation).

<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 -->
vagababov: /lgtm
/approve
/retest
knative-prow-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative/serving/pull/10441#" title="Author self-approved">knative-automation</a>*, *<a href="https://github.com/knative/serving/pull/10441#issuecomment-752211720" title="Approved">vagababov</a>*

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

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:

- ~~[third_party/OWNERS](https://github.com/knative/serving/blob/master/third_party/OWNERS)~~ [vagababov]

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":[]} -->

Patch:
diff --git a/pkg/reconciler/route/traffic/rollout.go b/pkg/reconciler/route/traffic/rollout.go
index aa2a2d403..9c068312d 100644
--- a/pkg/reconciler/route/traffic/rollout.go
+++ b/pkg/reconciler/route/traffic/rollout.go
@@ -438,6 +438,11 @@ func stepConfig(ctx context.Context, goal, prev *ConfigurationRollout, nowTS int
 func (cur *ConfigurationRollout) computeProperties(nowTS, minStepSec, durationSecs float64) {
 	// First compute number of steps. If it takes more time to step 1% than the
 	// whole allotted time for the rollout, do it in 1 step.
+	// Take into account that we already used minStepSecs to move first
+	// 1% so the overall rollout duration is shorter by this amount.
+	// If it took longer than duration it might be negative, so cap it
+	// at 1s, so we just do 1 step.
+	durationSecs = math.Max(1, durationSecs-minStepSec)
 	numSteps := math.Max(1, durationSecs/minStepSec)
 	pf := float64(cur.Percent)
 


Test patch:
diff --git a/pkg/reconciler/route/table_test.go b/pkg/reconciler/route/table_test.go
index a6c23e1aa..edd9063f2 100644
--- a/pkg/reconciler/route/table_test.go
+++ b/pkg/reconciler/route/table_test.go
@@ -20,6 +20,7 @@ import (
 	"context"
 	"encoding/json"
 	"fmt"
+	"math"
 	"testing"
 	"time"
 
@@ -450,10 +451,10 @@ func TestReconcile(t *testing.T) {
 					RevisionName: "config-00001", Percent: 1,
 				}}, fakeCurTime.Add(-3*time.Second),
 					func(r *traffic.Rollout) {
-						const numSteps = 120 / 3 // 40
-						// Step duration is 3s (duration / numSteps = 120/40)
-						r.Configurations[0].StepParams.StepDuration = int64(time.Second) * 120 / numSteps // 3s in ns.
-						r.Configurations[0].StepParams.StepSize = (100 - 1) / numSteps                    // 2
+						const numSteps = (120 - 3) / 3 // 39
+						// Step duration is 3s (duration - 3)/ numSteps = 120/40)
+						r.Configurations[0].StepParams.StepDuration = int64(time.Second) * (120 - 3) / numSteps   // 3s in ns.
+						r.Configurations[0].StepParams.StepSize = int(math.Round((100. - 1) / float64(numSteps))) // 3
 						// StepDuration is 3, and so next step is `now` + 3.
 						r.Configurations[0].StepParams.NextStepTime = fakeCurTime.Add(3 * time.Second).UnixNano()
 					},
diff --git a/pkg/reconciler/route/traffic/rollout_test.go b/pkg/reconciler/route/traffic/rollout_test.go
index 9380455ca..ad6bba478 100644
--- a/pkg/reconciler/route/traffic/rollout_test.go
+++ b/pkg/reconciler/route/traffic/rollout_test.go
@@ -1011,7 +1011,9 @@ func TestObserveReady(t *testing.T) {
 	const (
 		now         = 200620092020 + 1982
 		oldenDays   = 198219841988
+		oldenStep   = float64(now-oldenDays) / float64(time.Second)
 		ancientDays = 14921812
+		ancientStep = float64(now-ancientDays) / float64(time.Second)
 		duration    = 120.
 	)
 	ro := Rollout{
@@ -1050,7 +1052,8 @@ func TestObserveReady(t *testing.T) {
 			Percent: 50,
 		}, {
 			// This covers the case when duration of a step is larger
-			// than duration of the whole rollout.
+			// than duration of the whole rollout. Which means we'll
+			// do the whole rollout in one final step.
 			ConfigurationName: "días antiguos",
 			StepParams: RolloutParams{
 				StartTime: ancientDays,
@@ -1074,9 +1077,9 @@ func TestObserveReady(t *testing.T) {
 			Percent:           100,
 			StepParams: RolloutParams{
 				StartTime:    200620092020,
-				StepDuration: 1212121212, // 120/99
+				StepDuration: 1202020202, // (120s-1984ns)/99
 				StepSize:     1,
-				NextStepTime: now + 1212121212,
+				NextStepTime: now + 1202020202,
 			},
 		}, {
 			ConfigurationName: "step-begin > 1s",
@@ -1084,7 +1087,7 @@ func TestObserveReady(t *testing.T) {
 			StepParams: RolloutParams{
 				StartTime:    oldenDays,
 				StepDuration: int64(3 * time.Second),
-				StepSize:     100 / 40,
+				StepSize:     3, // int(100. / ((duration - oldenStep) / oldenStep)),
 				NextStepTime: now + 3*int64(time.Second),
 			},
 		}, {
@@ -1110,9 +1113,9 @@ func TestObserveReady(t *testing.T) {
 			Percent:           13,
 			StepParams: RolloutParams{
 				StartTime:    ancientDays,
-				StepDuration: int64(duration * time.Second),
+				StepDuration: int64(time.Second), // The minimal possible.
 				StepSize:     12,
-				NextStepTime: now + int64(duration*time.Second),
+				NextStepTime: now + int64(time.Second),
 			},
 		}},
 	}
diff --git a/third_party/contour-latest/contour.yaml b/third_party/contour-latest/contour.yaml
index a382a47f1..6aa6623f3 100644
--- a/third_party/contour-latest/contour.yaml
+++ b/third_party/contour-latest/contour.yaml
@@ -1482,7 +1482,7 @@ spec:
     spec:
       containers:
         - name: contour
-          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:2093b912353712dd727e5f41268a8dfe1c5922d0b6ed45df5638fe8faba101df
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:a4a99859c4d1ff8ffb6bad602d10c80b16b558255c1ecbd299716a82b8178a04
           imagePullPolicy: Always
           command:
             - contour
@@ -1709,7 +1709,7 @@ spec:
             - --contour-key-file=/certs/tls.key
             - --config-path=/config/contour.yaml
           command: ["contour"]
-          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:2093b912353712dd727e5f41268a8dfe1c5922d0b6ed45df5638fe8faba101df
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:a4a99859c4d1ff8ffb6bad602d10c80b16b558255c1ecbd299716a82b8178a04
           imagePullPolicy: IfNotPresent
           name: contour
           ports:
@@ -1798,7 +1798,7 @@ spec:
           args:
             - envoy
             - shutdown-manager
-          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:2093b912353712dd727e5f41268a8dfe1c5922d0b6ed45df5638fe8faba101df
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:a4a99859c4d1ff8ffb6bad602d10c80b16b558255c1ecbd299716a82b8178a04
           imagePullPolicy: IfNotPresent
           lifecycle:
             preStop:
@@ -1875,7 +1875,7 @@ spec:
             - --envoy-key-file=/certs/tls.key
           command:
             - contour
-          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:2093b912353712dd727e5f41268a8dfe1c5922d0b6ed45df5638fe8faba101df
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:a4a99859c4d1ff8ffb6bad602d10c80b16b558255c1ecbd299716a82b8178a04
           imagePullPolicy: IfNotPresent
           name: envoy-initconfig
           volumeMounts:
@@ -2097,7 +2097,7 @@ spec:
     spec:
       containers:
         - name: contour
-          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:2093b912353712dd727e5f41268a8dfe1c5922d0b6ed45df5638fe8faba101df
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:a4a99859c4d1ff8ffb6bad602d10c80b16b558255c1ecbd299716a82b8178a04
           imagePullPolicy: Always
           command:
             - contour
@@ -2217,7 +2217,7 @@ spec:
             - --contour-key-file=/certs/tls.key
             - --config-path=/config/contour.yaml
           command: ["contour"]
-          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:2093b912353712dd727e5f41268a8dfe1c5922d0b6ed45df5638fe8faba101df
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:a4a99859c4d1ff8ffb6bad602d10c80b16b558255c1ecbd299716a82b8178a04
           imagePullPolicy: IfNotPresent
           name: contour
           ports:
@@ -2306,7 +2306,7 @@ spec:
           args:
             - envoy
             - shutdown-manager
-          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:2093b912353712dd727e5f41268a8dfe1c5922d0b6ed45df5638fe8faba101df
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:a4a99859c4d1ff8ffb6bad602d10c80b16b558255c1ecbd299716a82b8178a04
           imagePullPolicy: IfNotPresent
           lifecycle:
             preStop:
@@ -2383,7 +2383,7 @@ spec:
             - --envoy-key-file=/certs/tls.key
           command:
             - contour
-          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:2093b912353712dd727e5f41268a8dfe1c5922d0b6ed45df5638fe8faba101df
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:a4a99859c4d1ff8ffb6bad602d10c80b16b558255c1ecbd299716a82b8178a04
           imagePullPolicy: IfNotPresent
           name: envoy-initconfig
           volumeMounts:
diff --git a/third_party/contour-latest/net-contour.yaml b/third_party/contour-latest/net-contour.yaml
index c0e530f4a..04558aa73 100644
--- a/third_party/contour-latest/net-contour.yaml
+++ b/third_party/contour-latest/net-contour.yaml
@@ -33,7 +33,7 @@ metadata:
   namespace: knative-serving
   labels:
     networking.knative.dev/ingress-provider: contour
-    serving.knative.dev/release: "v20201223-28fc369e"
+    serving.knative.dev/release: "v20201229-036b3288"
 data:
   _example: |
     ################################
@@ -103,7 +103,7 @@ spec:
         - name: controller
           # This is the Go import path for the binary that is containerized
           # and substituted here.
-          image: gcr.io/knative-nightly/knative.dev/net-contour/cmd/controller@sha256:bf82763eefa109a8d23dd16ae4f1d1ec805841087cb0ee343d0bb0473aba5b35
+          image: gcr.io/knative-nightly/knative.dev/net-contour/cmd/controller@sha256:16dd8a9388ec9ecf8cbf4167d9461a860d9e3fdfadf14f1a30f2b4860bd0a7e0
           resources:
             requests:
               cpu: 40m
diff --git a/third_party/kourier-latest/kourier.yaml b/third_party/kourier-latest/kourier.yaml
index 85912d24d..07d0bf0b8 100644
--- a/third_party/kourier-latest/kourier.yaml
+++ b/third_party/kourier-latest/kourier.yaml
@@ -18,7 +18,7 @@ metadata:
   name: kourier-system
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201223-2dbe9b73"
+    serving.knative.dev/release: "v20201229-2190b2c8"
 
 ---
 # Copyright 2020 The Knative Authors
@@ -42,7 +42,7 @@ metadata:
   namespace: knative-serving
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201223-2dbe9b73"
+    serving.knative.dev/release: "v20201229-2190b2c8"
 ---
 apiVersion: rbac.authorization.k8s.io/v1
 kind: ClusterRole
@@ -51,7 +51,7 @@ metadata:
   namespace: knative-serving
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201223-2dbe9b73"
+    serving.knative.dev/release: "v20201229-2190b2c8"
 rules:
   - apiGroups: [""]
     resources: ["events"]
@@ -78,7 +78,7 @@ metadata:
   name: 3scale-kourier
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201223-2dbe9b73"
+    serving.knative.dev/release: "v20201229-2190b2c8"
 roleRef:
   apiGroup: rbac.authorization.k8s.io
   kind: ClusterRole
@@ -110,7 +110,7 @@ metadata:
   namespace: knative-serving
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201223-2dbe9b73"
+    serving.knative.dev/release: "v20201229-2190b2c8"
 spec:
   replicas: 1
   selector:
@@ -122,7 +122,7 @@ spec:
         app: 3scale-kourier-control
     spec:
       containers:
-        - image: gcr.io/knative-nightly/knative.dev/net-kourier/cmd/kourier@sha256:0890e5fd952a18d7758724cd81a138b064601b6b80428e0d7a02d28a3853a4de
+        - image: gcr.io/knative-nightly/knative.dev/net-kourier/cmd/kourier@sha256:98248dabcfc70033bd96d3cea0ad3fd69ed668dfa09ae5b39f49c26e814b2d46
           name: kourier-control
           env:
             - name: CERTS_SECRET_NAMESPACE
@@ -158,7 +158,7 @@ metadata:
   namespace: knative-serving
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201223-2dbe9b73"
+    serving.knative.dev/release: "v20201229-2190b2c8"
 spec:
   ports:
     - name: grpc-xds
@@ -191,7 +191,7 @@ metadata:
   namespace: kourier-system
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201223-2dbe9b73"
+    serving.knative.dev/release: "v20201229-2190b2c8"
 spec:
   selector:
     matchLabels:
@@ -257,7 +257,7 @@ metadata:
   namespace: kourier-system
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201223-2dbe9b73"
+    serving.knative.dev/release: "v20201229-2190b2c8"
 spec:
   ports:
     - name: http2
@@ -279,7 +279,7 @@ metadata:
   namespace: kourier-system
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201223-2dbe9b73"
+    serving.knative.dev/release: "v20201229-2190b2c8"
 spec:
   ports:
     - name: http2
@@ -297,7 +297,7 @@ metadata:
   namespace: kourier-system
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201223-2dbe9b73"
+    serving.knative.dev/release: "v20201229-2190b2c8"
 data:
   envoy-bootstrap.yaml: |
     dynamic_resources: