Skip to content

feat: SQS Partial failure#100

Merged
heitorlessa merged 26 commits into
aws-powertools:developfrom
gmcrocetti:partial-sqs-batch
Sep 1, 2020
Merged

feat: SQS Partial failure#100
heitorlessa merged 26 commits into
aws-powertools:developfrom
gmcrocetti:partial-sqs-batch

Conversation

@gmcrocetti

Copy link
Copy Markdown
Contributor

#92 : SQS Partial batch

Description of changes:

Hi everyone ! Here's a very initial design proposal to work with batches. This draft intends to work as our communication channel to hear your toughts. Before putting more effort in everything that's missing (docs, tests, typing, etc) I look forward hearing opinions from issue's participants: @heitorlessa , @nmoutschen , @Nr18 .

Checklist

Breaking change checklist

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

@lgtm-com

lgtm-com Bot commented Aug 13, 2020

Copy link
Copy Markdown

This pull request introduces 1 alert when merging 6924519 into 40972d2 - view on LGTM.com

new alerts:

  • 1 for Signature mismatch in overriding method

@heitorlessa

Copy link
Copy Markdown
Contributor

@cakepietoast could you help review when you get a chance :)?

I'll finish mine tomorrow, and have bandwidth next week if you can't

@to-mc to-mc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the awesome contribution so far @gmcrocetti! Looks like its on the right track to me. I added a few inline comments, happy to take another look when we have tests/docs for the functionality.

Comment thread aws_lambda_powertools/utilities/batch/sqs.py Outdated
Comment thread aws_lambda_powertools/utilities/batch/sqs.py Outdated
Comment thread aws_lambda_powertools/utilities/batch/sqs.py Outdated
@gmcrocetti gmcrocetti requested a review from to-mc August 18, 2020 01:58
@gmcrocetti

Copy link
Copy Markdown
Contributor Author

Thanks for the awesome contribution so far @gmcrocetti! Looks like its on the right track to me. I added a few inline comments, happy to take another look when we have tests/docs for the functionality.

Thx for your fast review. I've left some replies :).

@Nr18

Nr18 commented Aug 18, 2020

Copy link
Copy Markdown

Currently on vacation I will have a more in-depth look next week, but in general I am missing docs and tests.

But I assume you concentrated on the implementation first?

@heitorlessa

Copy link
Copy Markdown
Contributor

hey @gmcrocetti don't worry about the docs, any basic text for us to understand the UX would be helpful - If you allow us to make commits directly to you fork, we can help you craft the docs ;). Implementation and tests are the most important

This is the first utility we launched yesterday ICYMI: https://awslabs.github.io/aws-lambda-powertools-python/utilities/parameters/

@gmcrocetti

gmcrocetti commented Aug 24, 2020

Copy link
Copy Markdown
Contributor Author

hey @gmcrocetti don't worry about the docs, any basic text for us to understand the UX would be helpful - If you allow us to make commits directly to you fork, we can help you craft the docs ;). Implementation and tests are the most important

This is the first utility we launched yesterday ICYMI: https://awslabs.github.io/aws-lambda-powertools-python/utilities/parameters/

Hi @heitorlessa , sorry to take so long, it was quite a busy week. I'm hoping to finish tests and docs this week (tomorrow in fact), is it possible to follow this schedule :) ?

I'll push my progress ASAP so you can follow. BTW, this link will help me a ton.

@heitorlessa

heitorlessa commented Aug 24, 2020 via email

Copy link
Copy Markdown
Contributor

@gmcrocetti

Copy link
Copy Markdown
Contributor Author

Yeap, you're totally right ! It wasn't touched by no means but I think we must at least discuss this point.

How can we proceed if we'll not be able to delete these failed records for both cases ? Do you have any idea ?

Even we don't tackle this right now, it's a good point because we may avoid design flaws.

@heitorlessa

heitorlessa commented Aug 24, 2020 via email

Copy link
Copy Markdown
Contributor

@gmcrocetti

Copy link
Copy Markdown
Contributor Author

