Repository: knative-sandbox/net-kourier
Pull request #635 (2021-09-09 01:56:32)

[main] Upgrade to latest dependencies
Cron -knative-prow-robot

/cc knative-sandbox/networking-wg-leads
/assign knative-sandbox/networking-wg-leads

Produced by: knative-sandbox/knobots/actions/update-deps

Details:
```
bumping knative.dev/pkg 71508fc...9a4b612:
  > 9a4b612 Added invalid value field error with details (# 2246)
  > d9b35c4 Delete deprecated ObserveFinalizeKind API (# 2248)
```

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

This pull-request has been approved by: *<a href="https://github.com/knative-sandbox/net-kourier/pull/635#" title="Author self-approved">knative-automation</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **zhiminxiang** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @zhiminxiang` in a comment when ready.

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

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

- **[OWNERS](https://github.com/knative-sandbox/net-kourier/blob/main/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["zhiminxiang"]} -->
codecov[bot]: # [Codecov](https://codecov.io/gh/knative-sandbox/net-kourier/pull/635?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox) Report
> Merging [#635](https://codecov.io/gh/knative-sandbox/net-kourier/pull/635?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox) (549978b) into [main](https://codecov.io/gh/knative-sandbox/net-kourier/commit/70a31e3eceed87c44a697ebf23cd9938b74aa74f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox) (70a31e3) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/knative-sandbox/net-kourier/pull/635/graphs/tree.svg?width=650&height=150&src=pr&token=KmlRo23zX4&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox)](https://codecov.io/gh/knative-sandbox/net-kourier/pull/635?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox)

```diff
@@           Coverage Diff           @@
##             main     #635   +/-   ##
=======================================
  Coverage   70.36%   70.36%           
=======================================
  Files          18       18           
  Lines         658      658           
=======================================
  Hits          463      463           
  Misses        170      170           
  Partials       25       25           
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/knative-sandbox/net-kourier/pull/635?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/knative-sandbox/net-kourier/pull/635?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox). Last update [70a31e3...549978b](https://codecov.io/gh/knative-sandbox/net-kourier/pull/635?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox).


Patch:
diff --git a/go.mod b/go.mod
index ff0b940b..d14a79c4 100644
--- a/go.mod
+++ b/go.mod
@@ -19,5 +19,5 @@ require (
 	k8s.io/code-generator v0.21.4
 	knative.dev/hack v0.0.0-20210806075220-815cd312d65c
 	knative.dev/networking v0.0.0-20210908132645-c94e114d7fed
-	knative.dev/pkg v0.0.0-20210908025933-71508fc69a57
+	knative.dev/pkg v0.0.0-20210908202858-9a4b6128207c
 )
diff --git a/go.sum b/go.sum
index 0663be02..719cf72a 100644
--- a/go.sum
+++ b/go.sum
@@ -972,8 +972,9 @@ knative.dev/hack v0.0.0-20210806075220-815cd312d65c h1:nOXoDWAAItwr4o0dp3nHr6skg
 knative.dev/hack v0.0.0-20210806075220-815cd312d65c/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
 knative.dev/networking v0.0.0-20210908132645-c94e114d7fed h1:IZmI7EuEygjiwFj6k4cNTkSbi28X8ptdPWgBb5c5ODY=
 knative.dev/networking v0.0.0-20210908132645-c94e114d7fed/go.mod h1:oUCqQ8k7dZk6Hd8+DEfxSvJku8OCdRu4+m4ljAOuTe8=
-knative.dev/pkg v0.0.0-20210908025933-71508fc69a57 h1:du+do3to2zboxuk0Uj8Xvf2onOxthyaBSr98+hVB7z4=
 knative.dev/pkg v0.0.0-20210908025933-71508fc69a57/go.mod h1:jMSqkNMsrzuy+XR4Yr/BMy7SDVbUOl3KKB6+5MR+ZU8=
+knative.dev/pkg v0.0.0-20210908202858-9a4b6128207c h1:Em+aGSEisMG9my6i+arqz5GU+f9GPdbPndtyBIAlOns=
+knative.dev/pkg v0.0.0-20210908202858-9a4b6128207c/go.mod h1:jMSqkNMsrzuy+XR4Yr/BMy7SDVbUOl3KKB6+5MR+ZU8=
 pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
diff --git a/pkg/envoy/api/http_connection_manager.go b/pkg/envoy/api/http_connection_manager.go
index 002e43bf..d574b02a 100644
--- a/pkg/envoy/api/http_connection_manager.go
+++ b/pkg/envoy/api/http_connection_manager.go
@@ -28,6 +28,7 @@ import (
 	"github.com/envoyproxy/go-control-plane/pkg/wellknown"
 	"google.golang.org/protobuf/types/known/anypb"
 	"google.golang.org/protobuf/types/known/durationpb"
+	"google.golang.org/protobuf/types/known/wrapperspb"
 
 	"knative.dev/net-kourier/pkg/config"
 )
@@ -86,5 +87,10 @@ func NewRouteConfig(name string, virtualHosts []*route.VirtualHost) *route.Route
 	return &route.RouteConfiguration{
 		Name:         name,
 		VirtualHosts: virtualHosts,
+		// Without this validation we can generate routes that point to non-existing clusters
+		// That causes some "no_cluster" errors in Envoy and the "TestUpdate"
+		// in the Knative serving test suite fails sometimes.
+		// Ref: https://github.com/knative/serving/blob/f6da03e5dfed78593c4f239c3c7d67c5d7c55267/test/conformance/ingress/update_test.go#L37
+		ValidateClusters: wrapperspb.Bool(true),
 	}
 }
