Skip to content

fix: remove DeleteMessageBatch call to SQS api if there are no messages to delete #170

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

Merged
merged 1 commit into from
Sep 21, 2020

Conversation

to-mc
Copy link
Contributor

@to-mc to-mc commented Sep 21, 2020

Issue #, if available: #169

Description of changes: Add a check to make sure there are messages to delete before calling SQS DeleteMessageBatch API.

Checklist

Breaking change checklist

RFC issue #:

  • Migration process documented
  • Implement warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter
Copy link

codecov-commenter commented Sep 21, 2020

Codecov Report

Merging #170 into develop will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           develop      #170      +/-   ##
============================================
+ Coverage    99.90%   100.00%   +0.09%     
============================================
  Files           52        52              
  Lines         2151      2153       +2     
  Branches        96        97       +1     
============================================
+ Hits          2149      2153       +4     
+ Misses           1         0       -1     
+ Partials         1         0       -1     
Impacted Files Coverage Δ
aws_lambda_powertools/utilities/batch/sqs.py 100.00% <100.00%> (ø)
...ambda_powertools/utilities/validation/validator.py 100.00% <0.00%> (+9.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b654ca6...7dc3379. Read the comment docs.

@to-mc to-mc added area/utilities bug Something isn't working labels Sep 21, 2020
@to-mc to-mc merged commit 52314e6 into develop Sep 21, 2020
@to-mc to-mc deleted the fix/sqs_batch_only_failures branch September 21, 2020 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants