Repository: knative/serving
Pull request #9324 (2020-09-07 20:06:08)

Fix the build after update
networking has stuff that is no longer backwards compatible

/assign mattmoor @nak3 @tcnghia 

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

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

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

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

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

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

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/go.mod b/go.mod
index d7bde674f..550f49772 100644
--- a/go.mod
+++ b/go.mod
@@ -32,9 +32,9 @@ require (
 	k8s.io/code-generator v0.18.6
 	k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29
 	knative.dev/caching v0.0.0-20200903155132-15c804a0eff7
-	knative.dev/networking v0.0.0-20200903151532-591b4f462233
-	knative.dev/pkg v0.0.0-20200904035731-2fee224e95fb
-	knative.dev/test-infra v0.0.0-20200903224831-db6c5b50714c
+	knative.dev/networking v0.0.0-20200906233632-d51e1796d270
+	knative.dev/pkg v0.0.0-20200907175532-3ff7bcc42259
+	knative.dev/test-infra v0.0.0-20200905234932-1d8a4814fd68
 )
 
 replace (
diff --git a/go.sum b/go.sum
index 8d4cc2375..9dc1d0e68 100644
--- a/go.sum
+++ b/go.sum
@@ -1801,8 +1801,8 @@ knative.dev/caching v0.0.0-20200903155132-15c804a0eff7 h1:tSn7+fEFvn0e8Mcs2hoHgz
 knative.dev/caching v0.0.0-20200903155132-15c804a0eff7/go.mod h1:5V2/0AagUm0RX4CsCDOY9FwLRnnF2c5IaaA+kqXbqAc=
 knative.dev/eventing-contrib v0.6.1-0.20190723221543-5ce18048c08b/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
 knative.dev/eventing-contrib v0.11.2/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
-knative.dev/networking v0.0.0-20200903151532-591b4f462233 h1:mG6pKva0EDq+SDhFKywl77bCN0kyymR3TZ9Nl7hNpMI=
-knative.dev/networking v0.0.0-20200903151532-591b4f462233/go.mod h1:XWL/3cPOuat95etJ12t0MfsVAxwRVQNkKUa+U2WrSaA=
+knative.dev/networking v0.0.0-20200906233632-d51e1796d270 h1:G4fR1A22ddZO/TyEMiHyNkgl5wubJsVxdhnvY0emO+w=
+knative.dev/networking v0.0.0-20200906233632-d51e1796d270/go.mod h1:XWL/3cPOuat95etJ12t0MfsVAxwRVQNkKUa+U2WrSaA=
 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=
 knative.dev/pkg v0.0.0-20200207155214-fef852970f43/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
@@ -1815,8 +1815,8 @@ knative.dev/pkg v0.0.0-20200831094608-e9da10bc8a18 h1:BJTbbN0/J0BY76tzHE6/oko4lw
 knative.dev/pkg v0.0.0-20200831094608-e9da10bc8a18/go.mod h1:vOVUMtkIWK+hq1+KwlLYBSYVjz5SNIP1vMj3/5SNGZw=
 knative.dev/pkg v0.0.0-20200901225315-2ee0e988033c h1:UHXZjWBNozXgKsLP9fvOBsjHQSFC0MOxTpIiA+5YHV4=
 knative.dev/pkg v0.0.0-20200901225315-2ee0e988033c/go.mod h1:q+4+Cm768P6vsAvsD9J+cZ1hoy4aHyHSfRTvaFyPd3g=
-knative.dev/pkg v0.0.0-20200904035731-2fee224e95fb h1:kMM0ZAiGvxQj18qB9McGxYY0na1n4vd+o7zad2lmEGE=
-knative.dev/pkg v0.0.0-20200904035731-2fee224e95fb/go.mod h1:q+4+Cm768P6vsAvsD9J+cZ1hoy4aHyHSfRTvaFyPd3g=
+knative.dev/pkg v0.0.0-20200907175532-3ff7bcc42259 h1:qNeVGACTmFe+6t4IrQnZTzfhaty0HTQz1BwW7m1M9TQ=
+knative.dev/pkg v0.0.0-20200907175532-3ff7bcc42259/go.mod h1:q+4+Cm768P6vsAvsD9J+cZ1hoy4aHyHSfRTvaFyPd3g=
 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/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE=
@@ -1828,8 +1828,8 @@ knative.dev/test-infra v0.0.0-20200828211307-9d4372c9b1c7 h1:yIzao6i9Hu51SCdpyqB
 knative.dev/test-infra v0.0.0-20200828211307-9d4372c9b1c7/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc=
 knative.dev/test-infra v0.0.0-20200831235415-fac473dda98b h1:jafH61XDC6EkogEyR70h/sjYLx2Nf3qKVzPP2MCqEQ4=
 knative.dev/test-infra v0.0.0-20200831235415-fac473dda98b/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc=
-knative.dev/test-infra v0.0.0-20200903224831-db6c5b50714c h1:XbBzGPxI6MmZ2xyS11ejJdmHfJuYjOufUGPjojK35fc=
-knative.dev/test-infra v0.0.0-20200903224831-db6c5b50714c/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc=
+knative.dev/test-infra v0.0.0-20200905234932-1d8a4814fd68 h1:LAnw774lO1Cg9NOef/9X1xacmmiV366HVIIk5FQypNg=
+knative.dev/test-infra v0.0.0-20200905234932-1d8a4814fd68/go.mod h1:Pmg2c7Z7q7BGFUV/GOpU5BlrD3ePJft4MPqx8AYBplc=
 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/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_lifecycle.go b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_lifecycle.go
index b3028831c..1db93318d 100644
--- a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_lifecycle.go
+++ b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_lifecycle.go
@@ -46,6 +46,9 @@ func (is *IngressStatus) GetCondition(t apis.ConditionType) *apis.Condition {
 // InitializeConditions initializes conditions of an IngressStatus
 func (is *IngressStatus) InitializeConditions() {
 	ingressCondSet.Manage(is).InitializeConditions()
+
+	// Deprecatd, do not set.
+	is.DeprecatedLoadBalancer = nil
 }
 
 // MarkNetworkConfigured set IngressConditionNetworkConfigured in IngressStatus as true
@@ -62,8 +65,7 @@ func (is *IngressStatus) MarkResourceNotOwned(kind, name string) {
 
 // MarkLoadBalancerReady marks the Ingress with IngressConditionLoadBalancerReady,
 // and also populate the address of the load balancer.
-func (is *IngressStatus) MarkLoadBalancerReady(lbs []LoadBalancerIngressStatus, publicLbs []LoadBalancerIngressStatus, privateLbs []LoadBalancerIngressStatus) {
-	is.LoadBalancer = &LoadBalancerStatus{Ingress: lbs}
+func (is *IngressStatus) MarkLoadBalancerReady(publicLbs []LoadBalancerIngressStatus, privateLbs []LoadBalancerIngressStatus) {
 	is.PublicLoadBalancer = &LoadBalancerStatus{Ingress: publicLbs}
 	is.PrivateLoadBalancer = &LoadBalancerStatus{Ingress: privateLbs}
 
diff --git a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_types.go b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_types.go
index 1ecf2371a..5af64e36a 100644
--- a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_types.go
+++ b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_types.go
@@ -301,10 +301,10 @@ type HTTPRetry struct {
 type IngressStatus struct {
 	duckv1.Status `json:",inline"`
 
-	// LoadBalancer contains the current status of the load-balancer.
-	// This is to be superseded by the combination of `PublicLoadBalancer` and `PrivateLoadBalancer`
+	// DeprecatedLoadBalancer contains the current status of the load-balancer.
+	// DEPRECATED: Use `PublicLoadBalancer` and `PrivateLoadBalancer` instead.
 	// +optional
-	LoadBalancer *LoadBalancerStatus `json:"loadBalancer,omitempty"`
+	DeprecatedLoadBalancer *LoadBalancerStatus `json:"loadBalancer,omitempty"`
 
 	// PublicLoadBalancer contains the current status of the load-balancer.
 	// +optional
diff --git a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/zz_generated.deepcopy.go b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/zz_generated.deepcopy.go
index fe63a28f4..1483c9b92 100644
--- a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/zz_generated.deepcopy.go
+++ b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/zz_generated.deepcopy.go
@@ -547,8 +547,8 @@ func (in *IngressSpec) DeepCopy() *IngressSpec {
 func (in *IngressStatus) DeepCopyInto(out *IngressStatus) {
 	*out = *in
 	in.Status.DeepCopyInto(&out.Status)
-	if in.LoadBalancer != nil {
-		in, out := &in.LoadBalancer, &out.LoadBalancer
+	if in.DeprecatedLoadBalancer != nil {
+		in, out := &in.DeprecatedLoadBalancer, &out.DeprecatedLoadBalancer
 		*out = new(LoadBalancerStatus)
 		(*in).DeepCopyInto(*out)
 	}
diff --git a/vendor/knative.dev/pkg/webhook/resourcesemantics/conversion/conversion.go b/vendor/knative.dev/pkg/webhook/resourcesemantics/conversion/conversion.go
index 5fa7beb9f..ddc4681e3 100644
--- a/vendor/knative.dev/pkg/webhook/resourcesemantics/conversion/conversion.go
+++ b/vendor/knative.dev/pkg/webhook/resourcesemantics/conversion/conversion.go
@@ -130,7 +130,6 @@ func (r *reconciler) convert(
 	} else {
 		logger.Infof("Could not get Accessor for %s: %v", formatGK(inGVK.GroupKind()), err)
 	}
-	logger.Infof("Converting %s to version %s", formatGVK(inGVK), targetVersion)
 	ctx = logging.WithLogger(ctx, logger)
 
 	if inGVK.Version == conv.HubVersion {
diff --git a/vendor/modules.txt b/vendor/modules.txt
index b60a464fc..5d0aed016 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1061,7 +1061,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/networking v0.0.0-20200903151532-591b4f462233
+# knative.dev/networking v0.0.0-20200906233632-d51e1796d270
 ## explicit
 knative.dev/networking/pkg
 knative.dev/networking/pkg/apis/networking
@@ -1088,7 +1088,7 @@ knative.dev/networking/pkg/client/injection/informers/networking/v1alpha1/server
 knative.dev/networking/pkg/client/injection/reconciler/networking/v1alpha1/serverlessservice
 knative.dev/networking/pkg/client/listers/networking/v1alpha1
 knative.dev/networking/pkg/ingress
-# knative.dev/pkg v0.0.0-20200904035731-2fee224e95fb
+# knative.dev/pkg v0.0.0-20200907175532-3ff7bcc42259
 ## explicit
 knative.dev/pkg/apiextensions/storageversion
 knative.dev/pkg/apiextensions/storageversion/cmd/migrate
@@ -1214,7 +1214,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-20200903224831-db6c5b50714c
+# knative.dev/test-infra v0.0.0-20200905234932-1d8a4814fd68
 ## explicit
 knative.dev/test-infra/scripts
 # sigs.k8s.io/yaml v1.2.0


Test patch:
diff --git a/pkg/reconciler/route/resources/service_test.go b/pkg/reconciler/route/resources/service_test.go
index b67c8e6b2..d5dae58a0 100644
--- a/pkg/reconciler/route/resources/service_test.go
+++ b/pkg/reconciler/route/resources/service_test.go
@@ -79,7 +79,7 @@ func TestNewMakeK8SService(t *testing.T) {
 		route: r,
 		ingress: &netv1alpha1.Ingress{
 			Status: netv1alpha1.IngressStatus{
-				LoadBalancer: &netv1alpha1.LoadBalancerStatus{
+				DeprecatedLoadBalancer: &netv1alpha1.LoadBalancerStatus{
 					Ingress: []netv1alpha1.LoadBalancerIngressStatus{{}},
 				},
 				PublicLoadBalancer: &netv1alpha1.LoadBalancerStatus{
@@ -97,7 +97,7 @@ func TestNewMakeK8SService(t *testing.T) {
 		route: r,
 		ingress: &netv1alpha1.Ingress{
 			Status: netv1alpha1.IngressStatus{
-				LoadBalancer: &netv1alpha1.LoadBalancerStatus{
+				DeprecatedLoadBalancer: &netv1alpha1.LoadBalancerStatus{
 					Ingress: []netv1alpha1.LoadBalancerIngressStatus{{
 						Domain: "domain.com",
 					}, {
@@ -127,7 +127,7 @@ func TestNewMakeK8SService(t *testing.T) {
 		route: r,
 		ingress: &netv1alpha1.Ingress{
 			Status: netv1alpha1.IngressStatus{
-				LoadBalancer: &netv1alpha1.LoadBalancerStatus{
+				DeprecatedLoadBalancer: &netv1alpha1.LoadBalancerStatus{
 					Ingress: []netv1alpha1.LoadBalancerIngressStatus{{Domain: "domain.com"}},
 				},
 				PublicLoadBalancer: &netv1alpha1.LoadBalancerStatus{
@@ -153,7 +153,7 @@ func TestNewMakeK8SService(t *testing.T) {
 		route: r,
 		ingress: &netv1alpha1.Ingress{
 			Status: netv1alpha1.IngressStatus{
-				LoadBalancer: &netv1alpha1.LoadBalancerStatus{
+				DeprecatedLoadBalancer: &netv1alpha1.LoadBalancerStatus{
 					Ingress: []netv1alpha1.LoadBalancerIngressStatus{{DomainInternal: "istio-ingressgateway.istio-system.svc.cluster.local"}},
 				},
 				PublicLoadBalancer: &netv1alpha1.LoadBalancerStatus{
@@ -180,7 +180,7 @@ func TestNewMakeK8SService(t *testing.T) {
 		route: r,
 		ingress: &netv1alpha1.Ingress{
 			Status: netv1alpha1.IngressStatus{
-				LoadBalancer: &netv1alpha1.LoadBalancerStatus{
+				DeprecatedLoadBalancer: &netv1alpha1.LoadBalancerStatus{
 					Ingress: []netv1alpha1.LoadBalancerIngressStatus{{MeshOnly: true}},
 				},
 				PublicLoadBalancer: &netv1alpha1.LoadBalancerStatus{
@@ -205,7 +205,7 @@ func TestNewMakeK8SService(t *testing.T) {
 		targetName: "my-target-name",
 		ingress: &netv1alpha1.Ingress{
 			Status: netv1alpha1.IngressStatus{
-				LoadBalancer: &netv1alpha1.LoadBalancerStatus{
+				DeprecatedLoadBalancer: &netv1alpha1.LoadBalancerStatus{
 					Ingress: []netv1alpha1.LoadBalancerIngressStatus{{MeshOnly: true}},
 				},
 				PublicLoadBalancer: &netv1alpha1.LoadBalancerStatus{
diff --git a/pkg/reconciler/route/route_test.go b/pkg/reconciler/route/route_test.go
index 2cf00ff3b..18df13088 100644
--- a/pkg/reconciler/route/route_test.go
+++ b/pkg/reconciler/route/route_test.go
@@ -267,7 +267,7 @@ func TestCreateRouteForOneReserveRevision(t *testing.T) {
 
 	// Update ingress loadbalancer to trigger placeholder service creation.
 	ci.Status = v1alpha1.IngressStatus{
-		LoadBalancer: &v1alpha1.LoadBalancerStatus{
+		DeprecatedLoadBalancer: &v1alpha1.LoadBalancerStatus{
 			Ingress: []v1alpha1.LoadBalancerIngressStatus{{
 				DomainInternal: "test-domain",
 			}},
diff --git a/pkg/reconciler/route/table_test.go b/pkg/reconciler/route/table_test.go
index bdeac6d65..da30ab23d 100644
--- a/pkg/reconciler/route/table_test.go
+++ b/pkg/reconciler/route/table_test.go
@@ -2699,15 +2699,12 @@ func readyIngressStatus() netv1alpha1.IngressStatus {
 	status.InitializeConditions()
 	status.MarkNetworkConfigured()
 	status.MarkLoadBalancerReady(
-		[]netv1alpha1.LoadBalancerIngressStatus{
-			{DomainInternal: pkgnet.GetServiceHostname("istio-ingressgateway", "istio-system")},
-		},
-		[]netv1alpha1.LoadBalancerIngressStatus{
-			{DomainInternal: pkgnet.GetServiceHostname("istio-ingressgateway", "istio-system")},
-		},
-		[]netv1alpha1.LoadBalancerIngressStatus{
-			{DomainInternal: pkgnet.GetServiceHostname("private-istio-ingressgateway", "istio-system")},
-		},
+		[]netv1alpha1.LoadBalancerIngressStatus{{
+			DomainInternal: pkgnet.GetServiceHostname("istio-ingressgateway", "istio-system"),
+		}},
+		[]netv1alpha1.LoadBalancerIngressStatus{{
+			DomainInternal: pkgnet.GetServiceHostname("private-istio-ingressgateway", "istio-system"),
+		}},
 	)
 
 	return status
@@ -2722,7 +2719,7 @@ func ingressWithStatus(r *v1.Route, tc *traffic.Config, status netv1alpha1.Ingre
 }
 
 func mutateIngress(ci *netv1alpha1.Ingress) *netv1alpha1.Ingress {
-	// Thor's Hammer
+	// Thor's Hammer.
 	ci.Spec = netv1alpha1.IngressSpec{}
 	return ci
 }