-
Notifications
You must be signed in to change notification settings - Fork 407
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 flag in SqsFifoProcessor to enable continuous message processing #3954
feat(batch): add flag in SqsFifoProcessor to enable continuous message processing #3954
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #3954 +/- ##
===========================================
- Coverage 96.38% 96.31% -0.07%
===========================================
Files 214 215 +1
Lines 10030 10277 +247
Branches 1846 1914 +68
===========================================
+ Hits 9667 9898 +231
- Misses 259 271 +12
- Partials 104 108 +4 ☔ View full report in Codecov by Sentry. |
…id with failed messages
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
Of course, @rubenfonseca! Let's explore ways to refactor it for better readability and reduced cognitive load. |
@leandrodamascena I've pushed a suggestion, and kinda rewrote the whole FIFO processor. Instead of overriding the |
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 @rubenfonseca! This refactoring is impressive, and the code is much clearer now. However, I believe I've found a bug and would appreciate your insights on it.
Also, I think I need to review the tests because we didn't catch this bug in those tests.
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
@leandrodamascena ready for the next review |
Thanks @rubenfonseca! Everything is working as expected, and the codebase is so clean! I've only left two minor comments regarding imports, and then we're ready to merge. |
Quality Gate passedIssues Measures |
Issue number: #2981
Summary
Changes
This pull request introduces a new feature to the
SqsFifoProcessor
class, allowing for continuous message processing by adding a flag. With this enhancement, users can choose to maintain message processing without halting after an initial failure.User experience
payload.json
Before
AFTER
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.