-
Notifications
You must be signed in to change notification settings - Fork 29
feat: add support for ReturnValuesOnConditionCheckFailure in Idempotency #930
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
base: develop
Are you sure you want to change the base?
feat: add support for ReturnValuesOnConditionCheckFailure in Idempotency #930
Conversation
…ng record details and improve error handling in persistence layer
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #930 +/- ##
===========================================
+ Coverage 77.28% 77.31% +0.03%
===========================================
Files 272 272
Lines 10875 10899 +24
Branches 1278 1281 +3
===========================================
+ Hits 8405 8427 +22
- Misses 2054 2055 +1
- Partials 416 417 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Hey Henrique, I'll review this tomorrow - thanks for working on this! |
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.
Just one question - if the question is not valid, feel free to resolve and merge.
libraries/src/AWS.Lambda.Powertools.Idempotency/Persistence/BasePersistenceStore.cs
Outdated
Show resolved
Hide resolved
…xistingRecord method
…xistingRecord tests
|
Issue number: #803
Summary
Changes
This pull request enhances the idempotency handling in the AWS Lambda Powertools library by introducing new functionality for processing existing records and improving exception handling. The changes include updates to the
IdempotencyItemAlreadyExistsException
class, modifications to the persistence layer for better validation and caching, and the addition of comprehensive tests to ensure correctness.Enhancements to idempotency handling:
Improved exception handling in
IdempotencyItemAlreadyExistsException
:Record
property to store the existing record details when an exception is thrown.DynamoDBPersistenceStore
to populate theRecord
property in the exception when a conditional check fails, enabling downstream validation and caching.New method for processing existing records in
BasePersistenceStore
:ProcessExistingRecord
to validate an existing record against the current data payload and optionally cache it locally. This ensures data consistency and improves performance when local caching is enabled.IdempotencyAspectHandler
to utilize theProcessExistingRecord
method for handling exceptions more effectively.User experience
Checklist
Please leave checklist items unchecked if they do not apply to your change.
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.