Repository: knative/serving
Pull request #10186 (2020-11-24 14:16:41)

Drop support for JSON messages in websocket server
As per title. We don't need to support JSON messages anymore (protobuf support has been live since 0.17), so we can safely drop this.

/assign @vagababov @julz 

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

This pull-request has been approved by: *<a href="https://github.com/knative/serving/pull/10186#" title="Author self-approved">markusthoemmes</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:

- ~~[pkg/autoscaler/OWNERS](https://github.com/knative/serving/blob/master/pkg/autoscaler/OWNERS)~~ [markusthoemmes]

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":[]} -->
codecov[bot]: # [Codecov](https://codecov.io/gh/knative/serving/pull/10186?src=pr&el=h1) Report
> Merging [#10186](https://codecov.io/gh/knative/serving/pull/10186?src=pr&el=desc) (ba42a00) into [master](https://codecov.io/gh/knative/serving/commit/f19b585860675d05218338533749899fca517711?el=desc) (f19b585) will **increase** coverage by `0.04%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #10186      +/-   ##
==========================================
+ Coverage   88.04%   88.08%   +0.04%     
==========================================
  Files         184      184              
  Lines        8621     8613       -8     
==========================================
- Hits         7590     7587       -3     
+ Misses        789      785       -4     
+ Partials      242      241       -1     
```


| [Impacted Files](https://codecov.io/gh/knative/serving/pull/10186?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/autoscaler/statserver/server.go](https://codecov.io/gh/knative/serving/pull/10186/diff?src=pr&el=tree#diff-cGtnL2F1dG9zY2FsZXIvc3RhdHNlcnZlci9zZXJ2ZXIuZ28=) | `79.61% <ø> (+1.23%)` | :arrow_up: |
| [pkg/reconciler/autoscaling/kpa/scaler.go](https://codecov.io/gh/knative/serving/pull/10186/diff?src=pr&el=tree#diff-cGtnL3JlY29uY2lsZXIvYXV0b3NjYWxpbmcva3BhL3NjYWxlci5nbw==) | `88.57% <0.00%> (-1.43%)` | :arrow_down: |
| [pkg/activator/net/revision\_backends.go](https://codecov.io/gh/knative/serving/pull/10186/diff?src=pr&el=tree#diff-cGtnL2FjdGl2YXRvci9uZXQvcmV2aXNpb25fYmFja2VuZHMuZ28=) | `91.40% <0.00%> (+0.90%)` | :arrow_up: |
| [pkg/reconciler/configuration/configuration.go](https://codecov.io/gh/knative/serving/pull/10186/diff?src=pr&el=tree#diff-cGtnL3JlY29uY2lsZXIvY29uZmlndXJhdGlvbi9jb25maWd1cmF0aW9uLmdv) | `88.28% <0.00%> (+1.56%)` | :arrow_up: |

------

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

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

This pull-request has been approved by: *<a href="https://github.com/knative/serving/pull/10186#pullrequestreview-537555873" title="LGTM">julz</a>*, *<a href="https://github.com/knative/serving/pull/10186#" title="Author self-approved">markusthoemmes</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:

- ~~[pkg/autoscaler/OWNERS](https://github.com/knative/serving/blob/master/pkg/autoscaler/OWNERS)~~ [julz,markusthoemmes]

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":[]} -->
knative-prow-robot: @markusthoemmes: 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 | ad71296bd695c2aa9944f2d2558dcab12b72149f | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative_serving/10186/pull-knative-serving-istio-stable-no-mesh-tls/1331240352614453248) | `/test pull-knative-serving-istio-stable-no-mesh-tls`

[Full PR test history](https://gubernator.knative.dev/pr/knative_serving/10186). [Your PR dashboard](https://gubernator.knative.dev/pr/markusthoemmes).

<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 -->
knative-prow-robot: @markusthoemmes: The following tests **failed**, say `/retest` to rerun all failed tests:

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

[Full PR test history](https://gubernator.knative.dev/pr/knative_serving/10186). [Your PR dashboard](https://gubernator.knative.dev/pr/markusthoemmes).

<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 -->
markusthoemmes: /retest
knative-prow-robot: @markusthoemmes: The following tests **failed**, say `/retest` to rerun all failed tests:

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

[Full PR test history](https://gubernator.knative.dev/pr/knative_serving/10186). [Your PR dashboard](https://gubernator.knative.dev/pr/markusthoemmes).

<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/go.mod b/go.mod
index aa9a3ea47..d1b89b9b5 100644
--- a/go.mod
+++ b/go.mod
@@ -34,8 +34,8 @@ require (
 	k8s.io/client-go v0.18.12
 	k8s.io/code-generator v0.18.12
 	k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29
-	knative.dev/caching v0.0.0-20201123014053-4019baeb5eb9
+	knative.dev/caching v0.0.0-20201124023036-dfa63c15d12a
 	knative.dev/hack v0.0.0-20201120192952-353db687ec5b
-	knative.dev/networking v0.0.0-20201123172858-4ec5898ef753
-	knative.dev/pkg v0.0.0-20201123172958-fea72c1c8e2f
+	knative.dev/networking v0.0.0-20201124014134-a79c9d045b05
+	knative.dev/pkg v0.0.0-20201124023135-49e55c9eb816
 )
diff --git a/go.sum b/go.sum
index 8fb3955ed..35e7dbcef 100644
--- a/go.sum
+++ b/go.sum
@@ -1214,17 +1214,16 @@ k8s.io/legacy-cloud-providers v0.18.8/go.mod h1:tgp4xYf6lvjrWnjQwTOPvWQE9IVqSBGP
 k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
 k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 h1:v8ud2Up6QK1lNOKFgiIVrZdMg7MpmSnvtrOieolJKoE=
 k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
-knative.dev/caching v0.0.0-20201123014053-4019baeb5eb9 h1:1q5EfIRvqElRbdVmcFFjDri9SRWJqfMrlNNBP7xXycY=
-knative.dev/caching v0.0.0-20201123014053-4019baeb5eb9/go.mod h1:sntT31v7vKbqLXV8CpLHPOSzPh46SmZKHvADs9Bb2Sc=
-knative.dev/hack v0.0.0-20201119155951-11aa26c8eaf6/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
+knative.dev/caching v0.0.0-20201124023036-dfa63c15d12a h1:6eZ3Bn9nTKpXjIFGGxeWJ7BNVivYqYtA0oVh/BFqeXU=
+knative.dev/caching v0.0.0-20201124023036-dfa63c15d12a/go.mod h1:M2M5CzZ03W+aXjvz9XANACo8QCoCfT0Khsd6imqvw3g=
 knative.dev/hack v0.0.0-20201120192952-353db687ec5b h1:Lc+AKgwhAZUD98mN++qTHeeaP6FRmS8fcwc/rXkP8G0=
 knative.dev/hack v0.0.0-20201120192952-353db687ec5b/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
-knative.dev/networking v0.0.0-20201123172858-4ec5898ef753 h1:kwHt4I5PmPEOTJrWk6c9l/8BryPhqZq6sZ07av691ow=
-knative.dev/networking v0.0.0-20201123172858-4ec5898ef753/go.mod h1:bWOUlIdZ3swi7zfm/BovM9UpJHcddS6dwD+sVN5xzYo=
-knative.dev/pkg v0.0.0-20201120183152-6a0e731e251a h1:635HkkbXpc7IHTaBIEZvhxEofwKZNDGLGs2f1KNDZlU=
-knative.dev/pkg v0.0.0-20201120183152-6a0e731e251a/go.mod h1:+H35jH64QU/7LiRs53AdqHAk19GOBpuNqCQpEQvjTn4=
+knative.dev/networking v0.0.0-20201124014134-a79c9d045b05 h1:7syeoKRw7l0il7kVpl/DEugBM8ndDDeK03yrqDAolGg=
+knative.dev/networking v0.0.0-20201124014134-a79c9d045b05/go.mod h1:9jAy7B2mMH/nEqBH79ucIxnWHXK4HF3K3PgyalkVCss=
 knative.dev/pkg v0.0.0-20201123172958-fea72c1c8e2f h1:zQEnqguiWwewcE2munQYL38S8VuV/hAuZCCk/6UMvhI=
 knative.dev/pkg v0.0.0-20201123172958-fea72c1c8e2f/go.mod h1:wXZqP8MXCxb51yNFlecA13BwG7Hk370SWDFWV4dx4ug=
+knative.dev/pkg v0.0.0-20201124023135-49e55c9eb816 h1:twVZmgBLLBaUUAVxxdPKZJzPief+izcV3boMc5P1xDY=
+knative.dev/pkg v0.0.0-20201124023135-49e55c9eb816/go.mod h1:wXZqP8MXCxb51yNFlecA13BwG7Hk370SWDFWV4dx4ug=
 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/pkg/autoscaler/statserver/server.go b/pkg/autoscaler/statserver/server.go
index 8ce7db577..20774efc9 100644
--- a/pkg/autoscaler/statserver/server.go
+++ b/pkg/autoscaler/statserver/server.go
@@ -17,9 +17,7 @@ limitations under the License.
 package statserver
 
 import (
-	"bytes"
 	"context"
-	"encoding/json"
 	"errors"
 	"net"
 	"net/http"
@@ -175,8 +173,6 @@ func (s *Server) Handler(w http.ResponseWriter, r *http.Request) {
 			return
 		}
 
-		// We accept either protobuf-encoded or JSON-encoded messages depending on the
-		// message type to ensure safe upgrades.
 		switch messageType {
 		case websocket.BinaryMessage:
 			var wsms metrics.WireStatMessages
@@ -195,16 +191,6 @@ func (s *Server) Handler(w http.ResponseWriter, r *http.Request) {
 				s.logger.Debugf("Received stat message: %+v", sm)
 				s.statsCh <- sm
 			}
-		case websocket.TextMessage:
-			dec := json.NewDecoder(bytes.NewBuffer(msg))
-			var sm metrics.StatMessage
-			if err = dec.Decode(&sm); err != nil {
-				s.logger.Errorw("Failed to decode json", zap.Error(err))
-				continue
-			}
-
-			s.logger.Debugf("Received stat message: %+v", sm)
-			s.statsCh <- sm
 		default:
 			s.logger.Error("Dropping unknown message type.")
 			continue
diff --git a/pkg/reconciler/route/traffic/rollout.go b/pkg/reconciler/route/traffic/rollout.go
index 2d9450c99..02eb3df9c 100644
--- a/pkg/reconciler/route/traffic/rollout.go
+++ b/pkg/reconciler/route/traffic/rollout.go
@@ -213,6 +213,9 @@ func stepConfig(goal, prev *ConfigurationRollout) *ConfigurationRollout {
 		Tag:               goal.Tag,
 		Percent:           goal.Percent,
 		Revisions:         goal.Revisions,
+
+		// If there is a new revision, then timing information should be reset.
+		// So leave them empty here and populate below, if necessary.
 	}
 
 	if len(prev.Revisions) > 0 {
@@ -222,10 +225,16 @@ func stepConfig(goal, prev *ConfigurationRollout) *ConfigurationRollout {
 	// If it matches the last revision of the previous rollout state (or there were no revisions)
 	// then no new rollout has begun for this configuration.
 	if len(prev.Revisions) == 0 || goal.Revisions[0].RevisionName == prev.Revisions[pc-1].RevisionName {
-		// TODO(vagababov): here would go the logic to compute new percentages for the rollout,
-		// i.e step function, so return value will change, depending on that.
 		if len(prev.Revisions) > 0 {
 			ret.Revisions = prev.Revisions
+
+			// TODO(vagababov): here would go the logic to compute new percentages for the rollout,
+			// i.e step function, so return value will change, depending on that.
+			// Copy the duration info from the previous when no new revision
+			// has been created.
+			ret.Deadline = prev.Deadline
+			ret.LastStepTime = prev.LastStepTime
+			ret.StepDuration = prev.StepDuration
 		}
 		return ret
 	}
diff --git a/vendor/knative.dev/pkg/websocket/connection.go b/vendor/knative.dev/pkg/websocket/connection.go
index 00feceb50..95a3f1216 100644
--- a/vendor/knative.dev/pkg/websocket/connection.go
+++ b/vendor/knative.dev/pkg/websocket/connection.go
@@ -22,6 +22,7 @@ import (
 	"errors"
 	"io"
 	"io/ioutil"
+	"net/http/httputil"
 	"sync"
 	"time"
 
@@ -133,9 +134,15 @@ func NewDurableConnection(target string, messageChan chan []byte, logger *zap.Su
 			// by restarting the serving side of the connection behind a Kubernetes Service.
 			HandshakeTimeout: 3 * time.Second,
 		}
-		conn, _, err := dialer.Dial(target, nil)
+		conn, resp, err := dialer.Dial(target, nil)
 		if err != nil {
-			logger.Errorw("Websocket connection could not be established", zap.Error(err))
+			if resp != nil {
+				dresp, _ := httputil.DumpResponse(resp, false /*body*/) // This is for logging so don't care if it fails.
+				logger.Errorw("Websocket connection could not be established", zap.Error(err),
+					zap.String("request", string(dresp)))
+			} else {
+				logger.Errorw("Websocket connection could not be established", zap.Error(err))
+			}
 		}
 		return conn, err
 	}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index e8a8b7d10..604aa4f3c 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -952,7 +952,7 @@ k8s.io/utils/buffer
 k8s.io/utils/integer
 k8s.io/utils/pointer
 k8s.io/utils/trace
-# knative.dev/caching v0.0.0-20201123014053-4019baeb5eb9
+# knative.dev/caching v0.0.0-20201124023036-dfa63c15d12a
 ## explicit
 knative.dev/caching/config
 knative.dev/caching/pkg/apis/caching
@@ -976,7 +976,7 @@ knative.dev/caching/pkg/client/listers/caching/v1alpha1
 # knative.dev/hack v0.0.0-20201120192952-353db687ec5b
 ## explicit
 knative.dev/hack
-# knative.dev/networking v0.0.0-20201123172858-4ec5898ef753
+# knative.dev/networking v0.0.0-20201124014134-a79c9d045b05
 ## explicit
 knative.dev/networking/config
 knative.dev/networking/pkg
@@ -1009,7 +1009,7 @@ knative.dev/networking/test/conformance/ingress
 knative.dev/networking/test/defaultsystem
 knative.dev/networking/test/test_images/grpc-ping/proto
 knative.dev/networking/test/types
-# knative.dev/pkg v0.0.0-20201123172958-fea72c1c8e2f
+# knative.dev/pkg v0.0.0-20201124023135-49e55c9eb816
 ## explicit
 knative.dev/pkg/apiextensions/storageversion
 knative.dev/pkg/apiextensions/storageversion/cmd/migrate


Test patch:
diff --git a/pkg/autoscaler/statserver/server_test.go b/pkg/autoscaler/statserver/server_test.go
index 5ea4d5339..1846c5d07 100644
--- a/pkg/autoscaler/statserver/server_test.go
+++ b/pkg/autoscaler/statserver/server_test.go
@@ -17,8 +17,6 @@ limitations under the License.
 package statserver
 
 import (
-	"bytes"
-	"encoding/json"
 	"errors"
 	"fmt"
 	"net"
@@ -107,10 +105,6 @@ func TestStatsReceived(t *testing.T) {
 	// protobuf
 	assertReceivedProto(t, both, statSink, statsCh)
 
-	// json encoding
-	assertReceivedJSON(t, msg1, statSink, statsCh)
-	assertReceivedJSON(t, msg2, statSink, statsCh)
-
 	closeSink(t, statSink)
 }
 
@@ -242,20 +236,6 @@ func BenchmarkStatServer(b *testing.B) {
 			msgs = append(msgs, msg1)
 		}
 
-		b.Run(fmt.Sprintf("json-encoding-%d-msgs", len(msgs)), func(b *testing.B) {
-			for i := 0; i < b.N; i++ {
-				for _, msg := range msgs {
-					if err := sendJSON(statSink, msg); err != nil {
-						b.Fatal("Expected send to succeed, but got:", err)
-					}
-				}
-
-				for range msgs {
-					<-statsCh
-				}
-			}
-		})
-
 		b.Run(fmt.Sprintf("proto-encoding-%d-msgs", len(msgs)), func(b *testing.B) {
 			for i := 0; i < b.N; i++ {
 				if err := sendProto(statSink, msgs); err != nil {
@@ -270,19 +250,6 @@ func BenchmarkStatServer(b *testing.B) {
 	}
 }
 
-func assertReceivedJSON(t *testing.T, sm metrics.StatMessage, statSink *websocket.Conn, statsCh <-chan metrics.StatMessage) {
-	t.Helper()
-
-	if err := sendJSON(statSink, sm); err != nil {
-		t.Fatal("Expected send to succeed, got:", err)
-	}
-
-	recv := <-statsCh
-	if !cmp.Equal(sm, recv) {
-		t.Fatal("StatMessage mismatch: diff (-got, +want)", cmp.Diff(recv, sm))
-	}
-}
-
 func assertReceivedProto(t *testing.T, sms []metrics.StatMessage, statSink *websocket.Conn, statsCh <-chan metrics.StatMessage) {
 	t.Helper()
 
@@ -323,19 +290,6 @@ func dial(serverURL string) (*websocket.Conn, error) {
 	return statSink, err
 }
 
-func sendJSON(statSink *websocket.Conn, sm metrics.StatMessage) error {
-	var b bytes.Buffer
-	enc := json.NewEncoder(&b)
-	if err := enc.Encode(sm); err != nil {
-		return fmt.Errorf("failed to encode StatMessage: %w", err)
-	}
-
-	if err := statSink.WriteMessage(websocket.TextMessage, b.Bytes()); err != nil {
-		return fmt.Errorf("failed to write to stat sink: %w", err)
-	}
-	return nil
-}
-
 func sendProto(statSink *websocket.Conn, sms []metrics.StatMessage) error {
 	wsms := metrics.ToWireStatMessages(sms)
 	msg, err := wsms.Marshal()
diff --git a/pkg/reconciler/route/traffic/rollout_test.go b/pkg/reconciler/route/traffic/rollout_test.go
index 6a7e51d4e..5ae626f63 100644
--- a/pkg/reconciler/route/traffic/rollout_test.go
+++ b/pkg/reconciler/route/traffic/rollout_test.go
@@ -74,6 +74,9 @@ func TestStep(t *testing.T) {
 					RevisionName: "let-it-bleed",
 					Percent:      100,
 				}},
+				Deadline:     2006, // <- Those should be ignored.
+				LastStepTime: 2009,
+				StepDuration: 2020,
 			}},
 		},
 		prev: &Rollout{
@@ -84,6 +87,9 @@ func TestStep(t *testing.T) {
 					RevisionName: "let-it-bleed",
 					Percent:      100,
 				}},
+				Deadline:     1982, // <- Those should be copied.
+				LastStepTime: 1984,
+				StepDuration: 1988,
 			}},
 		},
 		want: &Rollout{
@@ -94,6 +100,9 @@ func TestStep(t *testing.T) {
 					RevisionName: "let-it-bleed",
 					Percent:      100,
 				}},
+				Deadline:     1982,
+				LastStepTime: 1984,
+				StepDuration: 1988,
 			}},
 		},
 	}, {
@@ -178,6 +187,9 @@ func TestStep(t *testing.T) {
 					RevisionName: "goat-head-soup",
 					Percent:      100,
 				}},
+				Deadline:     1982, // <- Those should be thrown out.
+				LastStepTime: 1984,
+				StepDuration: 1988,
 			}},
 		},
 		want: &Rollout{
diff --git a/test/config/chaosduck.yaml b/test/config/chaosduck.yaml
index eda81fa76..2c5d5a1f4 100644
--- a/test/config/chaosduck.yaml
+++ b/test/config/chaosduck.yaml
@@ -86,9 +86,6 @@ spec:
         # Disable chaos on webhooks until https://github.com/knative/pkg/issues/1509 is
         # sorted out.
         - "-disable=webhook"
-        # Currently the new owner of Autoscaler needs time to build the metrics status
-        # so some e2e tests are expected to fail if the owner pod crashes.
-        - "-disable=autoscaler"
         env:
         - name: SYSTEM_NAMESPACE
           valueFrom:
diff --git a/test/e2e-tests.sh b/test/e2e-tests.sh
index 7feac7b0a..ee889153d 100755
--- a/test/e2e-tests.sh
+++ b/test/e2e-tests.sh
@@ -45,7 +45,7 @@ header "Running tests"
 
 failed=0
 
-# Run tests serially in the mesh and https scenarios
+# Run tests serially in the mesh and https scenarios.
 parallelism=""
 use_https=""
 if (( MESH )); then
@@ -59,7 +59,7 @@ if (( HTTPS )); then
   add_trap "kubectl delete -f ${TMP_DIR}/test/config/autotls/certmanager/caissuer/ --ignore-not-found" SIGKILL SIGTERM SIGQUIT
 fi
 
-# Keep the bucket count in sync with test/ha/ha.go
+# Keep the bucket count in sync with test/ha/ha.go.
 kubectl -n "${SYSTEM_NAMESPACE}" patch configmap/config-leader-election --type=merge \
   --patch='{"data":{"buckets": "'${BUCKETS}'"}}' || fail_test
 
@@ -74,7 +74,7 @@ scale_controlplane "${HA_COMPONENTS[@]}"
 # lease resources at the old sharding factor, so clean these up.
 kubectl -n ${SYSTEM_NAMESPACE} delete leases --all
 
-# Wait for a new leader Controller to prevent race conditions during service reconciliation
+# Wait for a new leader Controller to prevent race conditions during service reconciliation.
 wait_for_leader_controller || fail_test
 
 # Dump the leases post-setup.
@@ -116,7 +116,7 @@ toggle_feature multi-container Enabled
 go_test_e2e -timeout=2m ./test/e2e/multicontainer || failed=1
 toggle_feature multi-container Disabled
 
-# Enable allow-zero-initial-scale before running e2e tests (for test/e2e/initial_scale_test.go)
+# Enable allow-zero-initial-scale before running e2e tests (for test/e2e/initial_scale_test.go).
 toggle_feature allow-zero-initial-scale true config-autoscaler || fail_test
 go_test_e2e -timeout=2m ./test/e2e/initscale || failed=1
 toggle_feature allow-zero-initial-scale false config-autoscaler || fail_test
@@ -131,12 +131,12 @@ toggle_feature responsive-revision-gc Disabled
 
 # Run scale tests.
 # Note that we use a very high -parallel because each ksvc is run as its own
-# sub-test.  If this is not larger than the maximum scale tested then the test
+# sub-test. If this is not larger than the maximum scale tested then the test
 # simply cannot pass.
 go_test_e2e -timeout=20m -parallel=300 ./test/scale || failed=1
 
-# Run HA tests separately as they're stopping core Knative Serving pods
-# Define short -spoofinterval to ensure frequent probing while stopping pods
+# Run HA tests separately as they're stopping core Knative Serving pods.
+# Define short -spoofinterval to ensure frequent probing while stopping pods.
 go_test_e2e -timeout=25m -failfast -parallel=1 ./test/ha \
 	    -replicas="${REPLICAS:-1}" -buckets="${BUCKETS:-1}" -spoofinterval="10ms" || failed=1
 
diff --git a/test/e2e/minscale_readiness_test.go b/test/e2e/minscale_readiness_test.go
index be3048821..f11ab56c4 100644
--- a/test/e2e/minscale_readiness_test.go
+++ b/test/e2e/minscale_readiness_test.go
@@ -61,10 +61,12 @@ func TestMinScale(t *testing.T) {
 
 	t.Log("Creating configuration")
 	cfg, err := v1test.CreateConfiguration(t, clients, names, withMinScale(minScale),
+		// Make sure we scale down quickly after panic, before the autoscaler get killed by chaosduck.
+		withWindow(autoscaling.WindowMin),
 		// Pass low resource requirements to avoid Pod scheduling problems
 		// on busy clusters.  This is adapted from ./test/e2e/scale.go
-		func(svc *v1.Configuration) {
-			svc.Spec.Template.Spec.Containers[0].Resources = corev1.ResourceRequirements{
+		func(cfg *v1.Configuration) {
+			cfg.Spec.Template.Spec.Containers[0].Resources = corev1.ResourceRequirements{
 				Limits: corev1.ResourceList{
 					corev1.ResourceCPU:    resource.MustParse("50m"),
 					corev1.ResourceMemory: resource.MustParse("50Mi"),
@@ -161,6 +163,15 @@ func withMinScale(minScale int) func(cfg *v1.Configuration) {
 	}
 }
 
+func withWindow(t time.Duration) func(cfg *v1.Configuration) {
+	return func(cfg *v1.Configuration) {
+		if cfg.Spec.Template.Annotations == nil {
+			cfg.Spec.Template.Annotations = make(map[string]string, 1)
+		}
+		cfg.Spec.Template.Annotations[autoscaling.WindowAnnotationKey] = t.String()
+	}
+}
+
 func latestRevisionName(t *testing.T, clients *test.Clients, configName, oldRevName string) string {
 	// Wait for the Config have a LatestCreatedRevisionName
 	if err := v1test.WaitForConfigurationState(
diff --git a/third_party/contour-latest/contour.yaml b/third_party/contour-latest/contour.yaml
index f5c0c04ae..a85ad6ba3 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:7f1cb6ec625a83fa1eb1e96fff000e2f6477fd78f0aa1f409eca6505e545b7d4
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:4b68dabbdff63d482b9a9cdf7522b60d1980b2e703ff4a01378064b2a675fad3
           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:7f1cb6ec625a83fa1eb1e96fff000e2f6477fd78f0aa1f409eca6505e545b7d4
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:4b68dabbdff63d482b9a9cdf7522b60d1980b2e703ff4a01378064b2a675fad3
           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:7f1cb6ec625a83fa1eb1e96fff000e2f6477fd78f0aa1f409eca6505e545b7d4
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:4b68dabbdff63d482b9a9cdf7522b60d1980b2e703ff4a01378064b2a675fad3
           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:7f1cb6ec625a83fa1eb1e96fff000e2f6477fd78f0aa1f409eca6505e545b7d4
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:4b68dabbdff63d482b9a9cdf7522b60d1980b2e703ff4a01378064b2a675fad3
           imagePullPolicy: IfNotPresent
           name: envoy-initconfig
           volumeMounts:
@@ -3385,7 +3385,7 @@ spec:
     spec:
       containers:
         - name: contour
-          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:7f1cb6ec625a83fa1eb1e96fff000e2f6477fd78f0aa1f409eca6505e545b7d4
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:4b68dabbdff63d482b9a9cdf7522b60d1980b2e703ff4a01378064b2a675fad3
           imagePullPolicy: Always
           command:
             - contour
@@ -3612,7 +3612,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:7f1cb6ec625a83fa1eb1e96fff000e2f6477fd78f0aa1f409eca6505e545b7d4
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:4b68dabbdff63d482b9a9cdf7522b60d1980b2e703ff4a01378064b2a675fad3
           imagePullPolicy: IfNotPresent
           name: contour
           ports:
@@ -3701,7 +3701,7 @@ spec:
           args:
             - envoy
             - shutdown-manager
-          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:7f1cb6ec625a83fa1eb1e96fff000e2f6477fd78f0aa1f409eca6505e545b7d4
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:4b68dabbdff63d482b9a9cdf7522b60d1980b2e703ff4a01378064b2a675fad3
           imagePullPolicy: IfNotPresent
           lifecycle:
             preStop:
@@ -3778,7 +3778,7 @@ spec:
             - --envoy-key-file=/certs/tls.key
           command:
             - contour
-          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:7f1cb6ec625a83fa1eb1e96fff000e2f6477fd78f0aa1f409eca6505e545b7d4
+          image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:4b68dabbdff63d482b9a9cdf7522b60d1980b2e703ff4a01378064b2a675fad3
           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 4463b9256..ea78bffde 100644
--- a/third_party/contour-latest/net-contour.yaml
+++ b/third_party/contour-latest/net-contour.yaml
@@ -34,7 +34,7 @@ metadata:
   namespace: knative-serving
   labels:
     networking.knative.dev/ingress-provider: contour
-    serving.knative.dev/release: "v20201123-a07e854e"
+    serving.knative.dev/release: "v20201124-789d10d0"
 data:
   _example: |
     ################################
@@ -105,7 +105,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:583e65b87245c57027ca571c227eeee53f69e84f79e437888b4e9ef6d6801e07
+          image: gcr.io/knative-nightly/knative.dev/net-contour/cmd/controller@sha256:96fb4fce1e5788bbf64a7b23b0bb5c46ff30e6d86a26d81986fa72939e40faad
           resources:
             requests:
               cpu: 40m
diff --git a/third_party/istio-latest/net-istio.yaml b/third_party/istio-latest/net-istio.yaml
index 273479547..313c2a2bf 100644
--- a/third_party/istio-latest/net-istio.yaml
+++ b/third_party/istio-latest/net-istio.yaml
@@ -1,4 +1,4 @@
-# Generated when HEAD was 7a064359539e10f979e298ee90254c02fe0a50b3
+# Generated when HEAD was 9c91b9967f673d3d2c956eb1c3e1835139863ae0
 #
 # Copyright 2019 The Knative Authors
 #
@@ -20,7 +20,7 @@ metadata:
   # These are the permissions needed by the Istio Ingress implementation.
   name: knative-serving-istio
   labels:
-    serving.knative.dev/release: "v20201123-7a064359"
+    serving.knative.dev/release: "v20201124-9c91b996"
     serving.knative.dev/controller: "true"
     networking.knative.dev/ingress-provider: istio
 rules:
@@ -50,7 +50,7 @@ metadata:
   name: knative-ingress-gateway
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20201123-7a064359"
+    serving.knative.dev/release: "v20201124-9c91b996"
     networking.knative.dev/ingress-provider: istio
 spec:
   selector:
@@ -87,7 +87,7 @@ metadata:
   name: knative-local-gateway
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20201123-7a064359"
+    serving.knative.dev/release: "v20201124-9c91b996"
     networking.knative.dev/ingress-provider: istio
 spec:
   selector:
@@ -106,7 +106,7 @@ metadata:
   name: knative-local-gateway
   namespace: istio-system
   labels:
-    serving.knative.dev/release: "v20201123-7a064359"
+    serving.knative.dev/release: "v20201124-9c91b996"
     networking.knative.dev/ingress-provider: istio
 spec:
   type: ClusterIP
@@ -126,7 +126,7 @@ metadata:
   name: "webhook"
   namespace: "knative-serving"
   labels:
-    serving.knative.dev/release: "v20201123-7a064359"
+    serving.knative.dev/release: "v20201124-9c91b996"
     networking.knative.dev/ingress-provider: istio
 spec:
   selector:
@@ -141,7 +141,7 @@ metadata:
   name: "istio-webhook"
   namespace: "knative-serving"
   labels:
-    serving.knative.dev/release: "v20201123-7a064359"
+    serving.knative.dev/release: "v20201124-9c91b996"
     networking.knative.dev/ingress-provider: istio
 spec:
   selector:
@@ -170,7 +170,7 @@ kind: MutatingWebhookConfiguration
 metadata:
   name: webhook.istio.networking.internal.knative.dev
   labels:
-    serving.knative.dev/release: "v20201123-7a064359"
+    serving.knative.dev/release: "v20201124-9c91b996"
     networking.knative.dev/ingress-provider: istio
 webhooks:
   - admissionReviewVersions:
@@ -206,7 +206,7 @@ kind: ValidatingWebhookConfiguration
 metadata:
   name: config.webhook.istio.networking.internal.knative.dev
   labels:
-    serving.knative.dev/release: "v20201123-7a064359"
+    serving.knative.dev/release: "v20201124-9c91b996"
     networking.knative.dev/ingress-provider: istio
 webhooks:
   - admissionReviewVersions:
@@ -244,7 +244,7 @@ metadata:
   name: istio-webhook-certs
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20201123-7a064359"
+    serving.knative.dev/release: "v20201124-9c91b996"
     networking.knative.dev/ingress-provider: istio
 
 ---
@@ -268,7 +268,7 @@ metadata:
   name: config-istio
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20201123-7a064359"
+    serving.knative.dev/release: "v20201124-9c91b996"
     networking.knative.dev/ingress-provider: istio
 data:
   _example: |
@@ -338,7 +338,7 @@ metadata:
   name: networking-istio
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20201123-7a064359"
+    serving.knative.dev/release: "v20201124-9c91b996"
     networking.knative.dev/ingress-provider: istio
 spec:
   selector:
@@ -354,14 +354,14 @@ spec:
         sidecar.istio.io/inject: "false"
       labels:
         app: networking-istio
-        serving.knative.dev/release: "v20201123-7a064359"
+        serving.knative.dev/release: "v20201124-9c91b996"
     spec:
       serviceAccountName: controller
       containers:
         - name: networking-istio
           # This is the Go import path for the binary that is containerized
           # and substituted here.
-          image: gcr.io/knative-nightly/knative.dev/net-istio/cmd/controller@sha256:d61bb6172a37fb85701b265ade3cf14a687e443e1f2cdafa674ed024eb49d3b8
+          image: gcr.io/knative-nightly/knative.dev/net-istio/cmd/controller@sha256:c013212011ed808c64f7e6e94aa055993407c4ec1d5e706de39f311a9a02ac4e
           resources:
             requests:
               cpu: 30m
@@ -418,7 +418,7 @@ metadata:
   name: istio-webhook
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20201123-7a064359"
+    serving.knative.dev/release: "v20201124-9c91b996"
     networking.knative.dev/ingress-provider: istio
 spec:
   selector:
@@ -432,14 +432,14 @@ spec:
       labels:
         app: istio-webhook
         role: istio-webhook
-        serving.knative.dev/release: "v20201123-7a064359"
+        serving.knative.dev/release: "v20201124-9c91b996"
     spec:
       serviceAccountName: controller
       containers:
         - name: webhook
           # This is the Go import path for the binary that is containerized
           # and substituted here.
-          image: gcr.io/knative-nightly/knative.dev/net-istio/cmd/webhook@sha256:4d9d3f4b9c92e1a2e01ddf1a715973ce3da5a168ebc4399b7f5d84746b9dd1ff
+          image: gcr.io/knative-nightly/knative.dev/net-istio/cmd/webhook@sha256:e706c76ce6579e403f090b6cef0ae03c61472c6b0e3611011c97085bd9d95536
           resources:
             requests:
               cpu: 20m
@@ -493,7 +493,7 @@ metadata:
   namespace: knative-serving
   labels:
     role: istio-webhook
-    serving.knative.dev/release: "v20201123-7a064359"
+    serving.knative.dev/release: "v20201124-9c91b996"
     networking.knative.dev/ingress-provider: istio
 spec:
   ports: