-
Notifications
You must be signed in to change notification settings - Fork 916
Fix binding of SdkPojoSupplier to event stream type header. #1821
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
Conversation
Event stream type header values are generated from the member name in the event stream structure, not the structure name of the event itself. When the member name and the event type mismatch, then unmarshalling of events sent from the service fails. From the spec: `:event-type: This header’s value, a UTF-8 string, is derived from the event’s member name in the eventstream structure`
Do these two values match in Kinesis and Transcribe, and that's why they work? I want to make sure this wouldn't break one of those services. |
transcribe-streaming has AudioEvent that refers to the AudioEvent structure, and TranscriptEvent that points at a shape of the same name, as well as a bunch of exceptions that follow this pattern. Kinesis follows this pattern as well. |
Kudos, SonarCloud Quality Gate passed!
|
Codecov Report
@@ Coverage Diff @@
## master #1821 +/- ##
============================================
+ Coverage 76.24% 76.25% +0.01%
Complexity 187 187
============================================
Files 1072 1072
Lines 32404 32375 -29
Branches 2541 2527 -14
============================================
- Hits 24706 24689 -17
+ Misses 6443 6432 -11
+ Partials 1255 1254 -1
Continue to review full report at Codecov.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1821 +/- ##
============================================
- Coverage 76.29% 76.25% -0.04%
Complexity 187 187
============================================
Files 1074 1072 -2
Lines 32450 32375 -75
Branches 2550 2527 -23
============================================
- Hits 24759 24689 -70
+ Misses 6438 6432 -6
- Partials 1253 1254 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Description
Event stream type header values are generated from the member name in the event stream structure, not the structure name of the event itself. When the member name and the event type mismatch, then unmarshalling of events sent from the service fails.
From the spec:
:event-type: This header’s value, a UTF-8 string, is derived from the event’s member name in the eventstream structure
Motivation and Context
This brings the implementation of event stream unmarshalling into sync with the spec.
Testing
I modified the existing generation tests to generate a mismatch between output event type names and member names. I have also tested this offline end-to-end with a service model that has this mismatch.
Types of changes
Checklist
mvn install
succeedsLicense