Yes, makes a lot of sense. In fact, that's why I was working solely with the sqs processor. These async controllers are pretty awesome, and even smth "simple" like "destination on failure" helps a lot. A "tips" section would be great !
Thanks

@codecov-commenter

codecov-commenter commented Aug 25, 2020

Copy link
Copy Markdown

Codecov Report

Merging #100 into develop will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           develop      #100   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        28    +4     
  Lines          706       784   +78     
  Branches        67        72    +5     
=========================================
+ Hits           706       784   +78     
Impacted Files Coverage Δ
..._lambda_powertools/utilities/parameters/secrets.py 100.00% <ø> (ø)
aws_lambda_powertools/utilities/batch/__init__.py 100.00% <100.00%> (ø)
aws_lambda_powertools/utilities/batch/base.py 100.00% <100.00%> (ø)
...s_lambda_powertools/utilities/batch/middlewares.py 100.00% <100.00%> (ø)
aws_lambda_powertools/utilities/batch/sqs.py 100.00% <100.00%> (ø)
aws_lambda_powertools/logging/logger.py 100.00% <0.00%> (ø)
aws_lambda_powertools/logging/formatter.py 100.00% <0.00%> (ø)
... and 1 more

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 8da0cce...9caf3d1. Read the comment docs.

@Nr18 Nr18 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gmcrocetti nice implementation I left some questions/remarks hopefully you will find them helpful.

Comment thread aws_lambda_powertools/utilities/batch/base.py Outdated
Comment thread aws_lambda_powertools/utilities/batch/sqs.py Outdated
Comment thread aws_lambda_powertools/utilities/batch/sqs.py Outdated
Comment thread aws_lambda_powertools/utilities/batch/sqs.py Outdated
@gmcrocetti

Copy link
Copy Markdown
Contributor Author

@heitorlessa , finally did it ! Phewwww !! Waiting reviews. Thx

@gmcrocetti gmcrocetti marked this pull request as ready for review August 27, 2020 02:18

@Nr18 Nr18 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gmcrocetti nice work! Coming along nicely did spot a naming improvement and I believe a copy paste error

Comment thread aws_lambda_powertools/utilities/batch/middlewares.py
Comment thread docs/content/utilities/batch.mdx Outdated
Comment thread docs/content/utilities/batch.mdx Outdated
Comment thread docs/content/utilities/batch.mdx Outdated
Comment thread docs/content/utilities/batch.mdx Outdated
Comment thread docs/content/utilities/batch.mdx Outdated
Comment thread docs/content/utilities/batch.mdx Outdated

@heitorlessa heitorlessa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a huge improvement from the initial version - Thank you for all effort you've put in already

Made some comments to help clarify a few areas - I'm happy to contribute some docs later if you don't have the bandwidth, but the implementation itself looks solid.

I might make a comment on middlewares.py to reorganize that into a processor.py/something else I can't think of yet, but we can contribute to that later too, don't worry.

Comment thread docs/content/utilities/batch.mdx Outdated
Comment thread docs/content/utilities/batch.mdx Outdated
Comment thread docs/content/utilities/batch.mdx Outdated
Comment thread docs/content/utilities/batch.mdx Outdated
Comment thread aws_lambda_powertools/utilities/batch/middlewares.py Outdated
Comment thread docs/content/utilities/batch.mdx
Comment thread docs/content/utilities/batch.mdx Outdated
@gmcrocetti gmcrocetti requested a review from heitorlessa August 29, 2020 20:43
@heitorlessa heitorlessa added feature New feature or functionality and removed enhancement labels Aug 30, 2020

@Nr18 Nr18 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@heitorlessa

Copy link
Copy Markdown
Contributor

Thanks a lot @gmcrocetti for the changes - Much cleaner, and we appreciate very much all effort you've put on to this!

We're merging as-is. @cakepietoast will create another PR to clean up the docs for consistency, and will cut a 1.5.0 release on Friday that will contain this and other enhancements we've made ;)

@heitorlessa heitorlessa merged commit b28c47e into aws-powertools:develop Sep 1, 2020
@gmcrocetti

Copy link
Copy Markdown
Contributor Author

Happy to see it merged ! Thx for all support !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants