-
Notifications
You must be signed in to change notification settings - Fork 601
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
Broker eventtype autocreate fixes #7161
Broker eventtype autocreate fixes #7161
Conversation
Signed-off-by: Calum Murray <cmurray@redhat.com>
…e sent to mt channel broker Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #7161 +/- ##
==========================================
- Coverage 77.93% 77.89% -0.05%
==========================================
Files 246 246
Lines 13200 13214 +14
==========================================
+ Hits 10288 10293 +5
- Misses 2390 2400 +10
+ Partials 522 521 -1
☔ View full report in Codecov by Sentry. |
/lgtm |
Btw @matzew I'm not 100% sure if the approach I've taken here is going to work for all cases. Because I'm using the owner reference on a channel and verifiying that it is a broker, if a broker creates a channel and then I send events directly to the channel (and not to the broker), the event type will still be registered with the broker as the owner. Do you think this behaviour is okay? |
yes, that is OK. However the event sent should be visible for the broker. Is that still the case? |
@matzew this is the current behaviour:
|
@Cali0707 Sorry for getting back late here.
when sending it directly to the channel, I'd not expect it to be "reference" for the broker. 🤔 |
@matzew the way I can currently see us implementing this is by adding a header or CE extension e.g. Does this make sense, or do you have another idea? |
@Cali0707 The channel is an IMP detail, and if we have a channel, created by the broker: only because that's how the broker is implemented. I think an event also directly (as in incorrectly) sent to the channel (instead of the broker), is also not getting out to the sink of the trigger. Hence, we should just correct the current behavior, described on the bug (which currently puts refernce to IMC, but really is broker). So, "managed" channel (e.g. by broker) should not do the auto-create |
/hold |
Signed-off-by: Calum Murray <cmurray@redhat.com>
@matzew this now behaves as follows:
Where |
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.
Thanks to tackling this!
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Cali0707, matzew 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 |
/unhold |
/cherry-pick release-v1.11 |
@matzew: cannot checkout In response to this:
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. |
/cherry-pick release-1.11 |
@Cali0707: #7161 failed to apply on top of branch "release-1.11":
In response to this:
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. |
* Fixed undefined typemeta on broker in eventtype autocreate Signed-off-by: Calum Murray <cmurray@redhat.com> * Fixed autocreate so that only one eventtype is created when events are sent to mt channel broker Signed-off-by: Calum Murray <cmurray@redhat.com> * Clean up Signed-off-by: Calum Murray <cmurray@redhat.com> * Fixed unit tests Signed-off-by: Calum Murray <cmurray@redhat.com> * channel only creates eventtypes if not owned by broker Signed-off-by: Calum Murray <cmurray@redhat.com> --------- Signed-off-by: Calum Murray <cmurray@redhat.com>
Broker eventtype autocreate fixes (#7161) * Fixed undefined typemeta on broker in eventtype autocreate * Fixed autocreate so that only one eventtype is created when events are sent to mt channel broker * Clean up * Fixed unit tests * channel only creates eventtypes if not owned by broker --------- Signed-off-by: Calum Murray <cmurray@redhat.com>
Fixes #7154
Proposed Changes
Pre-review Checklist
Release Note