-
Notifications
You must be signed in to change notification settings - Fork 421
feat(batch): add support to SQS FIFO queues (SqsFifoPartialProcessor) #1934
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 support to SQS FIFO queues (SqsFifoPartialProcessor) #1934
Conversation
08f4601
to
7686381
Compare
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.
This is great!! Made some initial comments and spotted two issues. After lunch, I'll look over docs and tests.
Thank you @rubenfonseca <3
aws_lambda_powertools/utilities/batch/sqs_fifo_partial_processor.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/batch/sqs_fifo_partial_processor.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/batch/sqs_fifo_partial_processor.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/batch/sqs_fifo_partial_processor.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/batch/sqs_fifo_partial_processor.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/batch/sqs_fifo_partial_processor.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/batch/sqs_fifo_partial_processor.py
Outdated
Show resolved
Hide resolved
Codecov ReportBase: 97.45% // Head: 97.43% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #1934 +/- ##
===========================================
- Coverage 97.45% 97.43% -0.02%
===========================================
Files 144 146 +2
Lines 6629 6660 +31
Branches 475 478 +3
===========================================
+ Hits 6460 6489 +29
- Misses 132 134 +2
Partials 37 37
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 at Codecov. |
# GIVEN | ||
first_record = SQSRecord(sqs_event_factory("success")) | ||
second_record = SQSRecord(sqs_event_factory("fail")) | ||
# this would normally suceed, but since it's a FIFO queue, it will be marked as failure |
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.
loved this comment. thank you for your great attention to detail @rubenfonseca
Co-authored-by: Heitor Lessa <[email protected]> Signed-off-by: Ruben Fonseca <[email protected]>
Signed-off-by: Heitor Lessa <[email protected]>
Issue number: #1927
Summary
Changes
This PR adds support for SQS FIFO queues on the Batch Processing utility.
From docs:
User experience
Before this change, using the
BatchProcessor
with an SQS FIFO would result into undefined behaviour, as we were still continuing to process records after the first failure.Using the new specialized class
SqsFifoPartialProcessor
makes the utility safe to use with SQS FIFO.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.