-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change default trigger consumergroup name and provide override #3033
Change default trigger consumergroup name and provide override #3033
Conversation
Hi @EndPositive. Thanks for your PR. I'm waiting for a knative-sandbox member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@pierDipi is the triggerv2 still maintained? |
Yes |
/ok-to-test |
Codecov Report
@@ Coverage Diff @@
## main #3033 +/- ##
============================================
- Coverage 64.22% 64.19% -0.04%
Complexity 755 755
============================================
Files 156 157 +1
Lines 11034 11122 +88
Branches 232 232
============================================
+ Hits 7087 7140 +53
- Misses 3436 3460 +24
- Partials 511 522 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
/retest |
…}-{{ .Name }}` and provide override
/retest |
1 similar comment
/retest |
I believe there are a few places where we assumed a certain structure for the consumer group id, like: https://github.com/knative-sandbox/eventing-kafka-broker/blob/7f3ec839e802d33985c67766bab1a1f0623c5adf/test/e2e/sacura_test.go#L159-L166 |
The controller is panic-ing on https://storage.googleapis.com/knative-prow/pr-logs/pull/knative-sandbox_eventing-kafka-broker/3033/reconciler-tests-namespaced-broker_eventing-kafka-broker_main/1646087730972594176/artifacts/knative-eventing/kafka-controller
|
/retest |
dispatcher.rate-limiter: "disabled" | ||
dispatcher.ordered-executor-metrics: "disabled" | ||
controller.autoscaler: "disabled" | ||
triggers.consumergroup.template: "knative-trigger-{{ .Namespace }}-{{ .Name }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to include the UID as suffix by default?
The reason being that it will allow users replaying events by deleting/recreating, since the trigger is almost fully mutable deleting/recreating wouldn't be necessary for anything other than replaying events while also providing a well known group id prefix for monitoring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the comment on the issue:
In addition, using the {{ . .Id }}, in iii you would still get a new consumergroup whenever the trigger is recreated, losing the offset again
it's not clear on why the need for recreating the trigger?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is just a matter of preference. If somehow our CD would recreate the trigger, we want to keep the original consumergroup. Such a name would be very safe for whenever k8s resources are destroyed.
allow users replaying events by deleting/recreating
I think for "complex" use cases like these, we should let the user manually reset offsets, or perhaps create a new trigger with a different name for replay purposes.
But either is fine by me, since we can override the configuration for our preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
Thanks appreciate the additional thought
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: EndPositive, pierDipi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test upgrade-tests |
Great work. Thanks for contribution. We need this feature. |
Fixes #3020
Proposed Changes
triggers.consumergroup.template: knative-trigger-{{ .Namespace }}-{{ .Name }}
.Annotations[group.id]
to all triggers, defaulting to trigger.UID if the consumer group already exists. If it does not yet exist, use the template inconfig-kafka-features
to determine the new group id.Release Note
Docs