eventing
eventing copied to clipboard
InMemoryChannel doesn't reject invalid CloudEvents
Describe the bug When you send an invalid CloudEvent to IMC and it won't reject the event.
See https://github.com/knative/eventing/issues/6046 for an example.
What I mean by invalid event is for example a CloudEvent without any type
.
According to CloudEvents specification, the type is a required field: https://github.com/cloudevents/spec/blob/v1.0.1/spec.md#type
Expected behavior
- [ ] Events validated and invalid events rejected.
- [ ] Tests to make sure IMC rejects these kind of events.
To Reproduce Steps to reproduce the behavior.
Knative release version 1.0.1
Additional context Add any other context about the problem here such as proposed priority
Would it make sense to add a general CE validation method to either a shared code repository for Knative Eventing or maybe even to the upstream CloudEvent SDK for go ?
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.
/remove-lifecycle stale
/triage accepted
/assign
@liuchangyan @aliok this is done in https://github.com/knative/eventing/commit/fae8544d856880afd583da0d573b6d3b63ad53df
Thanks @liuchangyan for the heads up.
Would it make sense to add a general CE validation method to either a shared code repository for Knative Eventing or maybe even to the upstream CloudEvent SDK for go ?
@rhuss It is done that way, using the CloudEvents SDK.