diff --git a/pkg/generator/caches.go b/pkg/generator/caches.go
index 40a9e2b8..924465e6 100644
--- a/pkg/generator/caches.go
+++ b/pkg/generator/caches.go
@@ -28,7 +28,6 @@ import (
 	cachetypes "github.com/envoyproxy/go-control-plane/pkg/cache/types"
 	cache "github.com/envoyproxy/go-control-plane/pkg/cache/v3"
 	"github.com/google/uuid"
-	"google.golang.org/protobuf/types/known/wrapperspb"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/types"
 	"k8s.io/apimachinery/pkg/util/sets"
@@ -219,14 +218,6 @@ func generateListenersAndRouteConfigs(
 	externalTLSRouteConfig := envoy.NewRouteConfig(externalTLSRouteConfigName, externalTLSVirtualHosts)
 	internalRouteConfig := envoy.NewRouteConfig(internalRouteConfigName, clusterLocalVirtualHosts)
 
-	// Without this we can generate routes that point to non-existing clusters
-	// That causes some "no_cluster" errors in Envoy and the "TestUpdate"
-	// in the Knative serving test suite fails sometimes.
-	// Ref: https://github.com/knative/serving/blob/f6da03e5dfed78593c4f239c3c7d67c5d7c55267/test/conformance/ingress/update_test.go#L37
-	externalRouteConfig.ValidateClusters = wrapperspb.Bool(true)
-	externalTLSRouteConfig.ValidateClusters = wrapperspb.Bool(true)
-	internalRouteConfig.ValidateClusters = wrapperspb.Bool(true)
-
 	// Now we setup connection managers, that reference the routeconfigs via RDS.
 	externalManager := envoy.NewHTTPConnectionManager(externalRouteConfig.Name, cfg.Kourier.EnableServiceAccessLogging)
 	externalTLSManager := envoy.NewHTTPConnectionManager(externalTLSRouteConfig.Name, cfg.Kourier.EnableServiceAccessLogging)
diff --git a/vendor/knative.dev/pkg/apis/field_error.go b/vendor/knative.dev/pkg/apis/field_error.go
index 4a524285..5ea51c0e 100644
--- a/vendor/knative.dev/pkg/apis/field_error.go
+++ b/vendor/knative.dev/pkg/apis/field_error.go
@@ -323,12 +323,13 @@ func ErrInvalidArrayValue(value interface{}, field string, index int) *FieldErro
 	return ErrInvalidValue(value, CurrentField).ViaFieldIndex(field, index)
 }
 
-// ErrInvalidValue constructs a FieldError for a field that has received an
-// invalid value.
-func ErrInvalidValue(value interface{}, fieldPath string) *FieldError {
+// ErrInvalidValue is a variadic helper method for constructing a FieldError
+// for a field that has received an invalid value.
+func ErrInvalidValue(value interface{}, fieldPath string, details ...string) *FieldError {
 	return &FieldError{
 		Message: fmt.Sprint("invalid value: ", value),
 		Paths:   []string{fieldPath},
+		Details: strings.Join(details, ", "),
 	}
 }
 
diff --git a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_reconciler.go b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_reconciler.go
index 1781a60e..96e1edc2 100644
--- a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_reconciler.go
+++ b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_reconciler.go
@@ -206,10 +206,6 @@ func (g *reconcilerReconcilerGenerator) GenerateType(c *generator.Context, t *ty
 			Package: "knative.dev/pkg/reconciler",
 			Name:    "DoFinalizeKind",
 		}),
-		"doObserveFinalizeKind": c.Universe.Type(types.Name{
-			Package: "knative.dev/pkg/reconciler",
-			Name:    "DoObserveFinalizeKind",
-		}),
 		"controllerIsSkipKey": c.Universe.Function(types.Name{
 			Package: "knative.dev/pkg/controller",
 			Name:    "IsSkipKey",
@@ -264,20 +260,6 @@ type ReadOnlyInterface interface {
 	ObserveKind(ctx {{.contextContext|raw}}, o *{{.type|raw}}) {{.reconcilerEvent|raw}}
 }
 
-// ReadOnlyFinalizer defines the strongly typed interfaces to be implemented by a
-// controller finalizing {{.type|raw}} if they want to process tombstoned resources
-// even when they are not the leader.  Due to the nature of how finalizers are handled
-// there are no guarantees that this will be called.
-//
-// Deprecated: Use reconciler.OnDeletionInterface instead.
-type ReadOnlyFinalizer interface {
-	// ObserveFinalizeKind implements custom logic to observe the final state of {{.type|raw}}.
-	// This method should not write to the API.
-	//
-	// Deprecated: Use reconciler.ObserveDeletion instead.
-	ObserveFinalizeKind(ctx {{.contextContext|raw}}, o *{{.type|raw}}) {{.reconcilerEvent|raw}}
-}
-
 type doReconcile func(ctx {{.contextContext|raw}}, o *{{.type|raw}}) {{.reconcilerEvent|raw}}
 
 // reconcilerImpl implements controller.Reconciler for {{.type|raw}} resources.
@@ -483,10 +465,6 @@ func (r *reconcilerImpl) Reconcile(ctx {{.contextContext|raw}}, key string) erro
 			return {{.fmtErrorf|raw}}("failed to clear finalizers: %w", err)
 		}
 
-	case {{.doObserveKind|raw}}, {{.doObserveFinalizeKind|raw}}:
-		// Observe any changes to this resource, since we are not the leader.
-		reconcileEvent = do(ctx, resource)
-
 	}
 
 	{{if .hasStatus}}
diff --git a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_state.go b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_state.go
index db8334b4..9ef36250 100644
--- a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_state.go
+++ b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_state.go
@@ -84,10 +84,6 @@ func (g *reconcilerStateGenerator) GenerateType(c *generator.Context, t *types.T
 			Package: "knative.dev/pkg/reconciler",
 			Name:    "DoFinalizeKind",
 		}),
-		"doObserveFinalizeKind": c.Universe.Type(types.Name{
-			Package: "knative.dev/pkg/reconciler",
-			Name:    "DoObserveFinalizeKind",
-		}),
 	}
 
 	sw.Do(reconcilerStateType, m)
@@ -111,10 +107,6 @@ type state struct {
 	roi ReadOnlyInterface
 	// isROI (Read Only Interface) the reconciler only observes reconciliation.
 	isROI bool
-	// rof is the read only finalizer cast of the reconciler.
-	rof ReadOnlyFinalizer
-	// isROF (Read Only Finalizer) the reconciler only observes finalize.
-	isROF bool
 	// isLeader the instance of the reconciler is the elected leader.
 	isLeader bool
 }
@@ -127,7 +119,6 @@ func newState(key string, r *reconcilerImpl) (*state, error) {
 	}
 
 	roi, isROI := r.reconciler.(ReadOnlyInterface)
-	rof, isROF := r.reconciler.(ReadOnlyFinalizer)
 
 	isLeader := r.IsLeaderFor({{.typesNamespacedName|raw}}{
 		Namespace: namespace,
@@ -141,8 +132,6 @@ func newState(key string, r *reconcilerImpl) (*state, error) {
 		reconciler: r.reconciler,
 		roi:        roi,
 		isROI:      isROI,
-		rof:        rof,
-		isROF:      isROF,
 		isLeader:   isLeader,
 	}, nil
 }
@@ -154,8 +143,8 @@ var reconcilerStateMethods = `
 // isNotLeaderNorObserver returns true when there is no work possible for the
 // reconciler.
 func (s *state) isNotLeaderNorObserver() bool {
-	if !s.isLeader && !s.isROI && !s.isROF {
-		// If we are not the leader, and we don't implement either ReadOnly
+	if !s.isLeader && !s.isROI {
+		// If we are not the leader, and we don't implement the ReadOnly
 		// interface, then take a fast-path out.
 		return true
 	}
@@ -171,8 +160,6 @@ func (s *state) reconcileMethodFor(o *{{.type|raw}}) (string, doReconcile) {
 		}
 	} else if fin, ok := s.reconciler.(Finalizer); s.isLeader && ok {
 		return {{.doFinalizeKind|raw}}, fin.FinalizeKind
-	} else if !s.isLeader && s.isROF {
-		return {{.doObserveFinalizeKind|raw}}, s.rof.ObserveFinalizeKind
 	}
 	return "unknown", nil
 }
diff --git a/vendor/knative.dev/pkg/reconciler/reconcile_common.go b/vendor/knative.dev/pkg/reconciler/reconcile_common.go
index 114d53b0..34d56b2f 100644
--- a/vendor/knative.dev/pkg/reconciler/reconcile_common.go
+++ b/vendor/knative.dev/pkg/reconciler/reconcile_common.go
@@ -38,6 +38,8 @@ const (
 	// DoObserveKind is the function name for observing the resource (as a non leader).
 	DoObserveKind = "ObserveKind"
 	// DoObserveFinalizeKind is the function name for observing finalization of the resource (as a non leader).
+	//
+	// Deprecated: This will be deleted soon.
 	DoObserveFinalizeKind = "ObserveFinalizeKind"
 )
 
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 953d8566..b802d509 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -862,7 +862,7 @@ knative.dev/networking/test/test_images/runtime/handlers
 knative.dev/networking/test/test_images/timeout
 knative.dev/networking/test/test_images/wsserver
 knative.dev/networking/test/types
-# knative.dev/pkg v0.0.0-20210908025933-71508fc69a57
+# knative.dev/pkg v0.0.0-20210908202858-9a4b6128207c
 ## explicit
 knative.dev/pkg/apis
 knative.dev/pkg/apis/duck


Test patch:
diff --git a/pkg/envoy/api/http_connection_manager_test.go b/pkg/envoy/api/http_connection_manager_test.go
index e5b6dbae..086107a2 100644
--- a/pkg/envoy/api/http_connection_manager_test.go
+++ b/pkg/envoy/api/http_connection_manager_test.go
@@ -25,6 +25,7 @@ import (
 	"google.golang.org/protobuf/proto"
 	"google.golang.org/protobuf/testing/protocmp"
 	"google.golang.org/protobuf/types/known/anypb"
+	"google.golang.org/protobuf/types/known/wrapperspb"
 	"gotest.tools/v3/assert"
 )
 
@@ -55,8 +56,9 @@ func TestNewRouteConfig(t *testing.T) {
 
 	got := NewRouteConfig("test", []*route.VirtualHost{vhost})
 	want := &route.RouteConfiguration{
-		Name:         "test",
-		VirtualHosts: []*route.VirtualHost{vhost},
+		Name:             "test",
+		VirtualHosts:     []*route.VirtualHost{vhost},
+		ValidateClusters: wrapperspb.Bool(true),
 	}
 
 	assert.DeepEqual(t, got, want, protocmp.Transform())