Repository: knative/serving
Pull request #8204 (2020-06-04 19:33:41)

Always consider ObservedGeneration to determine readiness for v1
<!--
Request Prow to automatically lint any go code in this PR:

/lint
-->

Issue #8004

<!-- Please include the 'why' behind your changes if no issue exists -->
## Proposed Changes

- Ensuring that we are always considering ObservedGeneration when assessing readiness prevents race conditions where we might be looking at the wrong status (for a previous spec).
- Updates some tests that look for ready or for failed.

- Analogous PR for v1beta https://github.com/knative/serving/pull/8137

**Release Note**

<!-- Enter your extended release note in the below block. If the PR requires
additional action from users switching to the new release, include the string
"action required". If no release note is required, write "NONE". -->

```release-note

```


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

This pull-request has been approved by: *<a href="https://github.com/knative/serving/pull/8204#" title="Author self-approved">whaught</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **mattmoor**
You can assign the PR to them by writing `/assign @mattmoor` 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:

- **[pkg/apis/OWNERS](https://github.com/knative/serving/blob/master/pkg/apis/OWNERS)**
- **[pkg/reconciler/OWNERS](https://github.com/knative/serving/blob/master/pkg/reconciler/OWNERS)**
- **[test/OWNERS](https://github.com/knative/serving/blob/master/test/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":["mattmoor"]} -->
knative-metrics-robot: The following is the coverage report on the affected files.
Say `/test pull-knative-serving-go-coverage` to re-run this coverage report

File | Old Coverage | New Coverage | Delta
---- |:------------:|:------------:|:-----:
[pkg/apis/serving/v1/configuration_lifecycle.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_serving/8204/pull-knative-serving-go-coverage/1268627101905326080/artifacts/line-cov.html#file0) | 93.3% | 93.8% | 0.4
[pkg/apis/serving/v1/revision_lifecycle.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_serving/8204/pull-knative-serving-go-coverage/1268627101905326080/artifacts/line-cov.html#file1) | 89.5% | 89.7% | 0.3
[pkg/apis/serving/v1/route_lifecycle.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_serving/8204/pull-knative-serving-go-coverage/1268627101905326080/artifacts/line-cov.html#file2) | 100.0% | 87.5% | -12.5
[pkg/apis/serving/v1/service_lifecycle.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_serving/8204/pull-knative-serving-go-coverage/1268627101905326080/artifacts/line-cov.html#file3) | 100.0% | 93.3% | -6.7

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

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-serving-build-tests | de65de31532ff6da1a5060e64f575d1bbcd72d19 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_serving/8204/pull-knative-serving-build-tests/1268627101901131777) | `/test pull-knative-serving-build-tests`

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

<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-metrics-robot: The following is the coverage report on the affected files.
Say `/test pull-knative-serving-go-coverage` to re-run this coverage report

File | Old Coverage | New Coverage | Delta
---- |:------------:|:------------:|:-----:
[pkg/apis/serving/v1/configuration_lifecycle.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_serving/8204/pull-knative-serving-go-coverage/1268636161396445187/artifacts/line-cov.html#file0) | 93.3% | 93.8% | 0.4
[pkg/apis/serving/v1/revision_lifecycle.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_serving/8204/pull-knative-serving-go-coverage/1268636161396445187/artifacts/line-cov.html#file1) | 89.5% | 89.7% | 0.3
[pkg/apis/serving/v1/route_lifecycle.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_serving/8204/pull-knative-serving-go-coverage/1268636161396445187/artifacts/line-cov.html#file2) | 100.0% | 87.5% | -12.5
[pkg/apis/serving/v1/service_lifecycle.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_serving/8204/pull-knative-serving-go-coverage/1268636161396445187/artifacts/line-cov.html#file3) | 100.0% | 93.3% | -6.7
[pkg/reconciler/configuration/configuration.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_serving/8204/pull-knative-serving-go-coverage/1268636161396445187/artifacts/line-cov.html#file4) | 93.5% | 94.4% | 0.9

knative-metrics-robot: The following is the coverage report on the affected files.
Say `/test pull-knative-serving-go-coverage` to re-run this coverage report

File | Old Coverage | New Coverage | Delta
---- |:------------:|:------------:|:-----:
[pkg/apis/serving/v1/configuration_lifecycle.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_serving/8204/pull-knative-serving-go-coverage/1268638050267697153/artifacts/line-cov.html#file0) | 93.3% | 94.4% | 1.1
[pkg/apis/serving/v1/revision_lifecycle.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_serving/8204/pull-knative-serving-go-coverage/1268638050267697153/artifacts/line-cov.html#file1) | 89.5% | 90.2% | 0.8
[pkg/apis/serving/v1/route_lifecycle.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_serving/8204/pull-knative-serving-go-coverage/1268638050267697153/artifacts/line-cov.html#file2) | 100.0% | 93.8% | -6.2


Patch:
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
index 35a0be8b7..f6e54c260 100644
--- a/DEVELOPMENT.md
+++ b/DEVELOPMENT.md
@@ -28,8 +28,6 @@ You must install these tools:
 1. [`go`](https://golang.org/doc/install): The language `Knative Serving` is
    built in (1.13 or later)
 1. [`git`](https://help.github.com/articles/set-up-git/): For source control
-1. [`dep`](https://github.com/golang/dep): For managing external Go
-   dependencies.
 1. [`ko`](https://github.com/google/ko): For development.
 1. [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/): For
    managing development environments.
@@ -208,20 +206,24 @@ ko delete -f config/post-install/default-domain.yaml --ignore-not-found
 ko apply -f config/post-install/default-domain.yaml
 ```
 
-The above step is equivalent to applying the `serving.yaml` for released
-versions of Knative Serving.
+The above step is equivalent to applying the `serving-crds.yaml`,
+`serving-core.yaml`, `serving-hpa.yaml` and `serving-nscert.yaml` for released
+versions of Knative Serving and additionally applying **net-istio** as the
+ingress implementation.
 
 You can see things running with:
 
 ```console
 kubectl -n knative-serving get pods
-NAME                                READY   STATUS      RESTARTS   AGE
-activator-5b87795885-f8t7k          2/2     Running     0          18m
-autoscaler-6495f7f79d-86jsr         2/2     Running     0          18m
-controller-5fd7fddc58-klmt4         1/1     Running     0          18m
-default-domain-6hs98                0/1     Completed   0          13s
-networking-istio-6755db495d-wtj4d   1/1     Running     0          18m
-webhook-84b8c9886d-dsqqv            1/1     Running     0          18m
+NAME                                  READY   STATUS    RESTARTS   AGE
+activator-7454cd659f-rrz86            1/1     Running   0          105s
+autoscaler-58cbfd4985-fl5h7           1/1     Running   0          105s
+autoscaler-hpa-77964b9b8c-9sbgq       1/1     Running   0          105s
+controller-847b7cc977-5mvvq           1/1     Running   0          105s
+istio-webhook-69bf66f869-cgc4l        1/1     Running   0          105s
+networking-istio-dcf7944fb-5m25h      1/1     Running   0          105s
+networking-ns-cert-56c58544db-sgstd   1/1     Running   0          105s
+webhook-6b6c77567f-flr59              1/1     Running   0          105s
 ```
 
 You can access the Knative Serving Controller's logs with:
@@ -262,15 +264,15 @@ of:
   - The `_example` value of config maps (to keep the
     `knative.dev/example-checksum` label in sync).
 
-- **If you change a package's deps** (including adding external dep), then you
-  must run [`./hack/update-deps.sh`](./hack/update-deps.sh).
+- **If you change a package's deps** (including adding an external dependency),
+  then you must run [`./hack/update-deps.sh`](./hack/update-deps.sh).
 
 These are both idempotent, and we expect that running these at `HEAD` to have no
 diffs. Code generation and dependencies are automatically checked to produce no
 diffs for each pull request.
 
-update-deps.sh runs "dep ensure" command. In some cases, if newer dependencies
-are required, you need to run "dep ensure -update package-name" manually.
+update-deps.sh runs go get/mod command. In some cases, if newer dependencies are
+required, you need to run "go get" manually.
 
 Once the codegen and dependency information is correct, redeploying the
 controller is simply:
@@ -282,6 +284,14 @@ ko apply -f config/controller.yaml
 Or you can [clean it up completely](./DEVELOPMENT.md#clean-up) and
 [completely redeploy `Knative Serving`](./DEVELOPMENT.md#starting-knative-serving).
 
+### Updating existing dependencies
+
+To update existing dependencies execute
+
+```shell
+./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh
+```
+
 ## Clean up
 
 You can delete all of the service components with:
diff --git a/cmd/queue/main.go b/cmd/queue/main.go
index 57d06206a..628ca5f5d 100644
--- a/cmd/queue/main.go
+++ b/cmd/queue/main.go
@@ -169,8 +169,8 @@ func proxyHandler(breaker *queue.Breaker, stats *network.RequestStats, tracingEn
 }
 
 func preferPodForScaledown(downwardAPILabelsPath string) (bool, error) {
-	// Short circuit a rejection when no label path file is mounted
-	if _, err := os.Stat(downwardAPILabelsPath); os.IsNotExist(err) {
+	// If downwardAPILabelsPath is empty, feature is disabled.
+	if downwardAPILabelsPath == "" {
 		return false, nil
 	}
 
@@ -281,13 +281,17 @@ func probeQueueHealthPath(timeoutSeconds int, env probeConfig) error {
 		defer res.Body.Close()
 		success := health.IsHTTPProbeReady(res)
 
-		// The check for preferForScaledown() fails readiness faster
-		// in the presence of the label
+		// Both preferPodForScaledown and IsHTTPProbeShuttingDown can fail readiness faster.
+		// The check for preferPodForScaledown() fails readiness faster in the presence of the label,
+		// while shutting down has a different response code than not ready.
 		if preferScaleDown, err := preferPodForScaledown(env.DownwardAPILabelsPath); err != nil {
 			fmt.Fprintln(os.Stderr, err)
 		} else if !success && preferScaleDown {
 			return false, errors.New("failing probe deliberately for pod scaledown")
 		}
+		if health.IsHTTPProbeShuttingDown(res) {
+			return false, errors.New("failing probe deliberately for shutdown")
+		}
 		return success, nil
 	}, ctx.Done())
 
diff --git a/config/core/configmaps/autoscaler.yaml b/config/core/configmaps/autoscaler.yaml
index 93730f9b3..cb8a50a6c 100644
--- a/config/core/configmaps/autoscaler.yaml
+++ b/config/core/configmaps/autoscaler.yaml
@@ -19,7 +19,8 @@ metadata:
   namespace: knative-serving
   labels:
     serving.knative.dev/release: devel
-    knative.dev/example-checksum: "b2d0685a"
+  annotations:
+    knative.dev/example-checksum: "62090295"
 data:
   _example: |
     ################################
diff --git a/config/core/configmaps/defaults.yaml b/config/core/configmaps/defaults.yaml
index 65498adf1..e05e9595a 100644
--- a/config/core/configmaps/defaults.yaml
+++ b/config/core/configmaps/defaults.yaml
@@ -19,7 +19,8 @@ metadata:
   namespace: knative-serving
   labels:
     serving.knative.dev/release: devel
-    knative.dev/example-checksum: "7610427c"
+  annotations:
+    knative.dev/example-checksum: c3699c6c
 data:
   _example: |
     ################################
diff --git a/config/core/configmaps/deployment.yaml b/config/core/configmaps/deployment.yaml
index 95454a506..1289e4859 100644
--- a/config/core/configmaps/deployment.yaml
+++ b/config/core/configmaps/deployment.yaml
@@ -19,7 +19,8 @@ metadata:
   namespace: knative-serving
   labels:
     serving.knative.dev/release: devel
-    knative.dev/example-checksum: "cf88a4cf"
+  annotations:
+    knative.dev/example-checksum: 3d5b261a
 data:
   # This is the Go import path for the binary that is containerized
   # and substituted here.
diff --git a/config/core/configmaps/domain.yaml b/config/core/configmaps/domain.yaml
index 1c4898de1..2b013e0ba 100644
--- a/config/core/configmaps/domain.yaml
+++ b/config/core/configmaps/domain.yaml
@@ -19,7 +19,8 @@ metadata:
   namespace: knative-serving
   labels:
     serving.knative.dev/release: devel
-    knative.dev/example-checksum: "327d2082"
+  annotations:
+    knative.dev/example-checksum: aa261100
 data:
   _example: |
     ################################
diff --git a/config/core/configmaps/features.yaml b/config/core/configmaps/features.yaml
index 010236e82..4c1245eba 100644
--- a/config/core/configmaps/features.yaml
+++ b/config/core/configmaps/features.yaml
@@ -19,7 +19,8 @@ metadata:
   namespace: knative-serving
   labels:
     serving.knative.dev/release: devel
-    knative.dev/example-checksum: "303e565f"
+  annotations:
+    knative.dev/example-checksum: 84c3c6c3
 data:
   _example: |
     ################################
diff --git a/config/core/configmaps/gc.yaml b/config/core/configmaps/gc.yaml
index bba83da51..7f23dcfba 100644
--- a/config/core/configmaps/gc.yaml
+++ b/config/core/configmaps/gc.yaml
@@ -19,7 +19,8 @@ metadata:
   namespace: knative-serving
   labels:
     serving.knative.dev/release: devel
-    knative.dev/example-checksum: "7a8e5402"
+  annotations:
+    knative.dev/example-checksum: eb64daa7
 data:
   _example: |
     ################################
diff --git a/config/core/configmaps/leader-election.yaml b/config/core/configmaps/leader-election.yaml
index 7fc2a1a6d..907f37354 100644
--- a/config/core/configmaps/leader-election.yaml
+++ b/config/core/configmaps/leader-election.yaml
@@ -19,7 +19,8 @@ metadata:
   namespace: knative-serving
   labels:
     serving.knative.dev/release: devel
-    knative.dev/example-checksum: "82c28949"
+  annotations:
+    knative.dev/example-checksum: c517f87a
 data:
   _example: |
     ################################
diff --git a/config/core/configmaps/logging.yaml b/config/core/configmaps/logging.yaml
index b1bc952d9..694724d22 100644
--- a/config/core/configmaps/logging.yaml
+++ b/config/core/configmaps/logging.yaml
@@ -19,7 +19,8 @@ metadata:
   namespace: knative-serving
   labels:
     serving.knative.dev/release: devel
-    knative.dev/example-checksum: "3199de9f"
+  annotations:
+    knative.dev/example-checksum: f83a0082
 data:
   _example: |
     ################################
diff --git a/config/core/configmaps/network.yaml b/config/core/configmaps/network.yaml
index 690527e66..228b677d9 100644
--- a/config/core/configmaps/network.yaml
+++ b/config/core/configmaps/network.yaml
@@ -19,7 +19,8 @@ metadata:
   namespace: knative-serving
   labels:
     serving.knative.dev/release: devel
-    knative.dev/example-checksum: "8b4ff3d6"
+  annotations:
+    knative.dev/example-checksum: fe214c76
 data:
   _example: |
     ################################
diff --git a/config/core/configmaps/observability.yaml b/config/core/configmaps/observability.yaml
index 7a3dece85..be1141460 100644
--- a/config/core/configmaps/observability.yaml
+++ b/config/core/configmaps/observability.yaml
@@ -19,7 +19,8 @@ metadata:
   namespace: knative-serving
   labels:
     serving.knative.dev/release: devel
-    knative.dev/example-checksum: "26889b7b"
+  annotations:
+    knative.dev/example-checksum: 5ec1a71c
 data:
   _example: |
     ################################
diff --git a/config/core/configmaps/tracing.yaml b/config/core/configmaps/tracing.yaml
index 330d5af33..3a17d9449 100644
--- a/config/core/configmaps/tracing.yaml
+++ b/config/core/configmaps/tracing.yaml
@@ -19,7 +19,8 @@ metadata:
   namespace: knative-serving
   labels:
     serving.knative.dev/release: devel
-    knative.dev/example-checksum: "e359bd08"
+  annotations:
+    knative.dev/example-checksum: 35dc6aa4
 data:
   _example: |
     ################################
diff --git a/go.mod b/go.mod
index 69d59c85e..dc394521a 100644
--- a/go.mod
+++ b/go.mod
@@ -42,9 +42,9 @@ require (
 	k8s.io/code-generator v0.18.0
 	k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29
 	k8s.io/metrics v0.17.6
-	knative.dev/caching v0.0.0-20200521155757-e78d17bc250e
-	knative.dev/pkg v0.0.0-20200603222317-b79e4a24ca50
-	knative.dev/test-infra v0.0.0-20200604135317-9be2b638d932
+	knative.dev/caching v0.0.0-20200604203019-a5bd4f5d0e4f
+	knative.dev/pkg v0.0.0-20200605170718-b7125260dc6f
+	knative.dev/test-infra v0.0.0-20200605173118-26a648be867f
 )
 
 // pin the older grpc - see: https://github.com/grpc/grpc-go/issues/3180
diff --git a/go.sum b/go.sum
index 4545916e9..d81d57699 100644
--- a/go.sum
+++ b/go.sum
@@ -1308,8 +1308,8 @@ k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl
 k8s.io/utils v0.0.0-20200124190032-861946025e34 h1:HjlUD6M0K3P8nRXmr2B9o4F9dUy9TCj/aEpReeyi6+k=
 k8s.io/utils v0.0.0-20200124190032-861946025e34/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
 knative.dev/caching v0.0.0-20190719140829-2032732871ff/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
-knative.dev/caching v0.0.0-20200521155757-e78d17bc250e h1:LN2scNClE8G4a9XzM0AGZkK/rT56A0ZlweaMjNzPMD0=
-knative.dev/caching v0.0.0-20200521155757-e78d17bc250e/go.mod h1:bsKPIG2XZFYL8uw5BAxg7EMBLp0vNpu9jZIGus8HUPU=
+knative.dev/caching v0.0.0-20200604203019-a5bd4f5d0e4f h1:aYxtvdMcdub6gZVCvsE+1xJRl7kX0yruvPfD8oe7OYQ=
+knative.dev/caching v0.0.0-20200604203019-a5bd4f5d0e4f/go.mod h1:7ViMPljYdI1vRAv9Yptyw76i8LF3IHBGGHX27ObT+Qk=
 knative.dev/eventing-contrib v0.6.1-0.20190723221543-5ce18048c08b/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
 knative.dev/pkg v0.0.0-20191101194912-56c2594e4f11/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
 knative.dev/pkg v0.0.0-20191111150521-6d806b998379/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
@@ -1320,10 +1320,10 @@ knative.dev/pkg v0.0.0-20200515002500-16d7b963416f/go.mod h1:tMOHGbxtRz8zYFGEGpV
 knative.dev/pkg v0.0.0-20200519155757-14eb3ae3a5a7 h1:9S2r59HZJF9nKvoRLg5zJzx6XpVlVyvVRqz/C/h6h2s=
 knative.dev/pkg v0.0.0-20200519155757-14eb3ae3a5a7/go.mod h1:QgNZTxnwpB/oSpNcfnLVlw+WpEwwyKAvJlvR3hgeltA=
 knative.dev/pkg v0.0.0-20200520073958-94316e20e860/go.mod h1:QgNZTxnwpB/oSpNcfnLVlw+WpEwwyKAvJlvR3hgeltA=
-knative.dev/pkg v0.0.0-20200603004717-9d862737e5c1 h1:RdPH0bgm61DQ/azXkQq04pwFnaHH9xSL5yJ9+X2nuiQ=
-knative.dev/pkg v0.0.0-20200603004717-9d862737e5c1/go.mod h1:8IfPj/lpuKHHg82xZCl2wuFZ3BM96To72sN1W8T9wjQ=
 knative.dev/pkg v0.0.0-20200603222317-b79e4a24ca50 h1:sbJMCCtOENPgfE5dUSwBUxZtJzhfqORhExyWFX7L0Fk=
 knative.dev/pkg v0.0.0-20200603222317-b79e4a24ca50/go.mod h1:8IfPj/lpuKHHg82xZCl2wuFZ3BM96To72sN1W8T9wjQ=
+knative.dev/pkg v0.0.0-20200605170718-b7125260dc6f h1:2WVJ2b5Yws8klA2yCNkprY8EaQAR/mCVdV9XeI/4/Y0=
+knative.dev/pkg v0.0.0-20200605170718-b7125260dc6f/go.mod h1:ItJ3UvcHFt7qMoowI2uXfaGMWNGIMYAtzAbdsi+b0Cg=
 knative.dev/test-infra v0.0.0-20200407185800-1b88cb3b45a5/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
 knative.dev/test-infra v0.0.0-20200505052144-5ea2f705bb55/go.mod h1:WqF1Azka+FxPZ20keR2zCNtiQA1MP9ZB4BH4HuI+SIU=
 knative.dev/test-infra v0.0.0-20200513011557-d03429a76034 h1:JxqONCZVS7or+Fv3ebVQoipuIBH7Ig3Qbx170hgIF+A=
@@ -1334,8 +1334,10 @@ knative.dev/test-infra v0.0.0-20200519161858-554a95a37986 h1:ZDy43jkWPQ75d4l4DGy
 knative.dev/test-infra v0.0.0-20200519161858-554a95a37986/go.mod h1:LeNa1Wvn47efeQUkpkn3XG7Fx9Ga+rhAP13SZyjaEGg=
 knative.dev/test-infra v0.0.0-20200522180958-6a0a9b9d893a h1:c0qTABRcNoxZVu5gsryLWPZtGa/s4zsvovz0nGefuzg=
 knative.dev/test-infra v0.0.0-20200522180958-6a0a9b9d893a/go.mod h1:n9eQkzmSNj8BiqNFl1lzoz68D09uMeJfyOjc132Gbik=
-knative.dev/test-infra v0.0.0-20200604135317-9be2b638d932 h1:7ec3js+msarJKT/GNo9w0S8YOnFUJqaCjvBxrNbzfns=
-knative.dev/test-infra v0.0.0-20200604135317-9be2b638d932/go.mod h1:Iyv1UFMGA1K/qRXYLQPwx1Rm/UIFo0RcaKAjGKdSe8c=
+knative.dev/test-infra v0.0.0-20200605033518-4b5d9e1bbdbe h1:8jvsC2cS3Xc/KOPnCOJSpxtQqgx8ZoDPEgaoRrNq8Uk=
+knative.dev/test-infra v0.0.0-20200605033518-4b5d9e1bbdbe/go.mod h1:wsGme3loBZjSjhuaTUhejJ34EOwKZ5KXkweKL0zSKhM=
+knative.dev/test-infra v0.0.0-20200605173118-26a648be867f h1:VEhKLxXX9vhijAquw8I8sr0PhgsLQmZdwVqQ27h0oW8=
+knative.dev/test-infra v0.0.0-20200605173118-26a648be867f/go.mod h1://I6IZIF0QDgs5wotU243ZZ5cTpm6/GthayjUenBBc0=
 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/hack/generate-yamls.sh b/hack/generate-yamls.sh
index 4343957b2..5e7421785 100755
--- a/hack/generate-yamls.sh
+++ b/hack/generate-yamls.sh
@@ -48,13 +48,11 @@ fi
 rm -fr ${YAML_OUTPUT_DIR}/*.yaml
 
 # Generated Knative component YAML files
-readonly SERVING_YAML=${YAML_OUTPUT_DIR}/serving.yaml
 readonly SERVING_CORE_YAML=${YAML_OUTPUT_DIR}/serving-core.yaml
 readonly SERVING_DEFAULT_DOMAIN_YAML=${YAML_OUTPUT_DIR}/serving-default-domain.yaml
 readonly SERVING_STORAGE_VERSION_MIGRATE_YAML=${YAML_OUTPUT_DIR}/serving-storage-version-migration.yaml
 readonly SERVING_HPA_YAML=${YAML_OUTPUT_DIR}/serving-hpa.yaml
 readonly SERVING_CRD_YAML=${YAML_OUTPUT_DIR}/serving-crds.yaml
-readonly SERVING_CERT_MANAGER_YAML=${YAML_OUTPUT_DIR}/serving-cert-manager.yaml
 readonly SERVING_NSCERT_YAML=${YAML_OUTPUT_DIR}/serving-nscert.yaml
 
 readonly MONITORING_FILES=${YAML_OUTPUT_DIR}/monitoring.lst
@@ -96,17 +94,9 @@ ko resolve ${KO_YAML_FLAGS} -f config/core/resources/ -f config/300-imagecache.y
 # Create hpa-class autoscaling related yaml
 ko resolve ${KO_YAML_FLAGS} -f config/hpa-autoscaling/ | "${LABEL_YAML_CMD[@]}" > "${SERVING_HPA_YAML}"
 
-# Create cert-manager related yaml
-cat "./third_party/cert-manager-0.12.0/net-certmanager.yaml" > "${SERVING_CERT_MANAGER_YAML}"
-
 # Create nscert related yaml
 ko resolve ${KO_YAML_FLAGS} -f config/namespace-wildcard-certs | "${LABEL_YAML_CMD[@]}" > "${SERVING_NSCERT_YAML}"
 
-# Create serving.yaml with all of the default components
-cat "${SERVING_CORE_YAML}" > "${SERVING_YAML}"
-cat "${SERVING_HPA_YAML}" >> "${SERVING_YAML}"
-cat "./third_party/net-istio.yaml" >> "${SERVING_YAML}"
-
 # Metrics via Prometheus & Grafana
 ko resolve ${KO_YAML_FLAGS} -R \
     -f third_party/config/monitoring/metrics/prometheus \
@@ -149,16 +139,14 @@ ko resolve ${KO_YAML_FLAGS} -R -f config/monitoring/tracing/jaeger/memory -f con
 
 echo "All manifests generated"
 
-# List generated YAML files, with serving.yaml first.
+# List generated YAML files, with serving-core.yaml first.
 
 cat << EOF > ${YAML_LIST_FILE}
-${SERVING_YAML}
 ${SERVING_CORE_YAML}
 ${SERVING_DEFAULT_DOMAIN_YAML}
 ${SERVING_STORAGE_VERSION_MIGRATE_YAML}
 ${SERVING_HPA_YAML}
 ${SERVING_CRD_YAML}
-${SERVING_CERT_MANAGER_YAML}
 ${SERVING_NSCERT_YAML}
 ${MONITORING_FILES}
 ${MONITORING_YAML}
diff --git a/hack/update-deps.sh b/hack/update-deps.sh
index 5e5001b3f..d71f2e821 100755
--- a/hack/update-deps.sh
+++ b/hack/update-deps.sh
@@ -62,11 +62,15 @@ go mod vendor
 echo "Applying patches"
 git apply ${REPO_ROOT_DIR}/hack/patches/*.patch
 
+echo "Removing unwanted vendor files"
+
 # Remove unwanted vendor files
 find vendor/ \( -name "OWNERS" -o -name "*_test.go" \) -print0 | xargs -0 rm -f
 
 export GOFLAGS=-mod=vendor
 
+echo "Updating licenses"
 update_licenses third_party/VENDOR-LICENSE "./..."
 
+echo "Removing broken symlinks"
 remove_broken_symlinks ./vendor
diff --git a/pkg/activator/net/lb_policy.go b/pkg/activator/net/lb_policy.go
index 3c6025b74..c8bd7e1c2 100644
--- a/pkg/activator/net/lb_policy.go
+++ b/pkg/activator/net/lb_policy.go
@@ -36,6 +36,39 @@ func randomLBPolicy(_ context.Context, targets []*podTracker) (func(), *podTrack
 	return noop, targets[rand.Intn(len(targets))]
 }
 
+// randomChoice2 implements the Power of 2 choices LB algorithm
+func randomChoice2(_ context.Context, targets []*podTracker) (func(), *podTracker) {
+	// Avoid random if possible.
+	l := len(targets)
+	// One tracker = no choice.
+	if l == 1 {
+		targets[0].addWeight(1)
+		return func() {
+			targets[0].addWeight(-1)
+		}, targets[0]
+	}
+	r1, r2 := 0, 1
+	// Two trackers - we know the both contestants,
+	// otherwise pick 2 random unequal integers.
+	if l > 2 {
+		r1, r2 = rand.Intn(l), rand.Intn(l)
+		for r1 == r2 {
+			r2 = rand.Intn(l)
+		}
+	}
+
+	t1, t2 := targets[r1], targets[r2]
+	// Possible race here, but this policy is for CC=0,
+	// so fine.
+	if t1.getWeight() > t2.getWeight() {
+		t1, t2 = t2, t1
+	}
+	t1.addWeight(1)
+	return func() {
+		t1.addWeight(-1)
+	}, t1
+}
+
 // firstAvailableLBPolicy is a load balancer policy, that picks the first target
 // that has capacity to serve the request right now.
 func firstAvailableLBPolicy(ctx context.Context, targets []*podTracker) (func(), *podTracker) {
diff --git a/pkg/activator/net/throttler.go b/pkg/activator/net/throttler.go
index f3dd23fc9..1728c4314 100644
--- a/pkg/activator/net/throttler.go
+++ b/pkg/activator/net/throttler.go
@@ -70,6 +70,16 @@ var (
 type podTracker struct {
 	dest string
 	b    breaker
+	// weight is used for LB policy implementations.
+	weight int32
+}
+
+func (p *podTracker) addWeight(w int32) {
+	atomic.AddInt32(&p.weight, w)
+}
+
+func (p *podTracker) getWeight() int32 {
+	return atomic.LoadInt32(&p.weight)
 }
 
 func (p *podTracker) String() string {
@@ -155,7 +165,7 @@ func newRevisionThrottler(revID types.NamespacedName,
 	)
 	if containerConcurrency == 0 {
 		revBreaker = newInfiniteBreaker(logger)
-		lbp = randomLBPolicy
+		lbp = randomChoice2
 	} else {
 		revBreaker = queue.NewBreaker(breakerParams)
 		lbp = firstAvailableLBPolicy
diff --git a/pkg/apis/autoscaling/annotation_validation.go b/pkg/apis/autoscaling/annotation_validation.go
index 518faae0a..3551284b9 100644
--- a/pkg/apis/autoscaling/annotation_validation.go
+++ b/pkg/apis/autoscaling/annotation_validation.go
@@ -20,6 +20,7 @@ import (
 	"fmt"
 	"math"
 	"strconv"
+	"strings"
 	"time"
 
 	"knative.dev/pkg/apis"
@@ -49,11 +50,20 @@ func ValidateAnnotations(allowInitScaleZero bool, anns map[string]string) *apis.
 	if len(anns) == 0 {
 		return nil
 	}
-	return validateMinMaxScale(anns).Also(validateFloats(anns)).
+	return validateClass(anns).Also(validateMinMaxScale(anns)).Also(validateFloats(anns)).
 		Also(validateWindow(anns).Also(validateLastPodRetention(anns)).
 			Also(validateMetric(anns).Also(validateInitialScale(allowInitScaleZero, anns))))
 }
 
+func validateClass(annotations map[string]string) *apis.FieldError {
+	if c, ok := annotations[ClassAnnotationKey]; ok {
+		if strings.HasSuffix(c, domain) && c != KPA && c != HPA {
+			return apis.ErrInvalidValue(c, ClassAnnotationKey)
+		}
+	}
+	return nil
+}
+
 func validateFloats(annotations map[string]string) *apis.FieldError {
 	var errs *apis.FieldError
 	if v, ok := annotations[PanicWindowPercentageAnnotationKey]; ok {
diff --git a/pkg/apis/autoscaling/register.go b/pkg/apis/autoscaling/register.go
index 2c26d4dd5..02f85ae8c 100644
--- a/pkg/apis/autoscaling/register.go
+++ b/pkg/apis/autoscaling/register.go
@@ -19,6 +19,8 @@ package autoscaling
 import "time"
 
 const (
+	domain = ".knative.dev"
+
 	// InternalGroupName is the internal autoscaling group name. This is used for CRDs.
 	InternalGroupName = "autoscaling.internal.knative.dev"
 
diff --git a/pkg/apis/config/defaults.go b/pkg/apis/config/defaults.go
index 214e73641..57fff44e0 100644
--- a/pkg/apis/config/defaults.go
+++ b/pkg/apis/config/defaults.go
@@ -24,6 +24,7 @@ import (
 	"math"
 	"text/template"
 
+	lru "github.com/hashicorp/golang-lru"
 	corev1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/api/resource"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -47,17 +48,30 @@ const (
 	DefaultUserContainerName = "user-container"
 
 	// DefaultContainerConcurrency is the default container concurrency. It will be set if ContainerConcurrency is not specified.
-	DefaultContainerConcurrency int64 = 0
+	DefaultContainerConcurrency = 0
 
 	// DefaultMaxRevisionContainerConcurrency is the maximum configurable
 	// container concurrency.
-	DefaultMaxRevisionContainerConcurrency int64 = 1000
+	DefaultMaxRevisionContainerConcurrency = 1000
 
 	// DefaultAllowContainerConcurrencyZero is whether, by default,
 	// containerConcurrency can be set to zero (i.e. unbounded) by users.
-	DefaultAllowContainerConcurrencyZero bool = true
+	DefaultAllowContainerConcurrencyZero = true
 )
 
+var (
+	templateCache *lru.Cache
+
+	// Verify the default template is valid.
+	_ = template.Must(template.New("user-container-template").Parse(DefaultUserContainerName))
+)
+
+func init() {
+	// The only failure is due to negative size.
+	// Store 10 latest templates.
+	templateCache, _ = lru.New(10)
+}
+
 func defaultDefaultsConfig() *Defaults {
 	return &Defaults{
 		RevisionTimeoutSeconds:        DefaultRevisionTimeoutSeconds,
@@ -113,6 +127,7 @@ func NewDefaultsConfigFromMap(data map[string]string) (*Defaults, error) {
 	if err := tmpl.Execute(ioutil.Discard, metav1.ObjectMeta{}); err != nil {
 		return nil, fmt.Errorf("error executing template: %w", err)
 	}
+	templateCache.Add(nc.UserContainerNameTemplate, tmpl)
 
 	return nc, nil
 }
@@ -151,8 +166,14 @@ type Defaults struct {
 
 // UserContainerName returns the name of the user container based on the context.
 func (d *Defaults) UserContainerName(ctx context.Context) string {
-	tmpl := template.Must(
-		template.New("user-container").Parse(d.UserContainerNameTemplate))
+	var tmpl *template.Template
+	if tt, ok := templateCache.Get(d.UserContainerNameTemplate); ok {
+		tmpl = tt.(*template.Template)
+	} else {
+		// Fallback for unit tests.
+		tmpl = template.Must(
+			template.New("user-container").Parse(d.UserContainerNameTemplate))
+	}
 	buf := &bytes.Buffer{}
 	if err := tmpl.Execute(buf, apis.ParentMeta(ctx)); err != nil {
 		return ""
diff --git a/pkg/apis/serving/v1/configuration_lifecycle.go b/pkg/apis/serving/v1/configuration_lifecycle.go
index ff410e952..adb0f87d0 100644
--- a/pkg/apis/serving/v1/configuration_lifecycle.go
+++ b/pkg/apis/serving/v1/configuration_lifecycle.go
@@ -30,13 +30,32 @@ func (*Configuration) GetConditionSet() apis.ConditionSet {
 }
 
 // GetGroupVersionKind returns the GroupVersionKind.
-func (r *Configuration) GetGroupVersionKind() schema.GroupVersionKind {
+func (*Configuration) GetGroupVersionKind() schema.GroupVersionKind {
 	return SchemeGroupVersion.WithKind("Configuration")
 }
 
-// IsReady returns if the configuration is ready to serve the requested configuration.
-func (cs *ConfigurationStatus) IsReady() bool {
-	return configCondSet.Manage(cs).IsHappy()
+// IsReady returns true if the Status condition ConfigurationConditionReady
+// is true and the latest spec has been observed.
+func (c *Configuration) IsReady() bool {
+	cs := c.Status
+	return cs.ObservedGeneration == c.Generation &&
+		cs.GetCondition(ConfigurationConditionReady).IsTrue()
+}
+
+// IsFailed returns true if the resource has observed
+// the latest generation and ready is false.
+func (c *Configuration) IsFailed() bool {
+	cs := c.Status
+	return cs.ObservedGeneration == c.Generation &&
+		cs.GetCondition(ConfigurationConditionReady).IsFalse()
+}
+
+// IsLatestReadyRevisionNameUpToDate returns true if the Configuration is ready
+// and LatestCreateRevisionName is equal to LatestReadyRevisionName. Otherwise
+// it returns false.
+func (c *Configuration) IsLatestReadyRevisionNameUpToDate() bool {
+	return c.IsReady() &&
+		c.Status.LatestCreatedRevisionName == c.Status.LatestReadyRevisionName
 }
 
 // InitializeConditions sets the initial values to the conditions.
@@ -51,14 +70,6 @@ func (cs *ConfigurationSpec) GetTemplate() *RevisionTemplateSpec {
 	return &cs.Template
 }
 
-// IsLatestReadyRevisionNameUpToDate returns true if the Configuration is ready
-// and LatestCreateRevisionName is equal to LatestReadyRevisionName. Otherwise
-// it returns false.
-func (cs *ConfigurationStatus) IsLatestReadyRevisionNameUpToDate() bool {
-	return cs.IsReady() &&
-		cs.LatestCreatedRevisionName == cs.LatestReadyRevisionName
-}
-
 func (cs *ConfigurationStatus) SetLatestCreatedRevisionName(name string) {
 	cs.LatestCreatedRevisionName = name
 	if cs.LatestReadyRevisionName != name {
diff --git a/pkg/apis/serving/v1/revision_lifecycle.go b/pkg/apis/serving/v1/revision_lifecycle.go
index 1b7649c3b..3fb607763 100644
--- a/pkg/apis/serving/v1/revision_lifecycle.go
+++ b/pkg/apis/serving/v1/revision_lifecycle.go
@@ -62,9 +62,20 @@ func (r *Revision) GetGroupVersionKind() schema.GroupVersionKind {
 	return SchemeGroupVersion.WithKind("Revision")
 }
 
-// IsReady returns if the revision is ready to serve the requested configuration.
-func (rs *RevisionStatus) IsReady() bool {
-	return revisionCondSet.Manage(rs).IsHappy()
+// IsReady returns true if the Status condition RevisionConditionReady
+// is true and the latest spec has been observed.
+func (r *Revision) IsReady() bool {
+	rs := r.Status
+	return rs.ObservedGeneration == r.Generation &&
+		rs.GetCondition(RevisionConditionReady).IsTrue()
+}
+
+// IsFailed returns true if the resource has observed the latest generation
+// and ready is false.
+func (r *Revision) IsFailed() bool {
+	rs := r.Status
+	return rs.ObservedGeneration == r.Generation &&
+		rs.GetCondition(RevisionConditionReady).IsFalse()
 }
 
 // GetContainerConcurrency returns the container concurrency. If
diff --git a/pkg/apis/serving/v1/route_lifecycle.go b/pkg/apis/serving/v1/route_lifecycle.go
index 32071031f..3bb6d2756 100644
--- a/pkg/apis/serving/v1/route_lifecycle.go
+++ b/pkg/apis/serving/v1/route_lifecycle.go
@@ -47,6 +47,22 @@ func (rs *RouteStatus) IsReady() bool {
 	return routeCondSet.Manage(rs).IsHappy()
 }
 
+// IsReady returns true if the Status condition RouteConditionReady
+// is true and the latest spec has been observed.
+func (r *Route) IsReady() bool {
+	rs := r.Status
+	return rs.ObservedGeneration == r.Generation &&
+		rs.GetCondition(RouteConditionReady).IsTrue()
+}
+
+// IsFailed returns true if the resource has observed
+// the latest generation and ready is false.
+func (r *Route) IsFailed() bool {
+	rs := r.Status
+	return rs.ObservedGeneration == r.Generation &&
+		rs.GetCondition(RouteConditionReady).IsFalse()
+}
+
 // InitializeConditions sets the initial values to the conditions.
 func (rs *RouteStatus) InitializeConditions() {
 	routeCondSet.Manage(rs).InitializeConditions()
diff --git a/pkg/apis/serving/v1/service_lifecycle.go b/pkg/apis/serving/v1/service_lifecycle.go
index ea03097fd..1a09ebed1 100644
--- a/pkg/apis/serving/v1/service_lifecycle.go
+++ b/pkg/apis/serving/v1/service_lifecycle.go
@@ -45,9 +45,19 @@ func (s *Service) GetGroupVersionKind() schema.GroupVersionKind {
 	return SchemeGroupVersion.WithKind("Service")
 }
 
-// IsReady returns if the service is ready to serve the requested configuration.
-func (ss *ServiceStatus) IsReady() bool {
-	return serviceCondSet.Manage(ss).IsHappy()
+// IsReady returns if the service is ready to serve and the latest spec has been observed.
+func (s *Service) IsReady() bool {
+	ss := s.Status
+	return ss.ObservedGeneration == s.Generation &&
+		ss.GetCondition(ServiceConditionReady).IsTrue()
+}
+
+// IsFailed returns true if the resource has observed
+// the latest generation and ready is false.
+func (s *Service) IsFailed() bool {
+	ss := s.Status
+	return ss.ObservedGeneration == s.Generation &&
+		ss.GetCondition(ServiceConditionReady).IsFalse()
 }
 
 // InitializeConditions sets the initial values to the conditions.
diff --git a/pkg/autoscaler/aggregation/bucketing.go b/pkg/autoscaler/aggregation/bucketing.go
index 8112225cc..7fd4cb88f 100644
--- a/pkg/autoscaler/aggregation/bucketing.go
+++ b/pkg/autoscaler/aggregation/bucketing.go
@@ -27,19 +27,33 @@ import (
 // TimedFloat64Buckets keeps buckets that have been collected at a certain time.
 type TimedFloat64Buckets struct {
 	bucketsMutex sync.RWMutex
-	buckets      []float64
-	// The total sum of all valid buckets within the window.
-	windowTotal float64
-	lastWrite   time.Time
+	// buckets is a ring buffer indexed by timeToIndex() % len(buckets).
+	// Each element represents a certain granularity of time, and the total
+	// represented duration adds up to a window length of time.
+	buckets []float64
+
 	// firstWrite holds the time when the first write has been made.
-	// this time is reset to `now` when the very first write happens,
+	// This time is reset to `now` when the very first write happens,
 	// or when a first write happens after `window` time of inactivity.
 	// The difference between `now` and `firstWrite` is used to compute
 	// the number of eligible buckets for computation of average values.
 	firstWrite time.Time
 
+	// lastWrite stores the time when the last write was made.
+	// This is used to detect when we have gaps in the data (i.e. more than a
+	// granularity has expired since the last write) so that we can zero those
+	// entries in the buckets array. It is also used when calculating the
+	// WindowAverage to know how much of the buckets array represents valid data.
+	lastWrite time.Time
+
+	// granularity is the duration represented by each bucket in the buckets ring buffer.
 	granularity time.Duration
-	window      time.Duration
+	// window is the total time represented by the buckets ring buffer.
+	window time.Duration
+	// The total sum of all buckets within the window. This total includes
+	// invalid buckets, e.g. buckets written to before firstTime or after
+	// lastTime are included in this total.
+	windowTotal float64
 }
 
 // Implements stringer interface.
@@ -60,7 +74,7 @@ func NewTimedFloat64Buckets(window, granularity time.Duration) *TimedFloat64Buck
 	}
 }
 
-// IsEmpty returns if no data has been recorded for the `window` period.
+// IsEmpty returns true if no data has been recorded for the `window` period.
 func (t *TimedFloat64Buckets) IsEmpty(now time.Time) bool {
 	now = now.Truncate(t.granularity)
 	t.bucketsMutex.RLock()
@@ -74,6 +88,21 @@ func roundToNDigits(n int, f float64) float64 {
 }
 
 // WindowAverage returns the average bucket value over the window.
+//
+// If the first write was less than the window length ago, an average is
+// returned over the partial window. For example, if firstWrite was 6 seconds
+// ago, the average will be over these 6 seconds worth of buckets, even if the
+// window is 60s. If a window passes with no data being received, the first
+// write time is reset so this behaviour takes effect again.
+//
+// Similarly, if we have not received recent data, the average is based on a
+// partial window. For example, if the window is 60 seconds but we last
+// received data 10 seconds ago, the window average will be the average over
+// the first 50 seconds.
+//
+// In other cases, for example if there are gaps in the data shorter than the
+// window length, the missing data is assumed to be 0 and the average is over
+// the whole window length inclusive of the missing data.
 func (t *TimedFloat64Buckets) WindowAverage(now time.Time) float64 {
 	const precision = 6
 	now = now.Truncate(t.granularity)
@@ -118,6 +147,11 @@ func (t *TimedFloat64Buckets) timeToIndex(tm time.Time) int {
 }
 
 // Record adds a value with an associated time to the correct bucket.
+// If this record would introduce a gap in the data, any intervening times
+// between the last write and this one will be recorded as zero. If an entire
+// window length has expired without data, the firstWrite time is reset,
+// meaning the WindowAverage will be of a partial window until enough data is
+// received to fill it again.
 func (t *TimedFloat64Buckets) Record(now time.Time, value float64) {
 	bucketTime := now.Truncate(t.granularity)
 
diff --git a/pkg/queue/health/health_state.go b/pkg/queue/health/health_state.go
index 981e952c3..e86c6547e 100644
--- a/pkg/queue/health/health_state.go
+++ b/pkg/queue/health/health_state.go
@@ -24,8 +24,11 @@ import (
 
 const (
 	// Return `queue` as body for 200 responses to indicate the response is from queue-proxy.
-	aliveBody    = "queue"
+	aliveBody = "queue"
+	// Return `queue not ready` as body for 503 response for queue not yet ready.
 	notAliveBody = "queue not ready"
+	// Return `shutting down` as body for 410 response if the queue got a shutdown request.
+	shuttingDownBody = "shutting down"
 )
 
 // State holds state about the current healthiness of the component.
@@ -101,11 +104,16 @@ func (h *State) HandleHealthProbe(prober func() bool, isAggressive bool, w http.
 		io.WriteString(w, notAliveBody)
 	}
 
+	sendShuttingDown := func() {
+		w.WriteHeader(http.StatusGone)
+		io.WriteString(w, shuttingDownBody)
+	}
+
 	switch {
 	case !isAggressive && h.IsAlive():
 		sendAlive()
 	case h.IsShuttingDown():
-		sendNotAlive()
+		sendShuttingDown()
 	case prober != nil && !prober():
 		sendNotAlive()
 	default:
diff --git a/pkg/queue/health/probe.go b/pkg/queue/health/probe.go
index 7f22d85ec..0cbd66909 100644
--- a/pkg/queue/health/probe.go
+++ b/pkg/queue/health/probe.go
@@ -96,10 +96,12 @@ func HTTPProbe(config HTTPProbeConfigOptions) error {
 
 // IsHTTPProbeReady checks whether we received a successful Response
 func IsHTTPProbeReady(res *http.Response) bool {
-	if res == nil {
-		return false
-	}
-
 	// response status code between 200-399 indicates success
 	return res.StatusCode >= 200 && res.StatusCode < 400
 }
+
+// IsHTTPProbeShuttingDown checks whether the Response indicates the prober is shutting down.
+func IsHTTPProbeShuttingDown(res *http.Response) bool {
+	// status 410 (Gone) indicates the probe returned a shutdown scenario.
+	return res.StatusCode == http.StatusGone
+}
diff --git a/pkg/reconciler/configuration/configuration.go b/pkg/reconciler/configuration/configuration.go
index 31f7ee8cf..f3ddc205b 100644
--- a/pkg/reconciler/configuration/configuration.go
+++ b/pkg/reconciler/configuration/configuration.go
@@ -131,7 +131,7 @@ func (c *Reconciler) findAndSetLatestReadyRevision(ctx context.Context, config *
 		return err
 	}
 	for _, rev := range sortedRevisions {
-		if rev.Status.IsReady() {
+		if rev.IsReady() {
 			old, new := config.Status.LatestReadyRevisionName, rev.Name
 			config.Status.SetLatestReadyRevisionName(rev.Name)
 			if old != new {
diff --git a/pkg/reconciler/revision/resources/queue.go b/pkg/reconciler/revision/resources/queue.go
index 18094b400..c08e4cbdc 100644
--- a/pkg/reconciler/revision/resources/queue.go
+++ b/pkg/reconciler/revision/resources/queue.go
@@ -226,9 +226,11 @@ func makeQueueContainer(rev *v1.Revision, loggingConfig *logging.Config, tracing
 	}
 	ports = append(ports, servingPort)
 
+	scaleDownLabelPath := ""
 	var volumeMounts []corev1.VolumeMount
 	if autoscalerConfig.EnableGracefulScaledown {
 		volumeMounts = append(volumeMounts, labelVolumeMount)
+		scaleDownLabelPath = fmt.Sprintf("%s/%s", podInfoVolumePath, metadataLabelsPath)
 	}
 
 	container := rev.Spec.GetContainer()
@@ -322,7 +324,7 @@ func makeQueueContainer(rev *v1.Revision, loggingConfig *logging.Config, tracing
 			Value: metrics.Domain(),
 		}, {
 			Name:  "DOWNWARD_API_LABELS_PATH",
-			Value: fmt.Sprintf("%s/%s", podInfoVolumePath, metadataLabelsPath),
+			Value: scaleDownLabelPath,
 		}, {
 			Name:  "SERVING_READINESS_PROBE",
 			Value: probeJSON,
diff --git a/pkg/reconciler/revision/revision.go b/pkg/reconciler/revision/revision.go
index 47546b435..19df27cc3 100644
--- a/pkg/reconciler/revision/revision.go
+++ b/pkg/reconciler/revision/revision.go
@@ -127,7 +127,7 @@ func (c *Reconciler) reconcileDigest(ctx context.Context, rev *v1.Revision) erro
 }
 
 func (c *Reconciler) ReconcileKind(ctx context.Context, rev *v1.Revision) pkgreconciler.Event {
-	readyBeforeReconcile := rev.Status.IsReady()
+	readyBeforeReconcile := rev.IsReady()
 
 	// We may be reading a version of the object that was stored at an older version
 	// and may not have had all of the assumed defaults specified.  This won't result
@@ -160,7 +160,7 @@ func (c *Reconciler) ReconcileKind(ctx context.Context, rev *v1.Revision) pkgrec
 		}
 	}
 
-	readyAfterReconcile := rev.Status.IsReady()
+	readyAfterReconcile := rev.IsReady()
 	if !readyBeforeReconcile && readyAfterReconcile {
 		logging.FromContext(ctx).Info("Revision became ready")
 		controller.GetEventRecorder(ctx).Event(
diff --git a/pkg/reconciler/route/traffic/traffic.go b/pkg/reconciler/route/traffic/traffic.go
index 0d0d9ee06..5e5f88e3e 100644
--- a/pkg/reconciler/route/traffic/traffic.go
+++ b/pkg/reconciler/route/traffic/traffic.go
@@ -266,7 +266,7 @@ func (t *configBuilder) addRevisionTarget(tt *v1.TrafficTarget) error {
 	if err != nil {
 		return err
 	}
-	if !rev.Status.IsReady() {
+	if !rev.IsReady() {
 		return errUnreadyRevision(rev)
 	}
 	ntt := tt.DeepCopy()
diff --git a/third_party/cert-manager-0.12.0/net-certmanager.yaml b/third_party/cert-manager-0.12.0/net-certmanager.yaml
index 711e7d957..61f2f579d 100644
--- a/third_party/cert-manager-0.12.0/net-certmanager.yaml
+++ b/third_party/cert-manager-0.12.0/net-certmanager.yaml
@@ -18,7 +18,7 @@ metadata:
   # These are the permissions needed by the `cert-manager` `Certificate` implementation.
   name: knative-serving-certmanager
   labels:
-    serving.knative.dev/release: "v20200604-b68ba3b"
+    serving.knative.dev/release: "v20200605-b68ba3b"
     serving.knative.dev/controller: "true"
     networking.knative.dev/certificate-provider: cert-manager
 rules:
@@ -49,7 +49,7 @@ kind: ValidatingWebhookConfiguration
 metadata:
   name: config.webhook.net-certmanager.networking.internal.knative.dev
   labels:
-    serving.knative.dev/release: "v20200604-b68ba3b"
+    serving.knative.dev/release: "v20200605-b68ba3b"
 webhooks:
 - admissionReviewVersions:
   - v1beta1
@@ -86,7 +86,7 @@ metadata:
   name: net-certmanager-webhook-certs
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20200604-b68ba3b"
+    serving.knative.dev/release: "v20200605-b68ba3b"
 
 ---
 # Copyright 2020 The Knative Authors
@@ -109,7 +109,7 @@ metadata:
   name: config-certmanager
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20200604-b68ba3b"
+    serving.knative.dev/release: "v20200605-b68ba3b"
     networking.knative.dev/certificate-provider: cert-manager
 data:
   _example: |
@@ -156,7 +156,7 @@ metadata:
   name: networking-certmanager
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20200604-b68ba3b"
+    serving.knative.dev/release: "v20200605-b68ba3b"
     networking.knative.dev/certificate-provider: cert-manager
 spec:
   selector:
@@ -168,7 +168,7 @@ spec:
         cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
       labels:
         app: networking-certmanager
-        serving.knative.dev/release: "v20200604-b68ba3b"
+        serving.knative.dev/release: "v20200605-b68ba3b"
     spec:
       serviceAccountName: controller
       containers:
@@ -208,7 +208,7 @@ kind: Service
 metadata:
   labels:
     app: networking-certmanager
-    serving.knative.dev/release: "v20200604-b68ba3b"
+    serving.knative.dev/release: "v20200605-b68ba3b"
     networking.knative.dev/certificate-provider: cert-manager
   name: networking-certmanager
   namespace: knative-serving
@@ -245,7 +245,7 @@ metadata:
   name: net-certmanager-webhook
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20200604-b68ba3b"
+    serving.knative.dev/release: "v20200605-b68ba3b"
 spec:
   selector:
     matchLabels:
@@ -258,7 +258,7 @@ spec:
       labels:
         app: net-certmanager-webhook
         role: net-certmanager-webhook
-        serving.knative.dev/release: "v20200604-b68ba3b"
+        serving.knative.dev/release: "v20200605-b68ba3b"
     spec:
       serviceAccountName: controller
       containers:
@@ -319,7 +319,7 @@ metadata:
   namespace: knative-serving
   labels:
     role: net-certmanager-webhook
-    serving.knative.dev/release: "v20200604-b68ba3b"
+    serving.knative.dev/release: "v20200605-b68ba3b"
 spec:
   ports:
   - # Define metrics and profiling for them to be accessible within service meshes.
diff --git a/third_party/net-istio.yaml b/third_party/net-istio.yaml
index f70d88178..923477d08 100644
--- a/third_party/net-istio.yaml
+++ b/third_party/net-istio.yaml
@@ -18,7 +18,7 @@ metadata:
   # These are the permissions needed by the Istio Ingress implementation.
   name: knative-serving-istio
   labels:
-    serving.knative.dev/release: "v20200604-29d9dcf"
+    serving.knative.dev/release: "v20200605-f2ffd04"
     serving.knative.dev/controller: "true"
     networking.knative.dev/ingress-provider: istio
 rules:
@@ -48,7 +48,7 @@ metadata:
   name: knative-ingress-gateway
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20200604-29d9dcf"
+    serving.knative.dev/release: "v20200605-f2ffd04"
     networking.knative.dev/ingress-provider: istio
 spec:
   selector:
@@ -85,7 +85,7 @@ metadata:
   name: cluster-local-gateway
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20200604-29d9dcf"
+    serving.knative.dev/release: "v20200605-f2ffd04"
     networking.knative.dev/ingress-provider: istio
 spec:
   selector:
@@ -118,7 +118,7 @@ kind: MutatingWebhookConfiguration
 metadata:
   name: webhook.istio.networking.internal.knative.dev
   labels:
-    serving.knative.dev/release: "v20200604-29d9dcf"
+    serving.knative.dev/release: "v20200605-f2ffd04"
     networking.knative.dev/ingress-provider: istio
 webhooks:
 - admissionReviewVersions:
@@ -154,7 +154,7 @@ kind: ValidatingWebhookConfiguration
 metadata:
   name: config.webhook.istio.networking.internal.knative.dev
   labels:
-    serving.knative.dev/release: "v20200604-29d9dcf"
+    serving.knative.dev/release: "v20200605-f2ffd04"
     networking.knative.dev/ingress-provider: istio
 webhooks:
 - admissionReviewVersions:
@@ -192,7 +192,7 @@ metadata:
   name: istio-webhook-certs
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20200604-29d9dcf"
+    serving.knative.dev/release: "v20200605-f2ffd04"
     networking.knative.dev/ingress-provider: istio
 
 ---
@@ -216,7 +216,7 @@ metadata:
   name: config-istio
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20200604-29d9dcf"
+    serving.knative.dev/release: "v20200605-f2ffd04"
     networking.knative.dev/ingress-provider: istio
 data:
   _example: |
@@ -286,7 +286,7 @@ metadata:
   name: networking-istio
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20200604-29d9dcf"
+    serving.knative.dev/release: "v20200605-f2ffd04"
     networking.knative.dev/ingress-provider: istio
 spec:
   selector:
@@ -302,14 +302,14 @@ spec:
         sidecar.istio.io/inject: "false"
       labels:
         app: networking-istio
-        serving.knative.dev/release: "v20200604-29d9dcf"
+        serving.knative.dev/release: "v20200605-f2ffd04"
     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:41cb2266dcc0ac69ca6f50ecf2c6c9596057e8388fea43319f7cbc1db78fe28c
+        image: gcr.io/knative-nightly/knative.dev/net-istio/cmd/controller@sha256:a127af4c33a067b026d1662ebeb40b14aab3433613531eac00549a3134ac0430
         resources:
           requests:
             cpu: 30m
@@ -361,7 +361,7 @@ metadata:
   name: istio-webhook
   namespace: knative-serving
   labels:
-    serving.knative.dev/release: "v20200604-29d9dcf"
+    serving.knative.dev/release: "v20200605-f2ffd04"
     networking.knative.dev/ingress-provider: istio
 spec:
   selector:
@@ -375,14 +375,14 @@ spec:
       labels:
         app: istio-webhook
         role: istio-webhook
-        serving.knative.dev/release: "v20200604-29d9dcf"
+        serving.knative.dev/release: "v20200605-f2ffd04"
     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:ca240232582baeb3edec0749d17bac62121035af5d2aa60b3371f7b49d232c46
+        image: gcr.io/knative-nightly/knative.dev/net-istio/cmd/webhook@sha256:681312e9b9935ae1000659206fc0bea691730f35f18b5f1d9cc94a131718589f
         resources:
           requests:
             cpu: 20m
@@ -436,7 +436,7 @@ metadata:
   namespace: knative-serving
   labels:
     role: istio-webhook
-    serving.knative.dev/release: "v20200604-29d9dcf"
+    serving.knative.dev/release: "v20200605-f2ffd04"
     networking.knative.dev/ingress-provider: istio
 spec:
   ports:
diff --git a/vendor/knative.dev/pkg/configmap/example.go b/vendor/knative.dev/pkg/configmap/example.go
index 2ffe448e5..1bbf3dc7e 100644
--- a/vendor/knative.dev/pkg/configmap/example.go
+++ b/vendor/knative.dev/pkg/configmap/example.go
@@ -19,17 +19,20 @@ package configmap
 import (
 	"fmt"
 	"hash/crc32"
+	"strings"
 )
 
 const (
 	// ExampleKey signifies a given example configuration in a ConfigMap.
 	ExampleKey = "_example"
 
-	// ExampleChecksumLabel is the label that stores the computed checksum.
-	ExampleChecksumLabel = "knative.dev/example-checksum"
+	// ExampleChecksumAnnotation is the annotation that stores the computed checksum.
+	ExampleChecksumAnnotation = "knative.dev/example-checksum"
 )
 
-// Checksum generates a checksum for the example value to be compared against a respective label.
+// Checksum generates a checksum for the example value to be compared against
+// a respective annotation.
+// Leading and trailing spaces are ignored.
 func Checksum(value string) string {
-	return fmt.Sprintf("%08x", crc32.ChecksumIEEE([]byte(value)))
+	return fmt.Sprintf("%08x", crc32.ChecksumIEEE([]byte(strings.TrimSpace(value))))
 }
diff --git a/vendor/knative.dev/pkg/configmap/hash-gen/main.go b/vendor/knative.dev/pkg/configmap/hash-gen/main.go
index c6e5110e3..7bafc5a56 100644
--- a/vendor/knative.dev/pkg/configmap/hash-gen/main.go
+++ b/vendor/knative.dev/pkg/configmap/hash-gen/main.go
@@ -68,19 +68,24 @@ func process(data []byte) ([]byte, error) {
 		return nil, nil
 	}
 
-	labels := traverse(content, "metadata", "labels")
-	if labels == nil {
-		// TODO(markusthoemmes): Potentially handle missing metadata and labels?
-		return nil, errors.New("'metadata.labels' not found")
+	metadata := traverse(content, "metadata")
+	if metadata == nil {
+		return nil, errors.New("'metadata' not found")
+	}
+
+	annotations := traverse(metadata, "annotations")
+	if annotations == nil {
+		annotations = &yaml.Node{Kind: yaml.MappingNode}
+		metadata.Content = append(metadata.Content, strNode("annotations"), annotations)
 	}
 
 	checksum := configmap.Checksum(example.Value)
-	existingLabel := value(labels, configmap.ExampleChecksumLabel)
-	if existingLabel != nil {
-		existingLabel.Value = checksum
+	existingAnnotation := value(annotations, configmap.ExampleChecksumAnnotation)
+	if existingAnnotation != nil {
+		existingAnnotation.Value = checksum
 	} else {
-		labels.Content = append(labels.Content,
-			strNode(configmap.ExampleChecksumLabel),
+		annotations.Content = append(annotations.Content,
+			strNode(configmap.ExampleChecksumAnnotation),
 			strNode(checksum))
 	}
 
diff --git a/vendor/knative.dev/pkg/webhook/configmaps/configmaps.go b/vendor/knative.dev/pkg/webhook/configmaps/configmaps.go
index f6ffb81b7..acac11525 100644
--- a/vendor/knative.dev/pkg/webhook/configmaps/configmaps.go
+++ b/vendor/knative.dev/pkg/webhook/configmaps/configmaps.go
@@ -185,8 +185,8 @@ func (ac *reconciler) validate(ctx context.Context, req *admissionv1beta1.Admiss
 	}
 
 	exampleData, hasExampleData := newObj.Data[configmap.ExampleKey]
-	exampleChecksum, hasExampleChecksumLabel := newObj.Labels[configmap.ExampleChecksumLabel]
-	if hasExampleData && hasExampleChecksumLabel &&
+	exampleChecksum, hasExampleChecksumAnnotation := newObj.Annotations[configmap.ExampleChecksumAnnotation]
+	if hasExampleData && hasExampleChecksumAnnotation &&
 		exampleChecksum != configmap.Checksum(exampleData) {
 		return fmt.Errorf(
 			"%q modified, you likely wanted to create an unindented configuration",
diff --git a/vendor/modules.txt b/vendor/modules.txt
index a8e140628..af7284f71 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1178,7 +1178,7 @@ k8s.io/utils/net
 k8s.io/utils/path
 k8s.io/utils/pointer
 k8s.io/utils/trace
-# knative.dev/caching v0.0.0-20200521155757-e78d17bc250e
+# knative.dev/caching v0.0.0-20200604203019-a5bd4f5d0e4f
 ## explicit
 knative.dev/caching/config
 knative.dev/caching/pkg/apis/caching
@@ -1199,7 +1199,7 @@ knative.dev/caching/pkg/client/injection/informers/caching/v1alpha1/image/fake
 knative.dev/caching/pkg/client/injection/informers/factory
 knative.dev/caching/pkg/client/injection/informers/factory/fake
 knative.dev/caching/pkg/client/listers/caching/v1alpha1
-# knative.dev/pkg v0.0.0-20200603222317-b79e4a24ca50
+# knative.dev/pkg v0.0.0-20200605170718-b7125260dc6f
 ## explicit
 knative.dev/pkg/apiextensions/storageversion
 knative.dev/pkg/apiextensions/storageversion/cmd/migrate
@@ -1316,7 +1316,7 @@ knative.dev/pkg/webhook/resourcesemantics/conversion
 knative.dev/pkg/webhook/resourcesemantics/defaulting
 knative.dev/pkg/webhook/resourcesemantics/validation
 knative.dev/pkg/websocket
-# knative.dev/test-infra v0.0.0-20200604135317-9be2b638d932
+# knative.dev/test-infra v0.0.0-20200605173118-26a648be867f
 ## explicit
 knative.dev/test-infra/scripts
 # sigs.k8s.io/structured-merge-diff/v2 v2.0.1


Test patch:
diff --git a/cmd/queue/main_test.go b/cmd/queue/main_test.go
index 25664ccbb..5c77f6866 100644
--- a/cmd/queue/main_test.go
+++ b/cmd/queue/main_test.go
@@ -212,6 +212,34 @@ func TestProbeQueueNotReady(t *testing.T) {
 	}
 }
 
+func TestProbeQueueShuttingDownFailsFast(t *testing.T) {
+	ts := newProbeTestServer(func(w http.ResponseWriter) {
+		w.WriteHeader(http.StatusGone)
+	})
+
+	defer ts.Close()
+
+	u, err := url.Parse(ts.URL)
+	if err != nil {
+		t.Fatalf("%s is not a valid URL: %v", ts.URL, err)
+	}
+
+	port, err := strconv.Atoi(u.Port())
+	if err != nil {
+		t.Fatalf("Failed to convert port(%s) to int: %v", u.Port(), err)
+	}
+
+	start := time.Now()
+	if err = probeQueueHealthPath(1, probeConfig{QueueServingPort: port}); err == nil {
+		t.Error("probeQueueHealthPath did not fail")
+	}
+
+	// if fails due to timeout and not cancelation, then it took too long
+	if time.Since(start) >= 1*time.Second {
+		t.Error("took too long to fail")
+	}
+}
+
 func TestProbeQueueReady(t *testing.T) {
 	queueProbed := ptr.Int32(0)
 	ts := newProbeTestServer(func(w http.ResponseWriter) {
diff --git a/pkg/activator/net/lb_policy_test.go b/pkg/activator/net/lb_policy_test.go
index 638dd3bd4..45154769e 100644
--- a/pkg/activator/net/lb_policy_test.go
+++ b/pkg/activator/net/lb_policy_test.go
@@ -24,6 +24,76 @@ import (
 	"knative.dev/serving/pkg/queue"
 )
 
+func TestRandomChoice2(t *testing.T) {
+	t.Run("1 tracker", func(t *testing.T) {
+		podTrackers := makeTrackers(1, 0)
+		cb, pt := randomChoice2(nil, podTrackers)
+		t.Cleanup(cb)
+		if got, want := pt.dest, podTrackers[0].dest; got != want {
+			t.Errorf("pt.dest = %s, want: %s", got, want)
+		}
+		wantW := int32(1) // to avoid casting on every check.
+		if got, want := pt.getWeight(), wantW; got != want {
+			t.Errorf("pt.weight = %d, want: %d", got, want)
+		}
+		cb, pt = randomChoice2(nil, podTrackers)
+		if got, want := pt.dest, podTrackers[0].dest; got != want {
+			t.Errorf("pt.dest = %s, want: %s", got, want)
+		}
+		if got, want := pt.getWeight(), wantW+1; got != want {
+			t.Errorf("pt.weight = %d, want: %d", got, want)
+		}
+		cb()
+		if got, want := pt.getWeight(), wantW; got != want {
+			t.Errorf("pt.weight = %d, want: %d", got, want)
+		}
+	})
+	t.Run("2 trackers", func(t *testing.T) {
+		podTrackers := makeTrackers(2, 0)
+		cb, pt := randomChoice2(nil, podTrackers)
+		t.Cleanup(cb)
+		wantW := int32(1) // to avoid casting on every check.
+		if got, want := pt.getWeight(), wantW; got != want {
+			t.Errorf("pt.weight = %d, want: %d", got, want)
+		}
+		// Must return a different one.
+		cb, pt = randomChoice2(nil, podTrackers)
+		dest := pt.dest
+		if got, want := pt.getWeight(), wantW; got != want {
+			t.Errorf("pt.weight = %d, want: %d", got, want)
+		}
+		cb()
+		// Should return the same one.
+		cb, pt = randomChoice2(nil, podTrackers)
+		if got, want := pt.getWeight(), wantW; got != want {
+			t.Errorf("pt.weight = %d, want: %d", got, want)
+		}
+		if got, want := pt.dest, dest; got != want {
+			t.Errorf("pt.dest = %s, want: %s", got, want)
+		}
+	})
+	t.Run("3 trackers", func(t *testing.T) {
+		podTrackers := makeTrackers(3, 0)
+		cb, pt := randomChoice2(nil, podTrackers)
+		t.Cleanup(cb)
+		wantW := int32(1) // to avoid casting on every check.
+		if got, want := pt.getWeight(), wantW; got != want {
+			t.Errorf("pt.weight = %d, want: %d", got, want)
+		}
+		// Must return a different one.
+		cb, pt = randomChoice2(nil, podTrackers)
+		if got, want := pt.getWeight(), wantW; got != want {
+			t.Errorf("pt.weight = %d, want: %d", got, want)
+		}
+		cb()
+		// Should return same or the other unsued one.
+		cb, pt = randomChoice2(nil, podTrackers)
+		if got, want := pt.getWeight(), wantW; got != want {
+			t.Errorf("pt.weight = %d, want: %d", got, want)
+		}
+	})
+}
+
 func TestFirstAvailable(t *testing.T) {
 	t.Run("1 tracker, 1 slot", func(t *testing.T) {
 		podTrackers := []*podTracker{{
diff --git a/pkg/apis/autoscaling/annotation_validation_test.go b/pkg/apis/autoscaling/annotation_validation_test.go
index dbb18ea27..0d72ffcb1 100644
--- a/pkg/apis/autoscaling/annotation_validation_test.go
+++ b/pkg/apis/autoscaling/annotation_validation_test.go
@@ -36,6 +36,13 @@ func TestValidateScaleBoundAnnotations(t *testing.T) {
 	}, {
 		name:        "empty annotations",
 		annotations: map[string]string{},
+	}, {
+		name:        "invalid class",
+		annotations: map[string]string{ClassAnnotationKey: "unsupported.knative.dev"},
+		expectErr:   "invalid value: unsupported.knative.dev: " + ClassAnnotationKey,
+	}, {
+		name:        "non-knative.dev domain class",
+		annotations: map[string]string{ClassAnnotationKey: "some.other.domain"},
 	}, {
 		name:        "minScale is 0",
 		annotations: map[string]string{MinScaleAnnotationKey: "0"},
diff --git a/pkg/apis/serving/v1/configuration_lifecycle_test.go b/pkg/apis/serving/v1/configuration_lifecycle_test.go
index 100631452..f8866d950 100644
--- a/pkg/apis/serving/v1/configuration_lifecycle_test.go
+++ b/pkg/apis/serving/v1/configuration_lifecycle_test.go
@@ -161,7 +161,73 @@ func TestConfigurationIsReady(t *testing.T) {
 
 	for _, tc := range cases {
 		t.Run(tc.name, func(t *testing.T) {
-			if e, a := tc.isReady, tc.status.IsReady(); e != a {
+			c := Configuration{Status: tc.status}
+			if e, a := tc.isReady, c.IsReady(); e != a {
+				t.Errorf("%q expected: %v got: %v", tc.name, e, a)
+			}
+		})
+	}
+}
+
+func TestConfigurationIsFailed(t *testing.T) {
+	cases := []struct {
+		name     string
+		status   ConfigurationStatus
+		isFailed bool
+	}{{
+		name:     "empty status should not be failed",
+		status:   ConfigurationStatus{},
+		isFailed: false,
+	}, {
+		name: "False condition status should be failed",
+		status: ConfigurationStatus{
+			Status: duckv1.Status{
+				Conditions: duckv1.Conditions{{
+					Type:   ConfigurationConditionReady,
+					Status: corev1.ConditionFalse,
+				}},
+			},
+		},
+		isFailed: true,
+	}, {
+		name: "Unknown condition status should not be failed",
+		status: ConfigurationStatus{
+			Status: duckv1.Status{
+
+				Conditions: duckv1.Conditions{{
+					Type:   ConfigurationConditionReady,
+					Status: corev1.ConditionUnknown,
+				}},
+			},
+		},
+		isFailed: false,
+	}, {
+		name: "Missing condition status should not be failed",
+		status: ConfigurationStatus{
+			Status: duckv1.Status{
+				Conditions: duckv1.Conditions{{
+					Type: ConfigurationConditionReady,
+				}},
+			},
+		},
+		isFailed: false,
+	}, {
+		name: "True condition status should not be failed",
+		status: ConfigurationStatus{
+			Status: duckv1.Status{
+				Conditions: duckv1.Conditions{{
+					Type:   ConfigurationConditionReady,
+					Status: corev1.ConditionTrue,
+				}},
+			},
+		},
+		isFailed: false,
+	}}
+
+	for _, tc := range cases {
+		t.Run(tc.name, func(t *testing.T) {
+			c := Configuration{Status: tc.status}
+			if e, a := tc.isFailed, c.IsFailed(); e != a {
 				t.Errorf("%q expected: %v got: %v", tc.name, e, a)
 			}
 		})
@@ -231,7 +297,8 @@ func TestLatestReadyRevisionNameUpToDate(t *testing.T) {
 	}}
 
 	for _, tc := range cases {
-		if e, a := tc.isUpdateToDate, tc.status.IsLatestReadyRevisionNameUpToDate(); e != a {
+		c := Configuration{Status: tc.status}
+		if e, a := tc.isUpdateToDate, c.IsLatestReadyRevisionNameUpToDate(); e != a {
 			t.Errorf("%q expected: %v got: %v", tc.name, e, a)
 		}
 	}
diff --git a/pkg/apis/serving/v1/revision_lifecycle_test.go b/pkg/apis/serving/v1/revision_lifecycle_test.go
index f2fcd0ce4..1f633c20e 100644
--- a/pkg/apis/serving/v1/revision_lifecycle_test.go
+++ b/pkg/apis/serving/v1/revision_lifecycle_test.go
@@ -270,13 +270,79 @@ func TestRevisionIsReady(t *testing.T) {
 
 	for _, tc := range cases {
 		t.Run(tc.name, func(t *testing.T) {
-			if got, want := tc.status.IsReady(), tc.isReady; got != want {
+			r := Revision{Status: tc.status}
+			if got, want := r.IsReady(), tc.isReady; got != want {
 				t.Errorf("isReady =  %v want: %v", got, want)
 			}
 		})
 	}
 }
 
+func TestRevisionIsFailed(t *testing.T) {
+	cases := []struct {
+		name     string
+		status   RevisionStatus
+		isFailed bool
+	}{{
+		name:     "empty status should not be failed",
+		status:   RevisionStatus{},
+		isFailed: false,
+	}, {
+		name: "False condition status should be failed",
+		status: RevisionStatus{
+			Status: duckv1.Status{
+				Conditions: duckv1.Conditions{{
+					Type:   RevisionConditionReady,
+					Status: corev1.ConditionFalse,
+				}},
+			},
+		},
+		isFailed: true,
+	}, {
+		name: "Unknown condition status should not be failed",
+		status: RevisionStatus{
+			Status: duckv1.Status{
+
+				Conditions: duckv1.Conditions{{
+					Type:   RevisionConditionReady,
+					Status: corev1.ConditionUnknown,
+				}},
+			},
+		},
+		isFailed: false,
+	}, {
+		name: "Missing condition status should not be failed",
+		status: RevisionStatus{
+			Status: duckv1.Status{
+				Conditions: duckv1.Conditions{{
+					Type: RevisionConditionReady,
+				}},
+			},
+		},
+		isFailed: false,
+	}, {
+		name: "True condition status should not be failed",
+		status: RevisionStatus{
+			Status: duckv1.Status{
+				Conditions: duckv1.Conditions{{
+					Type:   RevisionConditionReady,
+					Status: corev1.ConditionTrue,
+				}},
+			},
+		},
+		isFailed: false,
+	}}
+
+	for _, tc := range cases {
+		t.Run(tc.name, func(t *testing.T) {
+			r := Revision{Status: tc.status}
+			if e, a := tc.isFailed, r.IsFailed(); e != a {
+				t.Errorf("%q expected: %v got: %v", tc.name, e, a)
+			}
+		})
+	}
+}
+
 func TestRevisionInitializeConditions(t *testing.T) {
 	rs := &RevisionStatus{}
 	rs.InitializeConditions()
diff --git a/pkg/apis/serving/v1/route_lifecycle_test.go b/pkg/apis/serving/v1/route_lifecycle_test.go
index 8aa5ff4ed..623eb18d2 100644
--- a/pkg/apis/serving/v1/route_lifecycle_test.go
+++ b/pkg/apis/serving/v1/route_lifecycle_test.go
@@ -169,6 +169,71 @@ func TestRouteIsReady(t *testing.T) {
 	}
 }
 
+func TestRouteIsFailed(t *testing.T) {
+	cases := []struct {
+		name     string
+		status   RouteStatus
+		isFailed bool
+	}{{
+		name:     "empty status should not be failed",
+		status:   RouteStatus{},
+		isFailed: false,
+	}, {
+		name: "False condition status should be failed",
+		status: RouteStatus{
+			Status: duckv1.Status{
+				Conditions: duckv1.Conditions{{
+					Type:   RouteConditionReady,
+					Status: corev1.ConditionFalse,
+				}},
+			},
+		},
+		isFailed: true,
+	}, {
+		name: "Unknown condition status should not be failed",
+		status: RouteStatus{
+			Status: duckv1.Status{
+
+				Conditions: duckv1.Conditions{{
+					Type:   RouteConditionReady,
+					Status: corev1.ConditionUnknown,
+				}},
+			},
+		},
+		isFailed: false,
+	}, {
+		name: "Missing condition status should not be failed",
+		status: RouteStatus{
+			Status: duckv1.Status{
+				Conditions: duckv1.Conditions{{
+					Type: RouteConditionReady,
+				}},
+			},
+		},
+		isFailed: false,
+	}, {
+		name: "True condition status should not be failed",
+		status: RouteStatus{
+			Status: duckv1.Status{
+				Conditions: duckv1.Conditions{{
+					Type:   RouteConditionReady,
+					Status: corev1.ConditionTrue,
+				}},
+			},
+		},
+		isFailed: false,
+	}}
+
+	for _, tc := range cases {
+		t.Run(tc.name, func(t *testing.T) {
+			r := Route{Status: tc.status}
+			if e, a := tc.isFailed, r.IsFailed(); e != a {
+				t.Errorf("%q expected: %v got: %v", tc.name, e, a)
+			}
+		})
+	}
+}
+
 func TestTypicalRouteFlow(t *testing.T) {
 	r := &RouteStatus{}
 	r.InitializeConditions()
diff --git a/pkg/apis/serving/v1/service_lifecycle_test.go b/pkg/apis/serving/v1/service_lifecycle_test.go
index 0103570db..e40cad507 100644
--- a/pkg/apis/serving/v1/service_lifecycle_test.go
+++ b/pkg/apis/serving/v1/service_lifecycle_test.go
@@ -161,12 +161,78 @@ func TestServiceIsReady(t *testing.T) {
 	}}
 
 	for _, tc := range cases {
-		if e, a := tc.isReady, tc.status.IsReady(); e != a {
+		s := Service{Status: tc.status}
+		if e, a := tc.isReady, s.IsReady(); e != a {
 			t.Errorf("%q expected: %v got: %v", tc.name, e, a)
 		}
 	}
 }
 
+func TestServiceIsFailed(t *testing.T) {
+	cases := []struct {
+		name     string
+		status   ServiceStatus
+		isFailed bool
+	}{{
+		name:     "empty status should not be failed",
+		status:   ServiceStatus{},
+		isFailed: false,
+	}, {
+		name: "False condition status should be failed",
+		status: ServiceStatus{
+			Status: duckv1.Status{
+				Conditions: duckv1.Conditions{{
+					Type:   ServiceConditionReady,
+					Status: corev1.ConditionFalse,
+				}},
+			},
+		},
+		isFailed: true,
+	}, {
+		name: "Unknown condition status should not be failed",
+		status: ServiceStatus{
+			Status: duckv1.Status{
+
+				Conditions: duckv1.Conditions{{
+					Type:   ServiceConditionReady,
+					Status: corev1.ConditionUnknown,
+				}},
+			},
+		},
+		isFailed: false,
+	}, {
+		name: "Missing condition status should not be failed",
+		status: ServiceStatus{
+			Status: duckv1.Status{
+				Conditions: duckv1.Conditions{{
+					Type: ServiceConditionReady,
+				}},
+			},
+		},
+		isFailed: false,
+	}, {
+		name: "True condition status should not be failed",
+		status: ServiceStatus{
+			Status: duckv1.Status{
+				Conditions: duckv1.Conditions{{
+					Type:   ServiceConditionReady,
+					Status: corev1.ConditionTrue,
+				}},
+			},
+		},
+		isFailed: false,
+	}}
+
+	for _, tc := range cases {
+		t.Run(tc.name, func(t *testing.T) {
+			r := Service{Status: tc.status}
+			if e, a := tc.isFailed, r.IsFailed(); e != a {
+				t.Errorf("%q expected: %v got: %v", tc.name, e, a)
+			}
+		})
+	}
+}
+
 func TestServiceHappyPath(t *testing.T) {
 	svc := &ServiceStatus{}
 	svc.InitializeConditions()
diff --git a/pkg/queue/health/health_state_test.go b/pkg/queue/health/health_state_test.go
index b6113c707..fb8892d96 100644
--- a/pkg/queue/health/health_state_test.go
+++ b/pkg/queue/health/health_state_test.go
@@ -97,8 +97,8 @@ func TestHealthStateHealthHandler(t *testing.T) {
 		name:         "shuttingDown: true, K-Probe",
 		state:        &State{shuttingDown: true},
 		isAggressive: false,
-		wantStatus:   http.StatusServiceUnavailable,
-		wantBody:     notAliveBody,
+		wantStatus:   http.StatusGone,
+		wantBody:     shuttingDownBody,
 	}, {
 		name:         "no prober, shuttingDown: false",
 		state:        &State{},
@@ -110,8 +110,8 @@ func TestHealthStateHealthHandler(t *testing.T) {
 		state:        &State{shuttingDown: true},
 		prober:       func() bool { return true },
 		isAggressive: true,
-		wantStatus:   http.StatusServiceUnavailable,
-		wantBody:     notAliveBody,
+		wantStatus:   http.StatusGone,
+		wantBody:     shuttingDownBody,
 	}, {
 		name:         "prober: true, shuttingDown: false",
 		state:        &State{},
diff --git a/pkg/queue/health/probe_test.go b/pkg/queue/health/probe_test.go
index 1c625e744..c48fa0d0f 100644
--- a/pkg/queue/health/probe_test.go
+++ b/pkg/queue/health/probe_test.go
@@ -166,6 +166,41 @@ func TestHTTPProbeResponseErrorFailure(t *testing.T) {
 	}
 }
 
+func TestIsHTTPProbeShuttingDown(t *testing.T) {
+	tests := []struct {
+		name       string
+		statusCode int
+		wantResult bool
+	}{{
+		name:       "statusCode: 410",
+		statusCode: 410,
+		wantResult: true,
+	}, {
+		name:       "statusCode: 503",
+		statusCode: 503,
+		wantResult: false,
+	}, {
+		name:       "statusCode: 200",
+		statusCode: 200,
+		wantResult: false,
+	}, {
+		name:       "statusCode: 301",
+		statusCode: 301,
+		wantResult: false,
+	}}
+
+	for _, test := range tests {
+		t.Run(test.name, func(t *testing.T) {
+			response := http.Response{StatusCode: test.statusCode}
+			result := IsHTTPProbeShuttingDown(&response)
+			if result != test.wantResult {
+				t.Errorf("IsHTTPProbeShuttingDown returned unexpected result: got %v want %v",
+					result, test.wantResult)
+			}
+		})
+	}
+}
+
 func newHTTPGetAction(t *testing.T, serverURL string) *corev1.HTTPGetAction {
 	urlParsed, err := url.Parse(serverURL)
 	if err != nil {
diff --git a/pkg/reconciler/revision/resources/deploy_test.go b/pkg/reconciler/revision/resources/deploy_test.go
index aa007881f..0320473e4 100644
--- a/pkg/reconciler/revision/resources/deploy_test.go
+++ b/pkg/reconciler/revision/resources/deploy_test.go
@@ -163,7 +163,7 @@ var (
 			Value: metrics.Domain(),
 		}, {
 			Name:  "DOWNWARD_API_LABELS_PATH",
-			Value: fmt.Sprintf("%s/%s", podInfoVolumePath, metadataLabelsPath),
+			Value: "",
 		}, {
 			Name:  "SERVING_READINESS_PROBE",
 			Value: fmt.Sprintf(`{"tcpSocket":{"port":%d,"host":"127.0.0.1"}}`, v1.DefaultUserPort),
@@ -773,14 +773,26 @@ func TestMakePodSpec(t *testing.T) {
 					withEnvVar("CONTAINER_CONCURRENCY", "0"),
 				),
 			}),
+	}, {
+		name: "with graceful scaledown disabled",
+		rev: revision("bar", "foo",
+			withContainers(containers),
+		),
+		ac: autoscalerconfig.Config{
+			EnableGracefulScaledown: false,
+		},
+		want: podSpec(
+			[]corev1.Container{
+				servingContainer(),
+				queueContainer(
+					withEnvVar("DOWNWARD_API_LABELS_PATH", ""),
+				),
+			},
+		),
 	}, {
 		name: "with graceful scaledown enabled",
 		rev: revision("bar", "foo",
-			withContainers([]corev1.Container{{
-				Name:           servingContainerName,
-				Image:          "busybox",
-				ReadinessProbe: withTCPReadinessProbe(v1.DefaultUserPort),
-			}}),
+			withContainers(containers),
 			WithContainerStatuses([]v1.ContainerStatuses{{
 				ImageDigest: "busybox@sha256:deadbeef",
 			}}),
diff --git a/pkg/reconciler/revision/resources/queue_test.go b/pkg/reconciler/revision/resources/queue_test.go
index 1a1a8cdd6..521670faf 100644
--- a/pkg/reconciler/revision/resources/queue_test.go
+++ b/pkg/reconciler/revision/resources/queue_test.go
@@ -727,7 +727,7 @@ var defaultEnv = map[string]string{
 	"SYSTEM_NAMESPACE":                      system.Namespace(),
 	"METRICS_DOMAIN":                        metrics.Domain(),
 	"QUEUE_SERVING_PORT":                    "8012",
-	"DOWNWARD_API_LABELS_PATH":              fmt.Sprintf("%s/%s", podInfoVolumePath, metadataLabelsPath),
+	"DOWNWARD_API_LABELS_PATH":              "",
 	"ENABLE_PROFILING":                      "false",
 	"SERVING_ENABLE_PROBE_REQUEST_LOG":      "false",
 }
diff --git a/test/conformance/api/v1/errorcondition_test.go b/test/conformance/api/v1/errorcondition_test.go
index 8d8598643..0b83fa09a 100644
--- a/test/conformance/api/v1/errorcondition_test.go
+++ b/test/conformance/api/v1/errorcondition_test.go
@@ -72,7 +72,7 @@ func TestContainerErrorMsg(t *testing.T) {
 	t.Log("When the imagepath is invalid, the Configuration should have error status.")
 
 	// Wait for ServiceState becomes NotReady. It also waits for the creation of Configuration.
-	if err := v1test.WaitForServiceState(clients.ServingClient, names.Service, v1test.IsServiceNotReady, "ServiceIsNotReady"); err != nil {
+	if err := v1test.WaitForServiceState(clients.ServingClient, names.Service, v1test.IsServiceFailed, "ServiceIsFailed"); err != nil {
 		t.Fatalf("The Service %s was unexpected state: %v", names.Service, err)
 	}
 
@@ -117,7 +117,7 @@ func TestContainerErrorMsg(t *testing.T) {
 	}
 
 	t.Log("Checking to ensure Route is in desired state")
-	err = v1test.CheckRouteState(clients.ServingClient, names.Route, v1test.IsRouteNotReady)
+	err = v1test.CheckRouteState(clients.ServingClient, names.Route, v1test.IsRouteFailed)
 	if err != nil {
 		t.Fatalf("the Route %s was not desired state: %v", names.Route, err)
 	}
diff --git a/test/conformance/api/v1/revision_timeout_test.go b/test/conformance/api/v1/revision_timeout_test.go
index 0c8a7a2eb..3e0feb1e3 100644
--- a/test/conformance/api/v1/revision_timeout_test.go
+++ b/test/conformance/api/v1/revision_timeout_test.go
@@ -75,7 +75,7 @@ func sendRequest(t *testing.T, clients *test.Clients, endpoint *url.URL,
 
 	t.Logf("Response status code: %v, expected: %v", resp.StatusCode, expectedResponseCode)
 	if expectedResponseCode != resp.StatusCode {
-		return fmt.Errorf("response status code = %v, want: %v", resp.StatusCode, expectedResponseCode)
+		return fmt.Errorf("response status code = %v, want = %v, response = %v", resp.StatusCode, expectedResponseCode, resp)
 	}
 	return nil
 }
@@ -94,13 +94,13 @@ func TestRevisionTimeout(t *testing.T) {
 	}{{
 		name:           "when scaling up from 0 and does not exceed timeout seconds",
 		shouldScaleTo0: true,
-		timeoutSeconds: 10,
+		timeoutSeconds: 20,
 		expectedStatus: http.StatusOK,
 	}, {
 		name:           "when scaling up from 0 and it writes first byte before timeout",
 		shouldScaleTo0: true,
-		timeoutSeconds: 10,
-		sleep:          15 * time.Second,
+		timeoutSeconds: 20,
+		sleep:          25 * time.Second,
 		expectedStatus: http.StatusOK,
 	}, {
 		name:           "when scaling up from 0 and it does exceed timeout seconds",
diff --git a/test/conformance/api/v1alpha1/revision_timeout_test.go b/test/conformance/api/v1alpha1/revision_timeout_test.go
index 906aa3efc..cfe2cfbf0 100644
--- a/test/conformance/api/v1alpha1/revision_timeout_test.go
+++ b/test/conformance/api/v1alpha1/revision_timeout_test.go
@@ -74,7 +74,7 @@ func sendRequest(t *testing.T, clients *test.Clients, endpoint *url.URL,
 
 	t.Logf("Response status code: %v, expected: %v", resp.StatusCode, expectedResponseCode)
 	if expectedResponseCode != resp.StatusCode {
-		return fmt.Errorf("response status code = %v, want: %v", resp.StatusCode, expectedResponseCode)
+		return fmt.Errorf("response status code = %v, want = %v, response = %v", resp.StatusCode, expectedResponseCode, resp)
 	}
 	return nil
 }
@@ -93,13 +93,13 @@ func TestRevisionTimeout(t *testing.T) {
 	}{{
 		name:           "when scaling up from 0 and does not exceed timeout seconds",
 		shouldScaleTo0: true,
-		timeoutSeconds: 10,
+		timeoutSeconds: 20,
 		expectedStatus: http.StatusOK,
 	}, {
 		name:           "when scaling up from 0 and it writes first byte before timeout",
 		shouldScaleTo0: true,
-		timeoutSeconds: 10,
-		sleep:          15 * time.Second,
+		timeoutSeconds: 20,
+		sleep:          25 * time.Second,
 		expectedStatus: http.StatusOK,
 	}, {
 		name:           "when scaling up from 0 and it does exceed timeout seconds",
diff --git a/test/conformance/api/v1beta1/revision_timeout_test.go b/test/conformance/api/v1beta1/revision_timeout_test.go
index cbffab13c..75774e6b6 100644
--- a/test/conformance/api/v1beta1/revision_timeout_test.go
+++ b/test/conformance/api/v1beta1/revision_timeout_test.go
@@ -74,7 +74,7 @@ func sendRequest(t *testing.T, clients *test.Clients, endpoint *url.URL,
 
 	t.Logf("Response status code: %v, expected: %v", resp.StatusCode, expectedResponseCode)
 	if expectedResponseCode != resp.StatusCode {
-		return fmt.Errorf("response status code = %v, want: %v", resp.StatusCode, expectedResponseCode)
+		return fmt.Errorf("response status code = %v, want = %v, response = %v", resp.StatusCode, expectedResponseCode, resp)
 	}
 	return nil
 }
@@ -93,13 +93,13 @@ func TestRevisionTimeout(t *testing.T) {
 	}{{
 		name:           "when scaling up from 0 and does not exceed timeout seconds",
 		shouldScaleTo0: true,
-		timeoutSeconds: 10,
+		timeoutSeconds: 20,
 		expectedStatus: http.StatusOK,
 	}, {
 		name:           "when scaling up from 0 and it writes first byte before timeout",
 		shouldScaleTo0: true,
-		timeoutSeconds: 10,
-		sleep:          15 * time.Second,
+		timeoutSeconds: 20,
+		sleep:          25 * time.Second,
 		expectedStatus: http.StatusOK,
 	}, {
 		name:           "when scaling up from 0 and it does exceed timeout seconds",
diff --git a/test/e2e-common.sh b/test/e2e-common.sh
index cb084ba5b..d3d65f75d 100644
--- a/test/e2e-common.sh
+++ b/test/e2e-common.sh
@@ -305,11 +305,12 @@ function install_knative_serving_standard() {
   else
     # Download the latest release of Knative Serving.
     local url="https://github.com/knative/serving/releases/download/${LATEST_SERVING_RELEASE_VERSION}"
-    local yaml="serving.yaml"
 
     local SERVING_RELEASE_YAML=${TMP_DIR}/"serving-${LATEST_SERVING_RELEASE_VERSION}.yaml"
-    wget "${url}/${yaml}" -O "${SERVING_RELEASE_YAML}" \
-      || fail_test "Unable to download latest knative/serving release."
+    wget "${url}/serving-crds.yaml" -O "${SERVING_RELEASE_YAML}" \
+      || fail_test "Unable to download latest knative/serving CRD file."
+    wget "${url}/serving-core.yaml" -O ->> "${SERVING_RELEASE_YAML}" \
+      || fail_test "Unable to download latest knative/serving core file."
 
     # Replace the default system namespace with the test's system namespace.
     sed -i "s/namespace: ${KNATIVE_DEFAULT_NAMESPACE}/namespace: ${SYSTEM_NAMESPACE}/g" ${SERVING_RELEASE_YAML}
@@ -375,10 +376,8 @@ function install_knative_serving_standard() {
     fi
   else
     echo "Knative YAML: ${SERVING_RELEASE_YAML}"
-    # If we are installing from provided yaml, then only install non-istio bits here,
-    # and if we choose to install istio below, then pass the whole file as the rest.
     # We use ko because it has better filtering support for CRDs.
-    ko apply -f "${SERVING_RELEASE_YAML}" --selector=networking.knative.dev/ingress-provider!=istio || return 1
+    ko apply -f "${SERVING_RELEASE_YAML}" || return 1
     UNINSTALL_LIST+=( "${SERVING_RELEASE_YAML}" )
 
     if (( INSTALL_MONITORING )); then
diff --git a/test/e2e/initial_scale_test.go b/test/e2e/initial_scale_test.go
index 61a1098b1..0a761f67a 100644
--- a/test/e2e/initial_scale_test.go
+++ b/test/e2e/initial_scale_test.go
@@ -97,7 +97,7 @@ func createAndVerifyInitialScaleService(t *testing.T, clients *test.Clients, nam
 		}
 		gotPods := len(podList.Items)
 		if gotPods == wantPods {
-			return s.Generation == s.Status.ObservedGeneration && s.Status.IsReady(), nil
+			return s.IsReady(), nil
 		}
 		if gotPods > wantPods {
 			return false, fmt.Errorf("expected %d pods created, got %d", wantPods, gotPods)
diff --git a/test/e2e/route_service_test.go b/test/e2e/route_service_test.go
index 1f8ecc982..ea814b893 100644
--- a/test/e2e/route_service_test.go
+++ b/test/e2e/route_service_test.go
@@ -66,13 +66,13 @@ func TestRoutesNotReady(t *testing.T) {
 	}
 
 	t.Logf("Waiting for Service %q ObservedGeneration to match Generation, and status transition to Ready == False.", names.Service)
-	if err := v1test.WaitForServiceState(clients.ServingClient, names.Service, v1test.IsServiceNotReady, "ServiceIsNotReady"); err != nil {
+	if err := v1test.WaitForServiceState(clients.ServingClient, names.Service, v1test.IsServiceFailed, "ServiceIsNotReady"); err != nil {
 		t.Fatalf("Failed waiting for Service %q to transition to Ready == False: %#v", names.Service, err)
 	}
 
 	t.Logf("Validating Route %q has reconciled to Ready == False.", serviceresourcenames.Route(svc))
 	// Check Route is not ready
-	if err = v1test.CheckRouteState(clients.ServingClient, serviceresourcenames.Route(svc), v1test.IsRouteNotReady); err != nil {
+	if err = v1test.CheckRouteState(clients.ServingClient, serviceresourcenames.Route(svc), v1test.IsRouteFailed); err != nil {
 		t.Fatalf("The Route %q was marked as Ready to serve traffic but it should not be: %#v", serviceresourcenames.Route(svc), err)
 	}
 
diff --git a/test/performance/benchmarks/dataplane-probe/continuous/dataplane-probe-setup.yaml b/test/performance/benchmarks/dataplane-probe/continuous/dataplane-probe-setup.yaml
index cf6311916..7c6a05ee8 100644
--- a/test/performance/benchmarks/dataplane-probe/continuous/dataplane-probe-setup.yaml
+++ b/test/performance/benchmarks/dataplane-probe/continuous/dataplane-probe-setup.yaml
@@ -27,6 +27,7 @@ spec:
     spec:
       containers:
       - image: ko://knative.dev/serving/test/test_images/autoscale
+      containerConcurrency: 0 # Explicitly set the default, since it might be overridden in CM.
 ---
 apiVersion: serving.knative.dev/v1
 kind: Service
@@ -94,6 +95,7 @@ spec:
     spec:
       containers:
       - image: ko://knative.dev/serving/test/test_images/autoscale
+      containerConcurrency: 0 # Explicitly set the default, since it might be overridden in CM.
 ---
 apiVersion: serving.knative.dev/v1
 kind: Service
diff --git a/test/performance/benchmarks/load-test/continuous/load-test-setup.yaml b/test/performance/benchmarks/load-test/continuous/load-test-setup.yaml
index 3a38dda42..fa1e64355 100644
--- a/test/performance/benchmarks/load-test/continuous/load-test-setup.yaml
+++ b/test/performance/benchmarks/load-test/continuous/load-test-setup.yaml
@@ -25,6 +25,7 @@ spec:
     spec:
       containers:
       - image: ko://knative.dev/serving/test/test_images/autoscale
+      containerConcurrency: 0 # Explicitly set the default, since it might be overridden in CM.
 ---
 apiVersion: serving.knative.dev/v1
 kind: Service
@@ -39,6 +40,7 @@ spec:
     spec:
       containers:
       - image: ko://knative.dev/serving/test/test_images/autoscale
+      containerConcurrency: 0 # Explicitly set the default, since it might be overridden in CM.
 ---
 apiVersion: serving.knative.dev/v1
 kind: Service
@@ -53,3 +55,5 @@ spec:
     spec:
       containers:
       - image: ko://knative.dev/serving/test/test_images/autoscale
+      containerConcurrency: 0 # Explicitly set the default, since it might be overridden in CM.
+---
diff --git a/test/v1/configuration.go b/test/v1/configuration.go
index 6b1ddae43..645387a93 100644
--- a/test/v1/configuration.go
+++ b/test/v1/configuration.go
@@ -172,5 +172,5 @@ func CheckConfigurationState(client *test.ServingClients, name string, inState f
 // IsConfigurationReady will check the status conditions of the config and return true if the config is
 // ready. This means it has at least created one revision and that has become ready.
 func IsConfigurationReady(c *v1.Configuration) (bool, error) {
-	return c.Generation == c.Status.ObservedGeneration && c.Status.IsReady(), nil
+	return c.IsReady(), nil
 }
diff --git a/test/v1/revision.go b/test/v1/revision.go
index 4a31c75ca..04e65c09b 100644
--- a/test/v1/revision.go
+++ b/test/v1/revision.go
@@ -72,7 +72,7 @@ func CheckRevisionState(client *test.ServingClients, name string, inState func(r
 // ready to serve traffic. It will return false if the status indicates a state other than deploying
 // or being ready. It will also return false if the type of the condition is unexpected.
 func IsRevisionReady(r *v1.Revision) (bool, error) {
-	return r.Generation == r.Status.ObservedGeneration && r.Status.IsReady(), nil
+	return r.IsReady(), nil
 }
 
 // IsRevisionPinned will check if the revision is pinned to a route.
diff --git a/test/v1/route.go b/test/v1/route.go
index 740a49ab1..0efc0d7e0 100644
--- a/test/v1/route.go
+++ b/test/v1/route.go
@@ -108,10 +108,10 @@ func IsRouteReady(r *v1.Route) (bool, error) {
 	return r.Generation == r.Status.ObservedGeneration && r.Status.IsReady(), nil
 }
 
-// IsRouteNotReady will check the status conditions of the route and return true if the route is
+// IsRouteFailed will check the status conditions of the route and return true if the route is
 // not ready.
-func IsRouteNotReady(r *v1.Route) (bool, error) {
-	return !r.Status.IsReady(), nil
+func IsRouteFailed(r *v1.Route) (bool, error) {
+	return r.IsFailed(), nil
 }
 
 // RetryingRouteInconsistency retries common requests seen when creating a new route
diff --git a/test/v1/service.go b/test/v1/service.go
index 918b48cc1..05831787a 100644
--- a/test/v1/service.go
+++ b/test/v1/service.go
@@ -250,14 +250,13 @@ func CheckServiceState(client *test.ServingClients, name string, inState func(s
 // IsServiceReady will check the status conditions of the service and return true if the service is
 // ready. This means that its configurations and routes have all reported ready.
 func IsServiceReady(s *v1.Service) (bool, error) {
-	return s.Generation == s.Status.ObservedGeneration && s.Status.IsReady(), nil
+	return s.IsReady(), nil
 }
 
-// IsServiceNotReady will check the status conditions of the service and return true if the service is
+// IsServiceFailed will check the status conditions of the service and return true if the service is
 // not ready.
-func IsServiceNotReady(s *v1.Service) (bool, error) {
-	result := s.Status.GetCondition(v1.ServiceConditionReady)
-	return s.Generation == s.Status.ObservedGeneration && result != nil && result.Status == corev1.ConditionFalse, nil
+func IsServiceFailed(s *v1.Service) (bool, error) {
+	return s.IsFailed(), nil
 }
 
 // IsServiceRoutesNotReady checks the RoutesReady status of the service and returns true only if RoutesReady is set to False.
diff --git a/third_party/contour-latest/contour.yaml b/third_party/contour-latest/contour.yaml
index 568543603..0015e9015 100644
--- a/third_party/contour-latest/contour.yaml
+++ b/third_party/contour-latest/contour.yaml
@@ -1432,7 +1432,7 @@ spec:
         # if we change this on each version, you can no longer upgrade
         # just by applying the deployment YAML.
         # See #2423, #2395, #2150, and #2030 for earlier questions about this.
-        image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:c7fc6688688e458236c03c300dec1332bfdaa3d881a32398e2c8e2bec4440777
+        image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:d7608962e6f610e718df45e492f5a115c47902d0996912e338c9908caaf802a7
         imagePullPolicy: Always
         command:
         - contour
@@ -1672,7 +1672,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:c7fc6688688e458236c03c300dec1332bfdaa3d881a32398e2c8e2bec4440777
+        image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:d7608962e6f610e718df45e492f5a115c47902d0996912e338c9908caaf802a7
         imagePullPolicy: Always
         name: contour
         ports:
@@ -1764,7 +1764,7 @@ spec:
         args:
         - envoy
         - shutdown-manager
-        image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:c7fc6688688e458236c03c300dec1332bfdaa3d881a32398e2c8e2bec4440777
+        image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:d7608962e6f610e718df45e492f5a115c47902d0996912e338c9908caaf802a7
         imagePullPolicy: Always
         lifecycle:
           preStop:
@@ -1840,7 +1840,7 @@ spec:
         - --envoy-key-file=/certs/tls.key
         command:
         - contour
-        image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:c7fc6688688e458236c03c300dec1332bfdaa3d881a32398e2c8e2bec4440777
+        image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:d7608962e6f610e718df45e492f5a115c47902d0996912e338c9908caaf802a7
         imagePullPolicy: Always
         name: envoy-initconfig
         volumeMounts:
@@ -3305,7 +3305,7 @@ spec:
         # if we change this on each version, you can no longer upgrade
         # just by applying the deployment YAML.
         # See #2423, #2395, #2150, and #2030 for earlier questions about this.
-        image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:c7fc6688688e458236c03c300dec1332bfdaa3d881a32398e2c8e2bec4440777
+        image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:d7608962e6f610e718df45e492f5a115c47902d0996912e338c9908caaf802a7
         imagePullPolicy: Always
         command:
         - contour
@@ -3545,7 +3545,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:c7fc6688688e458236c03c300dec1332bfdaa3d881a32398e2c8e2bec4440777
+        image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:d7608962e6f610e718df45e492f5a115c47902d0996912e338c9908caaf802a7
         imagePullPolicy: Always
         name: contour
         ports:
@@ -3637,7 +3637,7 @@ spec:
         args:
         - envoy
         - shutdown-manager
-        image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:c7fc6688688e458236c03c300dec1332bfdaa3d881a32398e2c8e2bec4440777
+        image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:d7608962e6f610e718df45e492f5a115c47902d0996912e338c9908caaf802a7
         imagePullPolicy: Always
         lifecycle:
           preStop:
@@ -3713,7 +3713,7 @@ spec:
         - --envoy-key-file=/certs/tls.key
         command:
         - contour
-        image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:c7fc6688688e458236c03c300dec1332bfdaa3d881a32398e2c8e2bec4440777
+        image: gcr.io/knative-nightly/github.com/projectcontour/contour/cmd/contour@sha256:d7608962e6f610e718df45e492f5a115c47902d0996912e338c9908caaf802a7
         imagePullPolicy: Always
         name: envoy-initconfig
         volumeMounts:
diff --git a/third_party/contour-latest/net-contour.yaml b/third_party/contour-latest/net-contour.yaml
index 45f451554..a6bb17bc4 100644
--- a/third_party/contour-latest/net-contour.yaml
+++ b/third_party/contour-latest/net-contour.yaml
@@ -35,7 +35,7 @@ metadata:
   namespace: knative-serving
   labels:
     networking.knative.dev/ingress-provider: contour
-    serving.knative.dev/release: "v20200604-b4bfe323"
+    serving.knative.dev/release: "v20200605-d9d1bc5a"
 data:
   _example: |
     ################################
@@ -94,7 +94,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:526731956804d45bb5593f4d82b0cd0fb1819540f76534a8221d61d306a28042
+        image: gcr.io/knative-nightly/knative.dev/net-contour/cmd/controller@sha256:382f2bc3683bc8caf230977e137c7bc80d27d92f25fab4eaf1a0ca5a296c036a
         resources:
           requests:
             cpu: 40m
diff --git a/third_party/kourier-latest/kourier.yaml b/third_party/kourier-latest/kourier.yaml
index a160db6cf..db61c744f 100644
--- a/third_party/kourier-latest/kourier.yaml
+++ b/third_party/kourier-latest/kourier.yaml
@@ -166,7 +166,7 @@ spec:
         app: 3scale-kourier-control
     spec:
       containers:
-      - image: gcr.io/knative-nightly/knative.dev/net-kourier/cmd/kourier@sha256:d19e8a480309208bf47346ef2e25309bc22261d65b42ea7fb399991c579d83fa
+      - image: gcr.io/knative-nightly/knative.dev/net-kourier/cmd/kourier@sha256:103fb1fcff5641b67ff67f347861dd588d83bac372e618714a89fe55cc11c080
         imagePullPolicy: Always
         name: kourier-control
         env:
diff --git a/vendor/knative.dev/pkg/configmap/testing/configmap.go b/vendor/knative.dev/pkg/configmap/testing/configmap.go
index 5c4a2d8c1..34ed5cd30 100644
--- a/vendor/knative.dev/pkg/configmap/testing/configmap.go
+++ b/vendor/knative.dev/pkg/configmap/testing/configmap.go
@@ -83,12 +83,12 @@ func ConfigMapsFromTestFile(t *testing.T, name string, allowed ...string) (*core
 		}
 	}
 
-	// Check that the hashed exampleBody matches the assigned label, if present.
-	gotChecksum, hasExampleChecksumLabel := orig.Labels[configmap.ExampleChecksumLabel]
-	if hasExampleBody && hasExampleChecksumLabel {
+	// Check that the hashed exampleBody matches the assigned annotation, if present.
+	gotChecksum, hasExampleChecksumAnnotation := orig.Annotations[configmap.ExampleChecksumAnnotation]
+	if hasExampleBody && hasExampleChecksumAnnotation {
 		wantChecksum := configmap.Checksum(exampleBody)
 		if gotChecksum != wantChecksum {
-			t.Errorf("example checksum label = %s, want %s", gotChecksum, wantChecksum)
+			t.Errorf("example checksum annotation = %s, want %s", gotChecksum, wantChecksum)
 		}
 	}
 
diff --git a/vendor/knative.dev/test-infra/scripts/library.sh b/vendor/knative.dev/test-infra/scripts/library.sh
index 092f39811..de059f536 100644
--- a/vendor/knative.dev/test-infra/scripts/library.sh
+++ b/vendor/knative.dev/test-infra/scripts/library.sh
@@ -449,14 +449,18 @@ function report_go_test() {
 }
 
 # Install Knative Serving in the current cluster.
-# Parameters: $1 - Knative Serving manifest.
+# Parameters: $1 - Knative Serving crds manifest.
+#             $2 - Knative Serving core manifest.
+#             $3 - Knative net-istio manifest.
 function start_knative_serving() {
   header "Starting Knative Serving"
   subheader "Installing Knative Serving"
   echo "Installing Serving CRDs from $1"
-  kubectl apply --selector knative.dev/crd-install=true -f "$1"
-  echo "Installing the rest of serving components from $1"
   kubectl apply -f "$1"
+  echo "Installing Serving core components from $2"
+  kubectl apply -f "$2"
+  echo "Installing net-istio components from $3"
+  kubectl apply -f "$3"
   wait_until_pods_running knative-serving || return 1
 }
 
@@ -478,12 +482,14 @@ function start_knative_monitoring() {
 # Install the stable release Knative/serving in the current cluster.
 # Parameters: $1 - Knative Serving version number, e.g. 0.6.0.
 function start_release_knative_serving() {
-  start_knative_serving "https://storage.googleapis.com/knative-releases/serving/previous/v$1/serving.yaml"
+  start_knative_serving "https://storage.googleapis.com/knative-releases/serving/previous/v$1/serving-crds.yaml" \
+    "https://storage.googleapis.com/knative-releases/serving/previous/v$1/serving-core.yaml" \
+    "https://storage.googleapis.com/knative-releases/net-istio/previous/v$1/net-istio.yaml"
 }
 
 # Install the latest stable Knative Serving in the current cluster.
 function start_latest_knative_serving() {
-  start_knative_serving "${KNATIVE_SERVING_RELEASE}"
+  start_knative_serving "${KNATIVE_SERVING_RELEASE_CRDS}" "${KNATIVE_SERVING_RELEASE_CORE}" "${KNATIVE_NET_ISTIO_RELEASE}"
 }
 
 # Install Knative Eventing in the current cluster.
@@ -742,6 +748,8 @@ readonly _TEST_INFRA_SCRIPTS_DIR="$(dirname $(get_canonical_path ${BASH_SOURCE[0
 readonly REPO_NAME_FORMATTED="Knative $(capitalize ${REPO_NAME//-/ })"
 
 # Public latest nightly or release yaml files.
-readonly KNATIVE_SERVING_RELEASE="$(get_latest_knative_yaml_source "serving" "serving")"
+readonly KNATIVE_SERVING_RELEASE_CRDS="$(get_latest_knative_yaml_source "serving" "serving-crds")"
+readonly KNATIVE_SERVING_RELEASE_CORE="$(get_latest_knative_yaml_source "serving" "serving-core")"
+readonly KNATIVE_NET_ISTIO_RELEASE="$(get_latest_knative_yaml_source "net-istio" "net-istio")"
 readonly KNATIVE_EVENTING_RELEASE="$(get_latest_knative_yaml_source "eventing" "eventing")"
 readonly KNATIVE_MONITORING_RELEASE="$(get_latest_knative_yaml_source "serving" "monitoring")"