Skip to content
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(idempotency): BasePersistenceLayer, DynamoDBPersistenceLayer and configs #1376

Merged
merged 10 commits into from
Mar 30, 2023

Conversation

dreamorosi
Copy link
Contributor

@dreamorosi dreamorosi commented Mar 19, 2023

Description of your changes

This PR revisits the existing implementation of the DynamoDB persistence layer for Idempotency. The goal of this revision is aligning the implementation and feature set to the Powertools for Python version of this utility.

In doing so, I have also:

  • Implemented a new IdempotencyConfig class
  • Revisited and built upon the behavior of BasePersistenceLayer to include all the features and logic present in the Python version except for the local caching
  • Revisited & aggregated types
  • Revisited unit & added new tests for the items above

While working on this PR, I have also revisited the imports for all files in the utility, as well as updating dependencies, and other housekeeping tasks.

Note
I am aware that this PR is unusually big in terms of scope & diff. I appreciate your understanding in reviewing it in its entirety. Many of the lines in the diff were due to formatting or refactoring needed to make the utility conform with the conventions and structure of the rest of the project.

Once merged, this PR will close #1158, #1294, #1295, #1296, #1297, #1301, #1302

How to verify this change

Check the newly added unit tests and compare the implementation with the one from Powertools for Python.

Related issues, RFCs

Issue number: #1294

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding changes to the examples
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published
  • The PR title follows the conventional commit semantics

Breaking change checklist

Is it a breaking change?: NO

  • I have documented the migration process
  • I have added, implemented necessary 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.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

Copy link
Contributor

@am29d am29d left a comment

Choose a reason for hiding this comment

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

Only minor comments.

@dreamorosi dreamorosi force-pushed the 1294-dynamodb-persistence-layer branch from 1ccf9e7 to 932b909 Compare March 30, 2023 15:16
@dreamorosi dreamorosi merged commit f05cba8 into main Mar 30, 2023
@dreamorosi dreamorosi deleted the 1294-dynamodb-persistence-layer branch March 30, 2023 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment