Repository: knative-sandbox/eventing-kafka-broker
Pull request #2388 (2022-07-06 23:34:25)

[Consumer] Updates for feature flag config map watching
Signed-off-by: aavarghese <avarghese@us.ibm.com>

Feature flag updates in Config Map were not being reflected in Consumer reconciler and Dispatcher Verticles. This change fixes that.


aavarghese: /cc @pierDipi 
knative-prow[bot]: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative-sandbox/eventing-kafka-broker/pull/2388#" title="Author self-approved">aavarghese</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **n3wscott** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @n3wscott` 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%2Feventing-kafka-broker).

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

- **[OWNERS](https://github.com/knative-sandbox/eventing-kafka-broker/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":["n3wscott"]} -->
codecov[bot]: # [Codecov](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox) Report
> Merging [#2388](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox) (99827ec) into [main](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/commit/a3713af6b539b71305e0b73e3a96d729b7035566?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox) (a3713af) will **decrease** coverage by `5.37%`.
> The diff coverage is `100.00%`.

```diff
@@             Coverage Diff              @@
##               main    #2388      +/-   ##
============================================
- Coverage     65.38%   60.01%   -5.38%     
============================================
  Files           140       69      -71     
  Lines          9312     6955    -2357     
  Branches        211        0     -211     
============================================
- Hits           6089     4174    -1915     
+ Misses         2809     2486     -323     
+ Partials        414      295     -119     
```

| Flag | Coverage Δ | |
|---|---|---|
| java-unittests | `?` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox) | Coverage Δ | |
|---|---|---|
| [...ontrol-plane/pkg/reconciler/consumer/controller.go](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox#diff-Y29udHJvbC1wbGFuZS9wa2cvcmVjb25jaWxlci9jb25zdW1lci9jb250cm9sbGVyLmdv) | `88.37% <100.00%> (+10.32%)` | :arrow_up: |
| [...atcher/impl/filter/subscriptionsapi/NotFilter.java](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox#diff-ZGF0YS1wbGFuZS9kaXNwYXRjaGVyL3NyYy9tYWluL2phdmEvZGV2L2tuYXRpdmUvZXZlbnRpbmcva2Fma2EvYnJva2VyL2Rpc3BhdGNoZXIvaW1wbC9maWx0ZXIvc3Vic2NyaXB0aW9uc2FwaS9Ob3RGaWx0ZXIuamF2YQ==) | | |
| [...dispatcher/impl/ResponseToHttpEndpointHandler.java](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox#diff-ZGF0YS1wbGFuZS9kaXNwYXRjaGVyL3NyYy9tYWluL2phdmEvZGV2L2tuYXRpdmUvZXZlbnRpbmcva2Fma2EvYnJva2VyL2Rpc3BhdGNoZXIvaW1wbC9SZXNwb25zZVRvSHR0cEVuZHBvaW50SGFuZGxlci5qYXZh) | | |
| [...patcher/impl/consumer/OrderedConsumerVerticle.java](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox#diff-ZGF0YS1wbGFuZS9kaXNwYXRjaGVyL3NyYy9tYWluL2phdmEvZGV2L2tuYXRpdmUvZXZlbnRpbmcva2Fma2EvYnJva2VyL2Rpc3BhdGNoZXIvaW1wbC9jb25zdW1lci9PcmRlcmVkQ29uc3VtZXJWZXJ0aWNsZS5qYXZh) | | |
| [...fka/broker/core/security/PlaintextCredentials.java](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox#diff-ZGF0YS1wbGFuZS9jb3JlL3NyYy9tYWluL2phdmEvZGV2L2tuYXRpdmUvZXZlbnRpbmcva2Fma2EvYnJva2VyL2NvcmUvc2VjdXJpdHkvUGxhaW50ZXh0Q3JlZGVudGlhbHMuamF2YQ==) | | |
| [...ker/receiver/impl/StrictRequestToRecordMapper.java](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox#diff-ZGF0YS1wbGFuZS9yZWNlaXZlci9zcmMvbWFpbi9qYXZhL2Rldi9rbmF0aXZlL2V2ZW50aW5nL2thZmthL2Jyb2tlci9yZWNlaXZlci9pbXBsL1N0cmljdFJlcXVlc3RUb1JlY29yZE1hcHBlci5qYXZh) | | |
| [...ting/kafka/broker/dispatcher/CloudEventSender.java](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox#diff-ZGF0YS1wbGFuZS9kaXNwYXRjaGVyL3NyYy9tYWluL2phdmEvZGV2L2tuYXRpdmUvZXZlbnRpbmcva2Fma2EvYnJva2VyL2Rpc3BhdGNoZXIvQ2xvdWRFdmVudFNlbmRlci5qYXZh) | | |
| [...fka/broker/core/security/CredentialsValidator.java](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox#diff-ZGF0YS1wbGFuZS9jb3JlL3NyYy9tYWluL2phdmEvZGV2L2tuYXRpdmUvZXZlbnRpbmcva2Fma2EvYnJva2VyL2NvcmUvc2VjdXJpdHkvQ3JlZGVudGlhbHNWYWxpZGF0b3IuamF2YQ==) | | |
| [...ve/eventing/kafka/broker/core/metrics/Metrics.java](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox#diff-ZGF0YS1wbGFuZS9jb3JlL3NyYy9tYWluL2phdmEvZGV2L2tuYXRpdmUvZXZlbnRpbmcva2Fma2EvYnJva2VyL2NvcmUvbWV0cmljcy9NZXRyaWNzLmphdmE=) | | |
| [...dispatcher/impl/consumer/BaseConsumerVerticle.java](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox#diff-ZGF0YS1wbGFuZS9kaXNwYXRjaGVyL3NyYy9tYWluL2phdmEvZGV2L2tuYXRpdmUvZXZlbnRpbmcva2Fma2EvYnJva2VyL2Rpc3BhdGNoZXIvaW1wbC9jb25zdW1lci9CYXNlQ29uc3VtZXJWZXJ0aWNsZS5qYXZh) | | |
| ... and [65 more](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388?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/eventing-kafka-broker/pull/2388?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative-sandbox). Last update [a3713af...99827ec](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/2388?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).

knative-prow[bot]: @aavarghese: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
build-tests_eventing-kafka-broker_main | 99827ec687227b0fa1706f6609c15222bc6d9d51 | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative-sandbox_eventing-kafka-broker/2388/build-tests_eventing-kafka-broker_main/1544827142599086080) | true | `/test build-tests_eventing-kafka-broker_main`

[Your PR dashboard](https://prow.knative.dev/pr).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-prow[bot]: @aavarghese: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
build-tests_eventing-kafka-broker_main | 99827ec687227b0fa1706f6609c15222bc6d9d51 | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative-sandbox_eventing-kafka-broker/2388/build-tests_eventing-kafka-broker_main/1544827142599086080) | true | `/test build-tests_eventing-kafka-broker_main`
integration-tests_eventing-kafka-broker_main | 99827ec687227b0fa1706f6609c15222bc6d9d51 | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative-sandbox_eventing-kafka-broker/2388/integration-tests_eventing-kafka-broker_main/1544827142741692416) | true | `/test integration-tests_eventing-kafka-broker_main`

[Your PR dashboard](https://prow.knative.dev/pr).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-prow[bot]: @aavarghese: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
integration-tests_eventing-kafka-broker_main | 99827ec687227b0fa1706f6609c15222bc6d9d51 | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative-sandbox_eventing-kafka-broker/2388/integration-tests_eventing-kafka-broker_main/1544827142741692416) | true | `/test integration-tests_eventing-kafka-broker_main`
channel-integration-tests-ssl_eventing-kafka-broker_main | b119aa3f5a1e5ef68b546cc5e43e982acbeefe8f | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative-sandbox_eventing-kafka-broker/2388/channel-integration-tests-ssl_eventing-kafka-broker_main/1544850842341871616) | true | `/test channel-integration-tests-ssl_eventing-kafka-broker_main`

[Your PR dashboard](https://prow.knative.dev/pr).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-prow[bot]: @aavarghese: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
channel-integration-tests-ssl_eventing-kafka-broker_main | b119aa3f5a1e5ef68b546cc5e43e982acbeefe8f | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative-sandbox_eventing-kafka-broker/2388/channel-integration-tests-ssl_eventing-kafka-broker_main/1544850842341871616) | true | `/test channel-integration-tests-ssl_eventing-kafka-broker_main`
channel-integration-tests-sasl-ssl_eventing-kafka-broker_main | b119aa3f5a1e5ef68b546cc5e43e982acbeefe8f | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative-sandbox_eventing-kafka-broker/2388/channel-integration-tests-sasl-ssl_eventing-kafka-broker_main/1544850842438340608) | true | `/test channel-integration-tests-sasl-ssl_eventing-kafka-broker_main`

[Your PR dashboard](https://prow.knative.dev/pr).

<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 -->
aavarghese: /retest-required

Patch:
diff --git a/control-plane/cmd/kafka-controller/main.go b/control-plane/cmd/kafka-controller/main.go
index 23ca7d6dc..c9f0d7fa6 100644
--- a/control-plane/cmd/kafka-controller/main.go
+++ b/control-plane/cmd/kafka-controller/main.go
@@ -112,7 +112,7 @@ func main() {
 		injection.NamedControllerConstructor{
 			Name: "consumer-controller",
 			ControllerConstructor: func(ctx context.Context, watcher configmap.Watcher) *controller.Impl {
-				return consumer.NewController(ctx)
+				return consumer.NewController(ctx, watcher)
 			},
 		},
 	)
diff --git a/control-plane/cmd/kafka-source-controller/main.go b/control-plane/cmd/kafka-source-controller/main.go
index 8912d538f..52073cba9 100644
--- a/control-plane/cmd/kafka-source-controller/main.go
+++ b/control-plane/cmd/kafka-source-controller/main.go
@@ -59,7 +59,7 @@ func main() {
 		injection.NamedControllerConstructor{
 			Name: "consumer-controller",
 			ControllerConstructor: func(ctx context.Context, watcher configmap.Watcher) *controller.Impl {
-				return consumer.NewController(ctx)
+				return consumer.NewController(ctx, watcher)
 			},
 		},
 	)
diff --git a/control-plane/pkg/reconciler/consumer/controller.go b/control-plane/pkg/reconciler/consumer/controller.go
index 97ac54f20..bd4fe5759 100644
--- a/control-plane/pkg/reconciler/consumer/controller.go
+++ b/control-plane/pkg/reconciler/consumer/controller.go
@@ -24,6 +24,7 @@ import (
 	kubeclient "knative.dev/pkg/client/injection/kube/client"
 	podinformer "knative.dev/pkg/client/injection/kube/informers/core/v1/pod"
 	secretinformer "knative.dev/pkg/client/injection/kube/informers/core/v1/secret"
+	"knative.dev/pkg/configmap"
 	"knative.dev/pkg/controller"
 	"knative.dev/pkg/resolver"
 
@@ -39,7 +40,7 @@ type ControllerConfig struct {
 	DataPlaneConfigFormat string `required:"true" split_words:"true"`
 }
 
-func NewController(ctx context.Context) *controller.Impl {
+func NewController(ctx context.Context, watcher configmap.Watcher) *controller.Impl {
 
 	controllerConfig := &ControllerConfig{}
 	if err := envconfig.Process("CONSUMER", controllerConfig); err != nil {
@@ -57,14 +58,13 @@ func NewController(ctx context.Context) *controller.Impl {
 		KafkaFeatureFlags:   config.DefaultFeaturesConfig(),
 	}
 
-	impl := creconciler.NewImpl(ctx, r, func(impl *controller.Impl) controller.Options {
-		return controller.Options{
-			ConfigStore: config.NewStore(ctx, func(name string, value *config.KafkaFeatureFlags) {
-				r.KafkaFeatureFlags.Reset(value)
-				impl.GlobalResync(consumerInformer.Informer())
-			}),
-		}
+	impl := creconciler.NewImpl(ctx, r)
+
+	configStore := config.NewStore(ctx, func(name string, value *config.KafkaFeatureFlags) {
+		r.KafkaFeatureFlags.Reset(value)
+		impl.GlobalResync(consumerInformer.Informer())
 	})
+	configStore.WatchConfigs(watcher)
 
 	r.Resolver = resolver.NewURIResolverFromTracker(ctx, impl.Tracker)
 
diff --git a/control-plane/pkg/reconciler/consumergroup/consumergroup.go b/control-plane/pkg/reconciler/consumergroup/consumergroup.go
index a10bc8d14..b83600dcf 100644
--- a/control-plane/pkg/reconciler/consumergroup/consumergroup.go
+++ b/control-plane/pkg/reconciler/consumergroup/consumergroup.go
@@ -112,6 +112,16 @@ func (r Reconciler) ReconcileKind(ctx context.Context, cg *kafkainternals.Consum
 
 func (r Reconciler) FinalizeKind(ctx context.Context, cg *kafkainternals.ConsumerGroup) reconciler.Event {
 
+	cg.Spec.Replicas = pointer.Int32Ptr(0)
+	err := r.schedule(cg) //de-schedule placements
+
+	if err != nil {
+		cg.Status.Placements = nil
+
+		// return an error to 1. update the status. 2. not clear the finalizer
+		return errors.New("placement list was not empty")
+	}
+
 	// Get consumers associated with the ConsumerGroup.
 	existingConsumers, err := r.ConsumerLister.Consumers(cg.GetNamespace()).List(labels.SelectorFromSet(cg.Spec.Selector))
 	if err != nil {
diff --git a/go.mod b/go.mod
index 20fc0ff69..5d399c1da 100644
--- a/go.mod
+++ b/go.mod
@@ -31,8 +31,8 @@ require (
 	k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
 	knative.dev/eventing v0.32.1-0.20220622112123-0866e62ec48e
 	knative.dev/eventing-kafka v0.32.1-0.20220610014424-689d5055201c
-	knative.dev/hack v0.0.0-20220610014127-dc6c287516dc
-	knative.dev/pkg v0.0.0-20220621173822-9c5a7317fa9d
+	knative.dev/hack v0.0.0-20220701014203-65c463ac8c98
+	knative.dev/pkg v0.0.0-20220705130606-e60d250dc637
 	knative.dev/reconciler-test v0.0.0-20220622130523-57e43ca43bda
 	sigs.k8s.io/yaml v1.3.0
 )
diff --git a/go.sum b/go.sum
index 8cb7e1b41..66961f560 100644
--- a/go.sum
+++ b/go.sum
@@ -1397,14 +1397,16 @@ knative.dev/eventing v0.32.1-0.20220622112123-0866e62ec48e/go.mod h1:WKC5YSu8dhj
 knative.dev/eventing-kafka v0.32.1-0.20220610014424-689d5055201c h1:vLnymcpFVsRfR6YMZcZEiT3HRkAvZriec7PuxJxn+Qk=
 knative.dev/eventing-kafka v0.32.1-0.20220610014424-689d5055201c/go.mod h1:7Nzoitdd3WgLoJKXSifxylBk9+N85H0AVt0CF4wosFs=
 knative.dev/hack v0.0.0-20220524153203-12d3e2a7addc/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
-knative.dev/hack v0.0.0-20220610014127-dc6c287516dc h1:LyqyT+rtgZYfOb3ChGE5jTFApCOcUmAcSV+TzgLxnys=
 knative.dev/hack v0.0.0-20220610014127-dc6c287516dc/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
+knative.dev/hack v0.0.0-20220701014203-65c463ac8c98 h1:kAwcKZOwYU0QCGEwvZrgnLrynFCWnXetwR/+a4W9R70=
+knative.dev/hack v0.0.0-20220701014203-65c463ac8c98/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
 knative.dev/hack/schema v0.0.0-20220524153203-12d3e2a7addc/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
 knative.dev/hack/schema v0.0.0-20220610014127-dc6c287516dc/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
 knative.dev/pkg v0.0.0-20220524202603-19adf798efb8/go.mod h1:pApypeWDkGrsMkUDkV6StWXS4CXhwGWuJEID9GGZY0Y=
 knative.dev/pkg v0.0.0-20220610014025-7d607d643ee2/go.mod h1:pApypeWDkGrsMkUDkV6StWXS4CXhwGWuJEID9GGZY0Y=
-knative.dev/pkg v0.0.0-20220621173822-9c5a7317fa9d h1:H/naKtQODjCIr9wFb1YOG17CgbkgSFMy5dX0WZnrz6o=
 knative.dev/pkg v0.0.0-20220621173822-9c5a7317fa9d/go.mod h1:hmwyuQ6uQlqLVEM4lJGg6LZ12gbnUQv9kH88sA5pLDg=
+knative.dev/pkg v0.0.0-20220705130606-e60d250dc637 h1:wvz8Y/b2Ubox0pbTLAbKags19UC72Ik+b/tIW2QP9/E=
+knative.dev/pkg v0.0.0-20220705130606-e60d250dc637/go.mod h1:MxsV3ZGdrH87zv4O9HtxzbNwmiKcGwEP7UdriLINSn0=
 knative.dev/reconciler-test v0.0.0-20220524205904-f750f80bfc7e/go.mod h1:/ps2aEdmtjId+pUGJuuADQN4IucIp4rI7KnrYEahOgE=
 knative.dev/reconciler-test v0.0.0-20220610141926-64ffd15625ec/go.mod h1:/vZ6/AKGYQQPYY/7BSebqt62QrxiJ97T3r1jso9dAJg=
 knative.dev/reconciler-test v0.0.0-20220622130523-57e43ca43bda h1:wr6oFIvSNQq2dPOUIttwh+s0wJg5VRAP3vXxw0H38/U=
diff --git a/vendor/knative.dev/hack/release.sh b/vendor/knative.dev/hack/release.sh
index 915a13035..0448a7752 100644
--- a/vendor/knative.dev/hack/release.sh
+++ b/vendor/knative.dev/hack/release.sh
@@ -234,13 +234,15 @@ function prepare_dot_release() {
   # Use the original tag (ie. potentially with a knative- prefix) when determining the last version commit sha
   local github_tag="$(hub_tool release | grep "${last_version}")"
   local last_release_commit="$(git rev-list -n 1 "${github_tag}")"
+  local last_release_commit_filtered="$(git rev-list --invert-grep --grep "\[skip-dot-release\]" -n 1 "${github_tag}")"
   local release_branch_commit="$(git rev-list -n 1 upstream/"${RELEASE_BRANCH}")"
+  local release_branch_commit_filtered="$(git rev-list --invert-grep --grep "\[skip-dot-release\]" -n 1 upstream/"${RELEASE_BRANCH}")"
   [[ -n "${last_release_commit}" ]] || abort "cannot get last release commit"
   [[ -n "${release_branch_commit}" ]] || abort "cannot get release branch last commit"
-  echo "Version ${last_version} is at commit ${last_release_commit}"
-  echo "Branch ${RELEASE_BRANCH} is at commit ${release_branch_commit}"
-  if [[ "${last_release_commit}" == "${release_branch_commit}" ]]; then
-    echo "*** Branch ${RELEASE_BRANCH} has no new cherry-picks since release ${last_version}"
+  echo "Version ${last_version} is at commit ${last_release_commit}. Comparing using ${last_release_commit_filtered}. If it is different is because commits with the [skip-dot-release] flag in their commit body are not being considered."
+  echo "Branch ${RELEASE_BRANCH} is at commit ${release_branch_commit}. Comparing using ${release_branch_commit_filtered}. If it is different is because commits with the [skip-dot-release] flag in their commit body are not being considered."
+  if [[ "${last_release_commit_filtered}" == "${release_branch_commit_filtered}" ]]; then
+    echo "*** Branch ${RELEASE_BRANCH} has no new cherry-picks (ignoring commits with [skip-dot-release]) since release ${last_version}."
     echo "*** No dot release will be generated, as no changes exist"
     exit 0
   fi
diff --git a/vendor/knative.dev/pkg/apis/duck/v1/zz_generated.deepcopy.go b/vendor/knative.dev/pkg/apis/duck/v1/zz_generated.deepcopy.go
index dcde44940..96638e579 100644
--- a/vendor/knative.dev/pkg/apis/duck/v1/zz_generated.deepcopy.go
+++ b/vendor/knative.dev/pkg/apis/duck/v1/zz_generated.deepcopy.go
@@ -2,7 +2,7 @@
 // +build !ignore_autogenerated
 
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/apis/duck/v1alpha1/zz_generated.deepcopy.go b/vendor/knative.dev/pkg/apis/duck/v1alpha1/zz_generated.deepcopy.go
index 838f15a17..c845923b1 100644
--- a/vendor/knative.dev/pkg/apis/duck/v1alpha1/zz_generated.deepcopy.go
+++ b/vendor/knative.dev/pkg/apis/duck/v1alpha1/zz_generated.deepcopy.go
@@ -2,7 +2,7 @@
 // +build !ignore_autogenerated
 
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/apis/duck/v1beta1/zz_generated.deepcopy.go b/vendor/knative.dev/pkg/apis/duck/v1beta1/zz_generated.deepcopy.go
index 2e7d702c4..743081b01 100644
--- a/vendor/knative.dev/pkg/apis/duck/v1beta1/zz_generated.deepcopy.go
+++ b/vendor/knative.dev/pkg/apis/duck/v1beta1/zz_generated.deepcopy.go
@@ -2,7 +2,7 @@
 // +build !ignore_autogenerated
 
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/apis/zz_generated.deepcopy.go b/vendor/knative.dev/pkg/apis/zz_generated.deepcopy.go
index 512ebea24..367d7941f 100644
--- a/vendor/knative.dev/pkg/apis/zz_generated.deepcopy.go
+++ b/vendor/knative.dev/pkg/apis/zz_generated.deepcopy.go
@@ -2,7 +2,7 @@
 // +build !ignore_autogenerated
 
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/apiextensions/client/client.go b/vendor/knative.dev/pkg/client/injection/apiextensions/client/client.go
index 9c8d95a7c..c44fdb2e3 100644
--- a/vendor/knative.dev/pkg/client/injection/apiextensions/client/client.go
+++ b/vendor/knative.dev/pkg/client/injection/apiextensions/client/client.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/apiextensions/client/fake/fake.go b/vendor/knative.dev/pkg/client/injection/apiextensions/client/fake/fake.go
index 7de9b9aea..c48df7027 100644
--- a/vendor/knative.dev/pkg/client/injection/apiextensions/client/fake/fake.go
+++ b/vendor/knative.dev/pkg/client/injection/apiextensions/client/fake/fake.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/ducks/duck/v1/addressable/addressable.go b/vendor/knative.dev/pkg/client/injection/ducks/duck/v1/addressable/addressable.go
index d40153e95..3bdfb44f0 100644
--- a/vendor/knative.dev/pkg/client/injection/ducks/duck/v1/addressable/addressable.go
+++ b/vendor/knative.dev/pkg/client/injection/ducks/duck/v1/addressable/addressable.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/ducks/duck/v1/addressable/fake/fake.go b/vendor/knative.dev/pkg/client/injection/ducks/duck/v1/addressable/fake/fake.go
index 85225f977..e1aa3035d 100644
--- a/vendor/knative.dev/pkg/client/injection/ducks/duck/v1/addressable/fake/fake.go
+++ b/vendor/knative.dev/pkg/client/injection/ducks/duck/v1/addressable/fake/fake.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/client/client.go b/vendor/knative.dev/pkg/client/injection/kube/client/client.go
index 1fc2956ff..caf6cb793 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/client/client.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/client/client.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/client/fake/fake.go b/vendor/knative.dev/pkg/client/injection/kube/client/fake/fake.go
index 4360b0ec4..11d2f9fbf 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/client/fake/fake.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/client/fake/fake.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/admissionregistration/v1/mutatingwebhookconfiguration/mutatingwebhookconfiguration.go b/vendor/knative.dev/pkg/client/injection/kube/informers/admissionregistration/v1/mutatingwebhookconfiguration/mutatingwebhookconfiguration.go
index c9ca217ff..9c395d26e 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/admissionregistration/v1/mutatingwebhookconfiguration/mutatingwebhookconfiguration.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/admissionregistration/v1/mutatingwebhookconfiguration/mutatingwebhookconfiguration.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/admissionregistration/v1/validatingwebhookconfiguration/validatingwebhookconfiguration.go b/vendor/knative.dev/pkg/client/injection/kube/informers/admissionregistration/v1/validatingwebhookconfiguration/validatingwebhookconfiguration.go
index d89501a03..f4fee2dfd 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/admissionregistration/v1/validatingwebhookconfiguration/validatingwebhookconfiguration.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/admissionregistration/v1/validatingwebhookconfiguration/validatingwebhookconfiguration.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/apps/v1/statefulset/fake/fake.go b/vendor/knative.dev/pkg/client/injection/kube/informers/apps/v1/statefulset/fake/fake.go
index 518d654ec..704ca3244 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/apps/v1/statefulset/fake/fake.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/apps/v1/statefulset/fake/fake.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/apps/v1/statefulset/statefulset.go b/vendor/knative.dev/pkg/client/injection/kube/informers/apps/v1/statefulset/statefulset.go
index 76806dec7..2dd56a4dc 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/apps/v1/statefulset/statefulset.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/apps/v1/statefulset/statefulset.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/configmap/configmap.go b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/configmap/configmap.go
index e8d1516ca..1dafbeb08 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/configmap/configmap.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/configmap/configmap.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/configmap/fake/fake.go b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/configmap/fake/fake.go
index 475aa4f58..22f414108 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/configmap/fake/fake.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/configmap/fake/fake.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/node/fake/fake.go b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/node/fake/fake.go
index 627d83d7c..e042efaa2 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/node/fake/fake.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/node/fake/fake.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/node/node.go b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/node/node.go
index b4712a000..5fc46d776 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/node/node.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/node/node.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/pod/fake/fake.go b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/pod/fake/fake.go
index db12d56a0..c1d417b42 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/pod/fake/fake.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/pod/fake/fake.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/pod/pod.go b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/pod/pod.go
index 79776b898..bfdb12f81 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/pod/pod.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/pod/pod.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/secret/fake/fake.go b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/secret/fake/fake.go
index 1282f1a23..b876df855 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/secret/fake/fake.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/secret/fake/fake.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/secret/secret.go b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/secret/secret.go
index 715fbac5f..27d22b702 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/secret/secret.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/secret/secret.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/service/fake/fake.go b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/service/fake/fake.go
index 27974c092..65ffd9138 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/service/fake/fake.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/service/fake/fake.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/service/service.go b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/service/service.go
index 2ae3fab57..cc379dade 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/service/service.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/core/v1/service/service.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/factory/factory.go b/vendor/knative.dev/pkg/client/injection/kube/informers/factory/factory.go
index c1c136755..8bcb84dcc 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/factory/factory.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/factory/factory.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/client/injection/kube/informers/factory/fake/fake.go b/vendor/knative.dev/pkg/client/injection/kube/informers/factory/fake/fake.go
index 2c6161513..8a1c1b712 100644
--- a/vendor/knative.dev/pkg/client/injection/kube/informers/factory/fake/fake.go
+++ b/vendor/knative.dev/pkg/client/injection/kube/informers/factory/fake/fake.go
@@ -1,5 +1,5 @@
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/logging/zz_generated.deepcopy.go b/vendor/knative.dev/pkg/logging/zz_generated.deepcopy.go
index ac7d5e152..a752abd9b 100644
--- a/vendor/knative.dev/pkg/logging/zz_generated.deepcopy.go
+++ b/vendor/knative.dev/pkg/logging/zz_generated.deepcopy.go
@@ -2,7 +2,7 @@
 // +build !ignore_autogenerated
 
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/metrics/zz_generated.deepcopy.go b/vendor/knative.dev/pkg/metrics/zz_generated.deepcopy.go
index e0108605b..1d90e3a9d 100644
--- a/vendor/knative.dev/pkg/metrics/zz_generated.deepcopy.go
+++ b/vendor/knative.dev/pkg/metrics/zz_generated.deepcopy.go
@@ -2,7 +2,7 @@
 // +build !ignore_autogenerated
 
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/tracker/zz_generated.deepcopy.go b/vendor/knative.dev/pkg/tracker/zz_generated.deepcopy.go
index 8e2f56b47..814f39909 100644
--- a/vendor/knative.dev/pkg/tracker/zz_generated.deepcopy.go
+++ b/vendor/knative.dev/pkg/tracker/zz_generated.deepcopy.go
@@ -2,7 +2,7 @@
 // +build !ignore_autogenerated
 
 /*
-Copyright 2021 The Knative Authors
+Copyright 2022 The Knative Authors
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/vendor/knative.dev/pkg/webhook/admission.go b/vendor/knative.dev/pkg/webhook/admission.go
index ff14585f7..ea5518260 100644
--- a/vendor/knative.dev/pkg/webhook/admission.go
+++ b/vendor/knative.dev/pkg/webhook/admission.go
@@ -102,7 +102,8 @@ func admissionHandler(rootLogger *zap.SugaredLogger, stats StatsReporter, c Admi
 			logkey.Operation, string(review.Request.Operation),
 			logkey.Resource, review.Request.Resource.String(),
 			logkey.SubResource, review.Request.SubResource,
-			logkey.UserInfo, fmt.Sprint(review.Request.UserInfo))
+			logkey.UserInfo, review.Request.UserInfo.Username,
+		)
 
 		ctx := logging.WithLogger(r.Context(), logger)
 		ctx = apis.WithHTTPRequest(ctx, r)
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 00bc6e53d..0efe56b8a 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1371,11 +1371,11 @@ knative.dev/eventing-kafka/test/rekt/resources/resetoffset
 knative.dev/eventing-kafka/test/upgrade
 knative.dev/eventing-kafka/test/upgrade/continual
 knative.dev/eventing-kafka/test/upgrade/installation
-# knative.dev/hack v0.0.0-20220610014127-dc6c287516dc
+# knative.dev/hack v0.0.0-20220701014203-65c463ac8c98
 ## explicit
 knative.dev/hack
 knative.dev/hack/shell
-# knative.dev/pkg v0.0.0-20220621173822-9c5a7317fa9d
+# knative.dev/pkg v0.0.0-20220705130606-e60d250dc637
 ## explicit
 knative.dev/pkg/apiextensions/storageversion
 knative.dev/pkg/apiextensions/storageversion/cmd/migrate
@@ -1415,6 +1415,7 @@ knative.dev/pkg/codegen/cmd/injection-gen/generators
 knative.dev/pkg/configmap
 knative.dev/pkg/configmap/hash-gen
 knative.dev/pkg/configmap/informer
+knative.dev/pkg/configmap/testing
 knative.dev/pkg/controller
 knative.dev/pkg/environment
 knative.dev/pkg/hack


Test patch:
diff --git a/control-plane/config/eventing-kafka-source/200-controller/100-config-kafka-feautures.yaml b/control-plane/config/eventing-kafka-source/200-controller/100-config-kafka-features.yaml
similarity index 100%
rename from control-plane/config/eventing-kafka-source/200-controller/100-config-kafka-feautures.yaml
rename to control-plane/config/eventing-kafka-source/200-controller/100-config-kafka-features.yaml
diff --git a/control-plane/pkg/apis/config/features_test.go b/control-plane/pkg/apis/config/features_test.go
new file mode 100644
index 000000000..05211ad6b
--- /dev/null
+++ b/control-plane/pkg/apis/config/features_test.go
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2022 The Knative Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package config
+
+import (
+	"context"
+	"testing"
+
+	"github.com/stretchr/testify/require"
+	"knative.dev/eventing/pkg/apis/feature"
+	cm "knative.dev/pkg/configmap/testing"
+	_ "knative.dev/pkg/system/testing"
+)
+
+func TestFlags_IsDispatcherRateLimiterEnabled(t *testing.T) {
+	nc := DefaultFeaturesConfig()
+	require.False(t, nc.features.DispatcherRateLimiter == feature.Enabled)
+}
+
+func TestFlags_IsEnabled_ContainingFlag(t *testing.T) {
+	nc := DefaultFeaturesConfig()
+	nc.Reset(&KafkaFeatureFlags{
+		features: features{
+			DispatcherRateLimiter: feature.Enabled,
+		},
+	})
+	require.True(t, nc.features.DispatcherRateLimiter == feature.Enabled)
+}
+
+func TestGetFlags(t *testing.T) {
+	_, example := cm.ConfigMapsFromTestFile(t, FlagsConfigName)
+	flags, err := newFeaturesConfigFromMap(example)
+	require.NoError(t, err)
+
+	require.True(t, flags.IsDispatcherRateLimiterEnabled())
+
+}
+
+func TestStoreLoadWithConfigMap(t *testing.T) {
+	store := NewStore(context.Background())
+
+	_, exampleConfig := cm.ConfigMapsFromTestFile(t, FlagsConfigName)
+	store.OnConfigChanged(exampleConfig)
+
+	have := FromContext(store.ToContext(context.Background()))
+	expected, _ := newFeaturesConfigFromMap(exampleConfig)
+
+	require.Equal(t, expected.IsDispatcherRateLimiterEnabled(), have.IsDispatcherRateLimiterEnabled())
+}
+
+func TestStoreLoadWithContext(t *testing.T) {
+	have := FromContext(context.Background())
+
+	require.False(t, have.IsDispatcherRateLimiterEnabled())
+}
diff --git a/control-plane/pkg/apis/config/testdata/config-kafka-features.yaml b/control-plane/pkg/apis/config/testdata/config-kafka-features.yaml
new file mode 100644
index 000000000..ffa5d183f
--- /dev/null
+++ b/control-plane/pkg/apis/config/testdata/config-kafka-features.yaml
@@ -0,0 +1,8 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: config-kafka-features
+  namespace: knative-eventing
+data:
+  _example: |
+    dispatcher.rate-limiter: "enabled"
diff --git a/control-plane/pkg/reconciler/consumer/controller_test.go b/control-plane/pkg/reconciler/consumer/controller_test.go
index 5e71da0ca..039f7a920 100644
--- a/control-plane/pkg/reconciler/consumer/controller_test.go
+++ b/control-plane/pkg/reconciler/consumer/controller_test.go
@@ -20,7 +20,10 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/require"
+	corev1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/runtime"
+	"knative.dev/pkg/configmap"
 	reconcilertesting "knative.dev/pkg/reconciler/testing"
 
 	fakekubeclientset "k8s.io/client-go/kubernetes/fake"
@@ -49,7 +52,11 @@ func TestNewController(t *testing.T) {
 
 	t.Setenv("CONSUMER_DATA_PLANE_CONFIG_FORMAT", "json")
 
-	controller := NewController(ctx)
+	controller := NewController(ctx, configmap.NewStaticWatcher(&corev1.ConfigMap{
+		ObjectMeta: metav1.ObjectMeta{
+			Name: "config-kafka-features",
+		},
+	}))
 	if controller == nil {
 		t.Error("failed to create controller: <nil>")
 	}
diff --git a/control-plane/pkg/reconciler/consumergroup/consumergroup_test.go b/control-plane/pkg/reconciler/consumergroup/consumergroup_test.go
index 6b4cbda6c..f0ed21d31 100644
--- a/control-plane/pkg/reconciler/consumergroup/consumergroup_test.go
+++ b/control-plane/pkg/reconciler/consumergroup/consumergroup_test.go
@@ -1438,6 +1438,8 @@ func TestFinalizeKind(t *testing.T) {
 			Objects: []runtime.Object{
 				NewSASLSSLSecret(ConsumerGroupNamespace, SecretName),
 				NewDeletedConsumeGroup(
+					ConsumerGroupReplicas(2),
+					ConsumerGroupOwnerRef(SourceAsOwnerReference()),
 					ConsumerGroupConsumerSpec(NewConsumerSpec(
 						ConsumerConfigs(
 							ConsumerBootstrapServersConfig(ChannelBootstrapServers),
@@ -1480,7 +1482,12 @@ func TestFinalizeKind(t *testing.T) {
 					)),
 				),
 			},
-			Key:                     testKey,
+			Key: testKey,
+			OtherTestData: map[string]interface{}{
+				testSchedulerKey: SchedulerFunc(func(vpod scheduler.VPod) ([]eventingduckv1alpha1.Placement, error) {
+					return nil, nil
+				}),
+			},
 			SkipNamespaceValidation: true, // WantCreates compare the source namespace with configmap namespace, so skip it
 		},
 		{
@@ -1500,6 +1507,8 @@ func TestFinalizeKind(t *testing.T) {
 					)),
 				),
 				NewDeletedConsumeGroup(
+					ConsumerGroupReplicas(1),
+					ConsumerGroupOwnerRef(SourceAsOwnerReference()),
 					ConsumerGroupConsumerSpec(NewConsumerSpec(
 						ConsumerConfigs(
 							ConsumerBootstrapServersConfig(ChannelBootstrapServers),
@@ -1543,6 +1552,57 @@ func TestFinalizeKind(t *testing.T) {
 				),
 			},
 			Key: testKey,
+			OtherTestData: map[string]interface{}{
+				testSchedulerKey: SchedulerFunc(func(vpod scheduler.VPod) ([]eventingduckv1alpha1.Placement, error) {
+					return nil, nil
+				}),
+			},
+			WantDeletes: []clientgotesting.DeleteActionImpl{
+				{
+					ActionImpl: clientgotesting.ActionImpl{
+						Namespace: ConsumerGroupNamespace,
+						Resource: schema.GroupVersionResource{
+							Group:    kafkainternals.SchemeGroupVersion.Group,
+							Version:  kafkainternals.SchemeGroupVersion.Version,
+							Resource: "consumers",
+						},
+					},
+					Name: fmt.Sprintf("%s-%d", ConsumerNamePrefix, 1),
+				},
+			},
+			SkipNamespaceValidation: true, // WantCreates compare the source namespace with configmap namespace, so skip it
+		},
+		{
+			Name: "Finalize normal - with consumers and existing placements",
+			Objects: []runtime.Object{
+				NewConsumer(1,
+					ConsumerSpec(NewConsumerSpec(
+						ConsumerTopics("t1", "t2"),
+						ConsumerConfigs(
+							ConsumerBootstrapServersConfig(ChannelBootstrapServers),
+							ConsumerGroupIdConfig("my.group.id"),
+						),
+						ConsumerVReplicas(1),
+						ConsumerPlacement(kafkainternals.PodBind{PodName: "p1", PodNamespace: systemNamespace}),
+						ConsumerSubscriber(NewSourceSinkReference()),
+					)),
+				),
+				NewDeletedConsumeGroup(
+					ConsumerGroupOwnerRef(SourceAsOwnerReference()),
+					ConsumerGroupConsumerSpec(NewConsumerSpec(
+						ConsumerConfigs(
+							ConsumerBootstrapServersConfig(ChannelBootstrapServers),
+							ConsumerGroupIdConfig("my.group.id"),
+						),
+					)),
+				),
+			},
+			Key: testKey,
+			OtherTestData: map[string]interface{}{
+				testSchedulerKey: SchedulerFunc(func(vpod scheduler.VPod) ([]eventingduckv1alpha1.Placement, error) {
+					return nil, nil
+				}),
+			},
 			WantDeletes: []clientgotesting.DeleteActionImpl{
 				{
 					ActionImpl: clientgotesting.ActionImpl{
@@ -1564,6 +1624,9 @@ func TestFinalizeKind(t *testing.T) {
 	table.Test(t, NewFactory(nil, func(ctx context.Context, listers *Listers, env *config.Env, row *TableRow) controller.Reconciler {
 
 		r := &Reconciler{
+			SchedulerFunc: func(s string) scheduler.Scheduler {
+				return row.OtherTestData[testSchedulerKey].(scheduler.Scheduler)
+			},
 			ConsumerLister:  listers.GetConsumerLister(),
 			InternalsClient: fakekafkainternalsclient.Get(ctx).InternalV1alpha1(),
 			SecretLister:    listers.GetSecretLister(),
diff --git a/vendor/knative.dev/pkg/configmap/testing/configmap.go b/vendor/knative.dev/pkg/configmap/testing/configmap.go
new file mode 100644
index 000000000..909036892
--- /dev/null
+++ b/vendor/knative.dev/pkg/configmap/testing/configmap.go
@@ -0,0 +1,109 @@
+/*
+Copyright 2019 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	"fmt"
+	"io/ioutil"
+	"strings"
+	"testing"
+	"unicode"
+
+	corev1 "k8s.io/api/core/v1"
+	"k8s.io/apimachinery/pkg/util/sets"
+	"knative.dev/pkg/configmap"
+	"sigs.k8s.io/yaml"
+)
+
+// ConfigMapFromTestFile creates a v1.ConfigMap from a YAML file
+// It loads the YAML file from the testdata folder.
+func ConfigMapFromTestFile(t testing.TB, name string, allowed ...string) *corev1.ConfigMap {
+	t.Helper()
+
+	cm, _ := ConfigMapsFromTestFile(t, name, allowed...)
+	return cm
+}
+
+// ConfigMapsFromTestFile creates two corev1.ConfigMap resources from the config
+// file read from the testdata directory:
+// 1. The raw configmap read in.
+// 2. A second version of the configmap augmenting `data:` with what's parsed from the value of `_example:`
+func ConfigMapsFromTestFile(t testing.TB, name string, allowed ...string) (*corev1.ConfigMap, *corev1.ConfigMap) {
+	t.Helper()
+
+	b, err := ioutil.ReadFile(fmt.Sprintf("testdata/%s.yaml", name))
+	if err != nil {
+		t.Fatal("ReadFile() =", err)
+	}
+
+	var orig corev1.ConfigMap
+
+	// Use sigs.k8s.io/yaml since it reads json struct
+	// tags so things unmarshal properly.
+	if err := yaml.Unmarshal(b, &orig); err != nil {
+		t.Fatal("yaml.Unmarshal() =", err)
+	}
+
+	// We expect each of the allowed keys, and a key holding an example
+	// configuration for us to validate.
+	allowed = append(allowed, configmap.ExampleKey)
+
+	if len(orig.Data) != len(allowed) {
+		// See here for why we only check in empty ConfigMaps:
+		// https://github.com/knative/serving/issues/2668
+		t.Errorf("Data = %v, wanted %v", orig.Data, allowed)
+	}
+	allow := sets.NewString(allowed...)
+	for key := range orig.Data {
+		if !allow.Has(key) {
+			t.Errorf("Encountered key %q in %q that wasn't on the allowed list", key, name)
+		}
+	}
+	// With the length and membership checks, we know that the keyspace matches.
+
+	exampleBody, hasExampleBody := orig.Data[configmap.ExampleKey]
+	// Check that exampleBody does not have lines that end in a trailing space.
+	for i, line := range strings.Split(exampleBody, "\n") {
+		if strings.TrimRightFunc(line, unicode.IsSpace) != line {
+			t.Errorf("line %d of %q example contains trailing spaces", i, name)
+		}
+	}
+
+	// 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 annotation = %s, want %s (you may need to re-run ./hack/update-codegen.sh)", gotChecksum, wantChecksum)
+		}
+	}
+
+	// Parse exampleBody into exemplar.Data.
+	exemplar := orig.DeepCopy()
+	if err := yaml.Unmarshal([]byte(exampleBody), &exemplar.Data); err != nil {
+		t.Fatal("yaml.Unmarshal() =", err)
+	}
+	// Augment the sample with actual configuration.
+	for k, v := range orig.Data {
+		if _, ok := exemplar.Data[k]; ok {
+			continue
+		}
+		exemplar.Data[k] = v
+	}
+
+	return &orig, exemplar
+}