Repository: knative/client (go)

Issue:
Traffic split calculation should only use traffic-split revisions
When creating a traffic split and automatically calculating a percentage rest, all revisions are taken into account, even those the are currently nor part of the traffic distribution:

```
$ kn revision list
NAME           SERVICE   TRAFFIC   TAGS   GENERATION   AGE   CONDITIONS   READY   REASON
random-00002   random    100%             2            37s   3 OK / 4     True
random-00001   random                     1            66s   4 OK / 4     True

$ kn service update random --image rhuss/random:2.0 --traffic 50
Error: unable to allocate the remaining traffic: 50%. Reason: incorrect number of revisions specified. Only 1 revision should be missing
Run 'kn --help' for usage
```

Here only `random-00002` should be taken into account and automatically reduced to 50% (so there should be no error message, but the expected end result should be `random-0002` set to 50% and the new revision `random-00003` should be 50%.

Pull request:
Traffic split auto redirection should only consider the active revisions 
## Description

<!-- Please add a short summary about what the pull request is going to bring on the table -->

## Changes

<!-- Please add list of more detailed changes. These changes should be reflected also in the commit messages -->

* Automatic redirection of traffic should only take the active revisions into consideration
* Modified unit test according to the change

```
gvyas-mac:client gvyas$ ./kn revision list -s cloudevents-player
NAME                       SERVICE              TRAFFIC   TAGS   GENERATION   AGE   CONDITIONS   READY   REASON
cloudevents-player-00005   cloudevents-player   100%             5            76m   3 OK / 4     True    
cloudevents-player-00004   cloudevents-player                    4            84m   3 OK / 4     True    
cloudevents-player-00003   cloudevents-player                    3            85m   3 OK / 4     True    
cloudevents-player-00002   cloudevents-player                    2            27d   3 OK / 4     True    
cloudevents-player-00001   cloudevents-player                    1            27d   3 OK / 4     True    
```
```
gvyas-mac:client gvyas$ ./kn service update cloudevents-player --env ABC=xyz --traffic 70
Updating Service 'cloudevents-player' in namespace 'default':

  0.065s The Route is still working to reflect the latest desired specification.
  0.110s ...
  3.198s Traffic is not yet migrated to the latest revision.
  3.262s Ingress has not yet been reconciled.
  3.309s Waiting for load balancer to be ready
  3.458s Ready to serve.

Service 'cloudevents-player' updated to latest revision 'cloudevents-player-00006' is available at URL:
http://cloudevents-player.default.10.111.180.117.sslip.io
gvyas-mac:client gvyas$ ./kn revision list -s cloudevents-player
NAME                       SERVICE              TRAFFIC   TAGS   GENERATION   AGE   CONDITIONS   READY   REASON
cloudevents-player-00006   cloudevents-player   70%              6            6s    4 OK / 4     True    
cloudevents-player-00005   cloudevents-player   30%              5            77m   3 OK / 4     True    
cloudevents-player-00004   cloudevents-player                    4            86m   3 OK / 4     True    
cloudevents-player-00003   cloudevents-player                    3            86m   3 OK / 4     True    
cloudevents-player-00002   cloudevents-player                    2            27d   3 OK / 4     True    
cloudevents-player-00001   cloudevents-player                    1            27d   3 OK / 4     True    
```

## Reference

<!-- Please add the corresponding issue number which this pull request is about to fix -->
Fixes #1609 

<!--
Please add an entry to CHANGELOG.adoc file, too, as part of your Pull Request.

In the following cases, add a short description of PR to the unreleased section in CHANGELOG.adoc:

- 🎁 New feature
- 🐛 Bug fix
- ✨ Feature Update
- 🐣 Refactoring
- 🗑️ Remove feature or internal logic

See other entries in CHANGELOG.adoc as an example for how to add the entry, including a reference to the corresponding issue/PR

PLEASE DON'T ADD THAT LINE HERE IN THE PULL-REQUEST DESCRIPTION BUT DIRECTLY IN CHANGELOG.ADOC AND ADD CHANGELOG.ADOC AS PART OF YOUR PULL-REQUEST.
-->

<!--
To automatically lint go code in this pull request uncomment the line below. You get feedback as comments on your pull request then -->

<!--
/lint
-->


Patch:
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc
index 9cefdafb..a6c7501e 100644
--- a/CHANGELOG.adoc
+++ b/CHANGELOG.adoc
@@ -11,6 +11,32 @@
 |
 | https://github.com/knative/client/pull/[#]
 ////
+## v1.3.0 (2022-03-08)
+[cols="1,10,3", options="header", width="100%"]
+|===
+| | Description | PR
+
+| 🐛
+| Fix traffic split auto redirection to only consider the active revisions
+| https://github.com/knative/client/pull/1617[#1617]
+
+| 🐛
+| Fix missing Azure auth provider
+| https://github.com/knative/client/pull/1616[#1616]
+
+| 🐛
+| Remove hardcoded kn for usage and error
+| https://github.com/knative/client/pull/1598[#1603]
+
+| 🐛
+| Fix display version of Serving & Eventing
+| https://github.com/knative/client/pull/1601[#1601]
+
+| 🎁
+| Add Knative Eventtype support
+| https://github.com/knative/client/pull/1598[#1598]
+
+|===
 
 ## v1.2.0 (2022-01-25)
 [cols="1,10,3", options="header", width="100%"]
diff --git a/go.mod b/go.mod
index 967fbf56..7a6f7028 100644
--- a/go.mod
+++ b/go.mod
@@ -17,10 +17,10 @@ require (
 	k8s.io/cli-runtime v0.22.5
 	k8s.io/client-go v0.22.5
 	k8s.io/code-generator v0.22.5
-	knative.dev/eventing v0.29.1-0.20220228193110-f2045b0d65b7
+	knative.dev/eventing v0.29.1-0.20220307200636-9590bc3a96a3
 	knative.dev/hack v0.0.0-20220224013837-e1785985d364
-	knative.dev/networking v0.0.0-20220301031941-6f27842e45ca
-	knative.dev/pkg v0.0.0-20220228195509-fe264173447b
-	knative.dev/serving v0.29.1-0.20220227211007-7f681da66b28
+	knative.dev/networking v0.0.0-20220302134042-e8b2eb995165
+	knative.dev/pkg v0.0.0-20220301181942-2fdd5f232e77
+	knative.dev/serving v0.29.1-0.20220307224905-f428fa524adc
 	sigs.k8s.io/yaml v1.3.0
 )
diff --git a/go.sum b/go.sum
index 5028c4fb..46431e9b 100644
--- a/go.sum
+++ b/go.sum
@@ -2159,30 +2159,20 @@ k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
 k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 h1:ZKMMxTvduyf5WUtREOqg5LiXaN1KO/+0oOQPRFrClpo=
 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
-knative.dev/caching v0.0.0-20220217152914-057ba67508ef/go.mod h1:yA5f2tPxj4IStey7V2k87hvQ+a64iRYb4V5/BzDCm3s=
-knative.dev/eventing v0.29.1-0.20220228193110-f2045b0d65b7 h1:sUPfasn5sd9H1bgfNMe4JrhbnWD0oFHu48Uz7R0zpoE=
-knative.dev/eventing v0.29.1-0.20220228193110-f2045b0d65b7/go.mod h1:1PF6Gr2r+y0PrJ/sgoN8jcAi599SLbKDuGulAsdGX/w=
-knative.dev/hack v0.0.0-20220118141833-9b2ed8471e30/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
-knative.dev/hack v0.0.0-20220209225905-7331bb16ba00/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
-knative.dev/hack v0.0.0-20220216040439-0456e8bf6547/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
-knative.dev/hack v0.0.0-20220218190734-a8ef7b67feec/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
-knative.dev/hack v0.0.0-20220222192704-cf8cbc0e9165/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
+knative.dev/caching v0.0.0-20220302153644-5a6403ef2de5/go.mod h1:52//2yvw0iO3Nu2duAMI5BzfQKHWiXZuvRvzaypoGkU=
+knative.dev/eventing v0.29.1-0.20220307200636-9590bc3a96a3 h1:RWDEEbt3LdhbFYOFPs2udE8X9TtrgZkcbAKaRH8Cv3k=
+knative.dev/eventing v0.29.1-0.20220307200636-9590bc3a96a3/go.mod h1:JCqC8evTls1WiBTmYhPEGME6OQD8HFnLQjFPImwOEOg=
 knative.dev/hack v0.0.0-20220224013837-e1785985d364 h1:wOysRDkzacHlM2OEQoM5ayNT+s/Zymzk5Tv17RL++3g=
 knative.dev/hack v0.0.0-20220224013837-e1785985d364/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
 knative.dev/hack/schema v0.0.0-20220224013837-e1785985d364/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
-knative.dev/networking v0.0.0-20220221080803-193442233437/go.mod h1:DlTbFi93lgt10aqbfERO9auyCgP8cm42kXsHDPRGTrs=
-knative.dev/networking v0.0.0-20220301031941-6f27842e45ca h1:qLau1/N0EfuxUdKk7Z3kZEydYRByMf39J3ilxleiUdE=
-knative.dev/networking v0.0.0-20220301031941-6f27842e45ca/go.mod h1:EdQTSLl8BDeLLrC8pymGOiPMRAknFg+7oRO6MMUts94=
-knative.dev/pkg v0.0.0-20220118160532-77555ea48cd4/go.mod h1:etVT7Tm8pSDf4RKhGk4r7j/hj3dNBpvT7bO6a6wpahs=
-knative.dev/pkg v0.0.0-20220215153400-3c00bb0157b9/go.mod h1:6ZoCgi60jSUn/WrwTGNAZbsz5/kmwiZZD8EovSLzYZ4=
-knative.dev/pkg v0.0.0-20220217155112-d48172451966/go.mod h1:qymIihGpeunap7KEUhrKRcm0LjhkCjL+n7ryIx2kLH0=
-knative.dev/pkg v0.0.0-20220222211204-80c511aa340f/go.mod h1:qymIihGpeunap7KEUhrKRcm0LjhkCjL+n7ryIx2kLH0=
-knative.dev/pkg v0.0.0-20220225161142-708dc1cc48e9/go.mod h1:R3Nha5VzzyB3dwg1toxdUjCf0tH9FfMDcI6miLw5v4E=
-knative.dev/pkg v0.0.0-20220228195509-fe264173447b h1:93HDyR8WPjByf+JHZiQkBMW4IqrkOxXbDaXcLQhh4qU=
+knative.dev/networking v0.0.0-20220302134042-e8b2eb995165 h1:mkUDPTqfRPNhsUTVOH53IOx0Utzlfwl48t8lLc1bfL4=
+knative.dev/networking v0.0.0-20220302134042-e8b2eb995165/go.mod h1:EdQTSLl8BDeLLrC8pymGOiPMRAknFg+7oRO6MMUts94=
 knative.dev/pkg v0.0.0-20220228195509-fe264173447b/go.mod h1:SsH9J6Gz+CvrHmoL0TELJXmMmohqKSQ5bpJvCv+1+ZI=
-knative.dev/reconciler-test v0.0.0-20220216192840-2c3291f210ce/go.mod h1:m2q6+mGqlPsJ6qP0ssMv3x2UBwIgTdTxgxJ6GK5kgu4=
-knative.dev/serving v0.29.1-0.20220227211007-7f681da66b28 h1:rxppAkm9BaoHUyqwSTJlCQo/UUvKzS3Hb5siTGLf+Gg=
-knative.dev/serving v0.29.1-0.20220227211007-7f681da66b28/go.mod h1:R7+42YVnhF9Wn/D7JCX5hZ9CnLjHKtvlUJuapKFZYDU=
+knative.dev/pkg v0.0.0-20220301181942-2fdd5f232e77 h1:eIH936a0/1X/XQOMN9+O3fw9spGvOJiMVKsBuu8J47U=
+knative.dev/pkg v0.0.0-20220301181942-2fdd5f232e77/go.mod h1:SsH9J6Gz+CvrHmoL0TELJXmMmohqKSQ5bpJvCv+1+ZI=
+knative.dev/reconciler-test v0.0.0-20220303141206-84821d26ed1f/go.mod h1:K5pZJkenonlT9o+MtRaNsBP7BazGwjhqYPepuV1zdnU=
+knative.dev/serving v0.29.1-0.20220307224905-f428fa524adc h1:iJQasysRfGLCMiIcCkXjAr/eunI9iq2BKf6ysMysE9k=
+knative.dev/serving v0.29.1-0.20220307224905-f428fa524adc/go.mod h1:UwsKXK4LnkM+e8/hhgJq2LtyzmzHD6UsrGPFe5JOBS8=
 mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48=
 mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc=
 mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4=
diff --git a/pkg/kn/traffic/compute.go b/pkg/kn/traffic/compute.go
index fae87ef5..2a0caa44 100644
--- a/pkg/kn/traffic/compute.go
+++ b/pkg/kn/traffic/compute.go
@@ -242,12 +242,12 @@ func errorSumGreaterThan100(sum int) error {
 // - if provided traffic portion are integers
 // - if traffic as per flags sums to 100
 // - if traffic as per flags < 100, can remaining traffic be automatically directed
-func verifyInput(trafficFlags *flags.Traffic, svc *servingv1.Service, revisions []servingv1.Revision, mutation bool) error {
+func verifyInput(trafficFlags *flags.Traffic, svc *servingv1.Service, targets []servingv1.TrafficTarget, existingRevisions []servingv1.Revision, mutation bool) error {
 	// check if traffic is being sent to @latest tag
 	var latestRefTraffic bool
 
-	// number of existing revisions
-	var existingRevisionCount = len(revisions)
+	// number of existing targets
+	var existingRevisionCount = len(targets)
 
 	err := verifyLatestTag(trafficFlags)
 	if err != nil {
@@ -272,7 +272,7 @@ func verifyInput(trafficFlags *flags.Traffic, svc *servingv1.Service, revisions
 		latestRefTraffic = true
 	}
 
-	// number of revisions specified in traffic flags
+	// number of targets specified in traffic flags
 	specRevPercentCount := len(trafficFlags.RevisionsPercentages)
 
 	// no traffic to route
@@ -307,8 +307,12 @@ func verifyInput(trafficFlags *flags.Traffic, svc *servingv1.Service, revisions
 	}
 
 	// remaining % to 100
-	for _, rev := range revisions {
-		if !checkRevisionPresent(revisionRefMap, rev) {
+	for _, target := range targets {
+		rev := getRevisionFromList(existingRevisions, target.RevisionName)
+		if rev == nil {
+			break
+		}
+		if !checkRevisionPresent(revisionRefMap, *rev) {
 			trafficFlags.RevisionsPercentages = append(trafficFlags.RevisionsPercentages, fmt.Sprintf("%s=%d", rev.Name, 100-sum))
 			return nil
 		}
@@ -317,6 +321,17 @@ func verifyInput(trafficFlags *flags.Traffic, svc *servingv1.Service, revisions
 	return errorTrafficDistribution(sum, errorDistributionRevisionNotFound)
 }
 
+func getRevisionFromList(revisions []servingv1.Revision, name string) *servingv1.Revision {
+	var revisionWithName *servingv1.Revision
+	for _, rev := range revisions {
+		if rev.Name == name {
+			revisionWithName = rev.DeepCopy()
+			break
+		}
+	}
+	return revisionWithName
+}
+
 func verifyRevisionSumAndReferences(trafficFlags *flags.Traffic) (revisionRefMap map[string]int, sum int, err error) {
 
 	revisionRefMap = make(map[string]int)
@@ -384,10 +399,12 @@ func checkRevisionPresent(refMap map[string]int, rev servingv1.Revision) bool {
 // total traffic per flags < 100, the params 'revisions' and 'mutation' are used to direct remaining
 // traffic. Param 'mutation' is set to true if a new revision will be created on service update
 func Compute(cmd *cobra.Command, svc *servingv1.Service,
-	trafficFlags *flags.Traffic, revisions []servingv1.Revision, mutation bool) ([]servingv1.TrafficTarget, error) {
+	trafficFlags *flags.Traffic, allRevisions []servingv1.Revision, mutation bool) ([]servingv1.TrafficTarget, error) {
 	targets := svc.Spec.Traffic
 	serviceName := svc.Name
-	err := verifyInput(trafficFlags, svc, revisions, mutation)
+	revisions := svc.Status.Traffic
+
+	err := verifyInput(trafficFlags, svc, revisions, allRevisions, mutation)
 	if err != nil {
 		return nil, err
 	}
diff --git a/vendor/knative.dev/serving/pkg/apis/autoscaling/annotation_validation.go b/vendor/knative.dev/serving/pkg/apis/autoscaling/annotation_validation.go
index 307767a1..ba7b7537 100644
--- a/vendor/knative.dev/serving/pkg/apis/autoscaling/annotation_validation.go
+++ b/vendor/knative.dev/serving/pkg/apis/autoscaling/annotation_validation.go
@@ -109,7 +109,9 @@ func validateFloats(m map[string]string) (errs *apis.FieldError) {
 	}
 
 	if k, v, ok := TargetAnnotation.Get(m); ok {
-		if fv, err := strconv.ParseFloat(v, 64); err != nil || fv < TargetMin {
+		if fv, err := strconv.ParseFloat(v, 64); err != nil {
+			errs = errs.Also(apis.ErrInvalidValue(v, k))
+		} else if fv < TargetMin {
 			errs = errs.Also(apis.ErrGeneric(fmt.Sprintf("target %s should be at least %g", v, TargetMin), k))
 		}
 	}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 5b514011..5a43b672 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -765,7 +765,7 @@ k8s.io/utils/buffer
 k8s.io/utils/integer
 k8s.io/utils/pointer
 k8s.io/utils/trace
-# knative.dev/eventing v0.29.1-0.20220228193110-f2045b0d65b7
+# knative.dev/eventing v0.29.1-0.20220307200636-9590bc3a96a3
 ## explicit
 knative.dev/eventing/pkg/apis/config
 knative.dev/eventing/pkg/apis/duck
@@ -796,7 +796,7 @@ knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2/fake
 # knative.dev/hack v0.0.0-20220224013837-e1785985d364
 ## explicit
 knative.dev/hack
-# knative.dev/networking v0.0.0-20220301031941-6f27842e45ca
+# knative.dev/networking v0.0.0-20220302134042-e8b2eb995165
 ## explicit
 knative.dev/networking/pkg
 knative.dev/networking/pkg/apis/networking
@@ -804,7 +804,7 @@ knative.dev/networking/pkg/apis/networking/v1alpha1
 knative.dev/networking/pkg/client/clientset/versioned
 knative.dev/networking/pkg/client/clientset/versioned/scheme
 knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1
-# knative.dev/pkg v0.0.0-20220228195509-fe264173447b
+# knative.dev/pkg v0.0.0-20220301181942-2fdd5f232e77
 ## explicit
 knative.dev/pkg/apis
 knative.dev/pkg/apis/duck
@@ -854,7 +854,7 @@ knative.dev/pkg/tracing/config
 knative.dev/pkg/tracing/propagation
 knative.dev/pkg/tracing/propagation/tracecontextb3
 knative.dev/pkg/tracker
-# knative.dev/serving v0.29.1-0.20220227211007-7f681da66b28
+# knative.dev/serving v0.29.1-0.20220307224905-f428fa524adc
 ## explicit
 knative.dev/serving/pkg/apis/autoscaling
 knative.dev/serving/pkg/apis/autoscaling/v1alpha1


Test patch:
diff --git a/pkg/kn/traffic/compute_test.go b/pkg/kn/traffic/compute_test.go
index 5ffce1ed..bd006789 100644
--- a/pkg/kn/traffic/compute_test.go
+++ b/pkg/kn/traffic/compute_test.go
@@ -82,6 +82,7 @@ func getService(name, latestRevision string, existingTraffic ServiceTraffic) *se
 		},
 	}}
 	service.Status.LatestReadyRevisionName = latestRevision
+	service.Status.Traffic = existingTraffic
 	return service
 }
 
@@ -553,7 +554,7 @@ func TestComputeErrMsg(t *testing.T) {
 		{
 			name:            "traffic split sum < 100 error when remaining revision not found",
 			existingTraffic: append(newServiceTraffic([]servingv1.TrafficTarget{}), newTarget("rev-00003", "rev-00001", 0, false), newTarget("", "rev-00002", 0, false), newTarget("", "rev-00003", 100, true)),
-			inputFlags:      []string{"--traffic", "rev-00003=10,rev-00002=20"},
+			inputFlags:      []string{"--traffic", "rev-00003=10,rev-00001=20"},
 			errMsg:          errorTrafficDistribution(30, errorDistributionRevisionNotFound).Error(),
 			existingRevisions: []servingv1.Revision{{
 				ObjectMeta: metav1.ObjectMeta{
@@ -565,13 +566,6 @@ func TestComputeErrMsg(t *testing.T) {
 						revision.RevisionTagsAnnotation: "rev-00003",
 					},
 				},
-			}, {
-				ObjectMeta: metav1.ObjectMeta{
-					Name: "rev-00002",
-					Labels: map[string]string{
-						"serving.knative.dev/service": "serviceName",
-					},
-				},
 			}, {
 				ObjectMeta: metav1.ObjectMeta{
 					Name: "rev-00003",
@@ -588,7 +582,7 @@ func TestComputeErrMsg(t *testing.T) {
 			testCmd.Execute()
 			svc := getService("serviceName", testCase.latestRevision, testCase.existingTraffic)
 			_, err := Compute(testCmd, svc, tFlags, testCase.existingRevisions, testCase.mutation)
-			assert.Error(t, err, testCase.errMsg)
+			assert.ErrorContains(t, err, testCase.errMsg)
 		})
 	}
 }
diff --git a/test/e2e/traffic_split_test.go b/test/e2e/traffic_split_test.go
index 42684ee8..46d0204f 100644
--- a/test/e2e/traffic_split_test.go
+++ b/test/e2e/traffic_split_test.go
@@ -138,7 +138,7 @@ func TestTrafficSplit(t *testing.T) {
 
 		serviceName := test.GetNextServiceName(serviceBase)
 		test.ServiceCreate(r, serviceName)
-		test.ServiceUpdate(r, serviceName, "--env", "TARGET=v1")
+		test.ServiceUpdate(r, serviceName, "--env", "TARGET=v1", "--traffic", "80")
 
 		rev1 := fmt.Sprintf("%s-00001", serviceName)
 		rev2 := fmt.Sprintf("%s-00002", serviceName)
@@ -191,11 +191,12 @@ func TestTrafficSplit(t *testing.T) {
 		serviceName := test.GetNextServiceName(serviceBase)
 
 		rev1 := fmt.Sprintf("%s-00001", serviceName)
+		rev2 := fmt.Sprintf("%s-00002", serviceName)
 
 		test.ServiceCreate(r, serviceName)
 
-		test.ServiceUpdate(r, serviceName, "--env", "TARGET=v1")
-		test.ServiceUpdate(r, serviceName, "--env", "TARGET=v2")
+		test.ServiceUpdate(r, serviceName, "--env", "TARGET=v1", "--traffic", "40")
+		test.ServiceUpdate(r, serviceName, "--env", "TARGET=v2", "--traffic", fmt.Sprintf("%s=%d,%s=%d", rev1, 10, rev2, 20))
 		test.ServiceUpdateWithError(r, serviceName, "--traffic", fmt.Sprintf("%s=%d", rev1, 50))
 
 		test.ServiceDelete(r, serviceName)
@@ -209,7 +210,7 @@ func TestTrafficSplit(t *testing.T) {
 
 		test.ServiceCreate(r, serviceName)
 
-		test.ServiceUpdate(r, serviceName, "--env", "TARGET=v1")
+		test.ServiceUpdate(r, serviceName, "--env", "TARGET=v1", "--traffic", "20")
 		test.ServiceUpdateWithError(r, serviceName, "--env", "TARGET=v2", "--traffic", "@latest=50")
 
 		test.ServiceDelete(r, serviceName)
diff --git a/vendor/knative.dev/serving/test/e2e-tests.sh b/vendor/knative.dev/serving/test/e2e-tests.sh
index 8b6a415e..754a4612 100644
--- a/vendor/knative.dev/serving/test/e2e-tests.sh
+++ b/vendor/knative.dev/serving/test/e2e-tests.sh
@@ -151,31 +151,4 @@ fi
 # This is for preventing too many large log files to be uploaded to GCS in CI.
 rm "${ARTIFACTS}/k8s.log-$(basename "${E2E_SCRIPT}").txt"
 
-header "Collecting performance data"
-
-cat <<EOF | ko apply $(ko_flags) -f -
-apiVersion: serving.knative.dev/v1
-kind: Service
-metadata:
-  name: podspeed
-spec:
-  template:
-    metadata:
-      annotations:
-        autoscaling.knative.dev/minScale: "1"
-    spec:
-      containers:
-      - image: ko://knative.dev/serving/test/test_images/helloworld
-EOF
-
-kubectl wait ksvc/podspeed --for=condition=Ready
-
-template=$(mktemp)
-kubectl get pods -lserving.knative.dev/service=podspeed -ojson | jq '.items[0]' > "$template"
-
-run_go_tool github.com/markusthoemmes/podspeed/cmd/podspeed@358209f podspeed --prepull -pods 100 -template "$template" > "${ARTIFACTS}/pod-bringup-performance.txt"
-cat "${ARTIFACTS}/pod-bringup-performance.txt"
-
-kubectl delete ksvc podspeed
-
 success