-
Notifications
You must be signed in to change notification settings - Fork 421
feat(batch): raise exception for invalid batch event #6088
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #6088 +/- ##
========================================
Coverage 96.25% 96.25%
========================================
Files 234 234
Lines 11140 11147 +7
Branches 822 824 +2
========================================
+ Hits 10723 10730 +7
Misses 327 327
Partials 90 90 ☔ View full report in Codecov by Sentry. |
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.
Hey @anafalcao! Thanks for working in this PR! I just left some comments before we merge this.
Please also leave a message in the original issue saying that we will raise an exception because we want to match the TypeScript version and have the same behavior in the API.
Also, in the "User Experience" section, add a complete example of the experience, including the try/except block, so that it's easy to copy when we write the release notes.
tests/functional/batch/required_dependencies/test_utilities_batch.py
Outdated
Show resolved
Hide resolved
tests/functional/batch/required_dependencies/test_utilities_batch.py
Outdated
Show resolved
Hide resolved
tests/functional/batch/required_dependencies/test_utilities_batch.py
Outdated
Show resolved
Hide resolved
Hi @leandrodamascena ! Thank you for the feedback. I worked on them in this last commit, and updated the User Experience section for a more complete example. |
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.
APPROVED!
|
Issue number: #2394
Summary
Changes
This PR adds fail fast error handling for unexpected batch types in the Batch Processing utility.
UnexpectedBatchTypeError
to handle invalid batch types inprocess_partial_response
andasync_process_partial_response
Unexpected batch event type. Possible values are: SQS, KinesisDataStreams, DynamoDBStreams
User experience
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.