-
Notifications
You must be signed in to change notification settings - Fork 420
feat(batch): add option to not raise BatchProcessingError
exception when the entire batch fails
#4719
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
feat(batch): add option to not raise BatchProcessingError
exception when the entire batch fails
#4719
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4719 +/- ##
========================================
Coverage 96.42% 96.42%
========================================
Files 223 223
Lines 10755 10756 +1
Branches 2001 2001
========================================
+ Hits 10371 10372 +1
Misses 270 270
Partials 114 114 ☔ 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.
Hi @leandrodamascena, thank you for the PR.
My only comment is related to the name of the new parameter. I would suggest consider renaming it to raise_on_entire_batch_failure
both for consistency (i.e. other things are called PartialItemFailureResponse
and batchItemFailures
) and for correctness.
Great point @dreamorosi! I changed the name of the parameter. |
Issue number: #4691
Summary
Changes
Currently, when using the Batch Processor utility, if all the records in a batch are marked as failed, the utility raise a
BatchProcessingError
exception. However, there can be scenarios where we do not want to throw an error for this condition.This PR adds a
raise_on_entire_batch_failure
option, giving users the ability to bypass theBatchProcessingError
when the entire batch fails.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.