-
Notifications
You must be signed in to change notification settings - Fork 125
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
[release-1.0] Properly handle events without the data
field
#1500
[release-1.0] Properly handle events without the data
field
#1500
Conversation
A valid CloudEvent in the CE binary protocol binding of Kafka might be composed by only Headers. KafkaConsumer doesn't call the deserializer if the value is null. That means that we get a record with a null value even though the record is a valid CloudEvent. This patch handles events without the data field properly by creating the CloudEvent object from record headers, if the above conditions apply. Signed-off-by: Pierangelo Di Pilato <pdipilat@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pdipilat@redhat.com>
Codecov Report
@@ Coverage Diff @@
## release-1.0 #1500 +/- ##
==============================================
Coverage ? 76.37%
Complexity ? 582
==============================================
Files ? 98
Lines ? 3568
Branches ? 160
==============================================
Hits ? 2725
Misses ? 634
Partials ? 209
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: knative-prow-robot, 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 |
…e-extensions#1500) * Properly handle events without data field A valid CloudEvent in the CE binary protocol binding of Kafka might be composed by only Headers. KafkaConsumer doesn't call the deserializer if the value is null. That means that we get a record with a null value even though the record is a valid CloudEvent. This patch handles events without the data field properly by creating the CloudEvent object from record headers, if the above conditions apply. Signed-off-by: Pierangelo Di Pilato <pdipilat@redhat.com> * Make code simpler, handle exceptions, change method name Signed-off-by: Pierangelo Di Pilato <pdipilat@redhat.com> Co-authored-by: Pierangelo Di Pilato <pdipilat@redhat.com>
Co-authored-by: serverless-qe <serverless-support@redhat.com>
This is an automated cherry-pick of #1460