-
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
Auto create events in channels #7089
Auto create events in channels #7089
Conversation
Skipping CI for Draft Pull Request. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #7089 +/- ##
==========================================
- Coverage 78.29% 77.99% -0.30%
==========================================
Files 250 250
Lines 13290 13367 +77
==========================================
+ Hits 10405 10426 +21
- Misses 2353 2405 +52
- Partials 532 536 +4
☔ View full report in Codecov by Sentry. |
@creydr @pierDipi I'm getting the following error when running the InMemoryChannel after making my changes:
Any ideas what I should do? |
Hey @Cali0707, |
/hold |
This is now working for me: kn-event-linux-amd64 send \
--to Channel:messaging.knative.dev/v1:example-channel \
--type org.test.message.error \
-f message="There is a problem" kn-event-linux-amd64 send \
--to Channel:messaging.knative.dev/v1:example-channel \
--type com.company.test.warning \
-f message="There is a problem"
|
Note: I had to change how the eventtype names are autogenerated because they were not unique enough. With the old function, I could only get one unique event name per channel/namespace pair. With the new function, I can get unique event names if the event type is different enough (e.g. |
/unhold |
@@ -152,7 +153,7 @@ func main() { | |||
|
|||
// Init auto-create only if enabled, after ConfigMap watcher is started | |||
if featureStore.IsEnabled(feature.EvenTypeAutoCreate) { | |||
autoCreate := &broker.EventTypeAutoHandler{ | |||
autoCreate := &eventtype.EventTypeAutoHandler{ |
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.
nice to move that out
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
[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 |
Fixes #7044
Proposed Changes
eventtypes.go
andeventtypes_test.go
out of thebroker
package into their own package to facilitate sharing code with channels.eventtypes
package in the fanout message handler to autocreate event types.Pre-review Checklist
Release Note
Docs
Tracking issue for docs: knative/docs#5612