-
Notifications
You must be signed in to change notification settings - Fork 429
feat(event_source): add support for tumbling windows in Kinesis and DynamoDB events #6658
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(event_source): add support for tumbling windows in Kinesis and DynamoDB events #6658
Conversation
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
@leandrodamascena |
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.
Hi @kiitosu! What an awesome PR! Thanks a lot for working on this.
Most of my feedback was about making the fields optional. These fields only exist when the client is using TumblingWindows, which is not true in most cases.
Please add support for DynamoDB as well 😄
aws_lambda_powertools/utilities/data_classes/kinesis_stream_event.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/data_classes/kinesis_stream_event.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/data_classes/kinesis_stream_event.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/data_classes/kinesis_stream_event.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/data_classes/kinesis_stream_event.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/data_classes/kinesis_stream_event.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/data_classes/kinesis_stream_event.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/data_classes/kinesis_stream_event.py
Outdated
Show resolved
Hide resolved
tests/unit/data_classes/required_dependencies/test_kinesis_stream_event.py
Show resolved
Hide resolved
No related issues found. Please ensure there is an open issue related to this change to avoid significant delays or closure. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6658 +/- ##
===========================================
- Coverage 96.12% 96.11% -0.02%
===========================================
Files 253 253
Lines 12104 12160 +56
Branches 902 904 +2
===========================================
+ Hits 11635 11687 +52
- Misses 369 371 +2
- Partials 100 102 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ent.py Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: kiitosu <[email protected]>
…ent.py Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: kiitosu <[email protected]>
…ent.py Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: kiitosu <[email protected]>
…ent.py Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: kiitosu <[email protected]>
…ent.py Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: kiitosu <[email protected]>
…ent.py Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: kiitosu <[email protected]>
…ent.py Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: kiitosu <[email protected]>
…ent.py Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: kiitosu <[email protected]>
…ent.py Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: kiitosu <[email protected]>
…ent.py Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: kiitosu <[email protected]>
…ent.py Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: kiitosu <[email protected]>
…ent.py Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: kiitosu <[email protected]>
@leandrodamascena |
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 @kiitosu! We are almost there! Just a small fix and I'll run the CI.
Thanks for addressing all the feedback.
aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py
Outdated
Show resolved
Hide resolved
…event.py Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: kiitosu <[email protected]>
…event.py Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: kiitosu <[email protected]>
…event.py Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: kiitosu <[email protected]>
@leandrodamascena |
Hey @kiitosu! I'll merge this PR tomorrow! Thanks for accepting and addressing all the feedback! 🏅 |
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
Issue number: #6627
Summary
Changes
Added properties to support tumbling windows in
KinesisStreamEvent
:window
state
shard_id
event_source_arn
is_final_invoke_for_window
is_window_terminated_early
User experience
Previously,
KinesisStreamEvent
did not support tumbling window properties, so users could not use it with tumbling windows.With this change, users can now use
KinesisStreamEvent
in Lambda functions that process tumbling window events.Checklist
If your change doesn't seem to apply, please leave them unchecked.
This is not a breaking change.
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.