-
Notifications
You must be signed in to change notification settings - Fork 421
fix(batch): handle early validation errors for pydantic models (poison pill) #2091 #2099
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
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
Looking |
Sending a few fixes and we can merge and add it to the release |
Thank you @heitorlessa, now it looks much better |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #2099 +/- ##
========================================
Coverage 97.45% 97.45%
========================================
Files 146 146
Lines 6748 6767 +19
Branches 477 483 +6
========================================
+ Hits 6576 6595 +19
Misses 136 136
Partials 36 36
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Just need to finish the async and we can merge it ;) THANK YOU for spotting this subtle but important bug and taking the initiative all along. |
Done - just waiting for CI to confirm everything works as expected and I'll merge it. Took longer than expected as we had a bunch of tech debts to pay in test authoring - all cleaned up now. PS: Working on a better DX (backwards compatible) for Batch processing to reduce boilerplate in parallel: #2090. |
Thank you so much @LuckIlNe for kicking this off. Bunch of tech debts we've wanted to address so we took the liberty to do it too. Mypy/Static typing linters will no also no longer complain about the use of Merging! |
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
* develop: fix(batch): handle early validation errors for pydantic models (poison pill) aws-powertools#2091 (aws-powertools#2099) update changelog with latest changes docs(homepage): remove banner for end-of-support v1 (aws-powertools#2098) chore(deps-dev): bump aws-cdk-lib from 2.72.1 to 2.73.0 (aws-powertools#2097) chore(deps-dev): bump filelock from 3.10.7 to 3.11.0 (aws-powertools#2094) chore(deps-dev): bump coverage from 7.2.2 to 7.2.3 (aws-powertools#2092) chore(deps-dev): bump aws-cdk from 2.72.1 to 2.73.0 (aws-powertools#2093) chore(deps-dev): bump mypy-boto3-cloudformation from 1.26.60 to 1.26.108 (aws-powertools#2095) Signed-off-by: heitorlessa <[email protected]>
Issue number: #2091
Summary
Lambda shouldn't failure if there is at least one successful record and return {batchItemFailures: [...] } when we use pydantic model check. For resolution, checking model function has been moved under try section in batch processing for BatchProcessor and AsyncBatchProcessor classes
Changes
Move pydantic model check line under try section in batch processing.
User experience
Now only records which aren't pass pydantic modeling check will mark as failed records
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.