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

Feature request: Provide idempotency at function level (via wrapper function and decorator) (FR2) #1096

Closed
2 of 4 tasks
ijemmy opened this issue Sep 29, 2022 · 4 comments
Closed
2 of 4 tasks
Assignees
Labels
completed This item is complete and has been merged/shipped feature-request This item refers to a feature request for an existing or new utility idempotency This item relates to the Idempotency Utility

Comments

@ijemmy
Copy link
Contributor

ijemmy commented Sep 29, 2022

Description of the feature request

Problem statement
Library users want to add idempotency attribute to the Lambda handler.

Check the design spec for details.

Summary of the feature

  • Provide two interface (wrapper function and decorator) to make a Lambda idempotent
  • Cover edge cases described in the design spec
  • Provide a DynamoDB persistent layer for keeping idempotency records
  • Provide a base class for persistent layer. Library users can extend to make implementation on different storage.

Code examples
See the design spec

Story Checklist (for tracking progress)

  • As a developer, I would like to implement the Dynamo persistence layer
    • Dynamo specific interaction definitions
  • As a developer, I would like to implement the persistence base layer
    • Base class that will handle creating the hash, expiry date, and orchestration to the implementing subclass persistence layer
  • As a developer, I would like to implement the idempotency handler/wrapper
    • Defines core idempotency logic: saving in progress records conditionally, calling the function that is being made idempotent via a wrapper/decorator, updating idempotency records when complete, deleting idempotency records in case of error
  • Check if we can remove the unknown type (See comment https://github.com/awslabs/aws-lambda-powertools-typescript/pull/1110/files/0ec830102bce74a6e423cb29dc102ca47f8fc1fe#r1009618833)

Definition of done

  • Include unit tests with 100% code coverage
  • Code documentation (TS doc) on classes and public methods

Related issues, RFCs

#447

@ijemmy ijemmy added triage This item has not been triaged by a maintainer, please wait idempotency This item relates to the Idempotency Utility feature and removed triage This item has not been triaged by a maintainer, please wait labels Sep 29, 2022
@ijemmy
Copy link
Contributor Author

ijemmy commented Sep 29, 2022

@jeffrey-baker-vg FYI.

Let's use this issue for tracking progress and links to PR.

@saragerion saragerion added this to the Idempotency milestone Sep 29, 2022
@ijemmy ijemmy changed the title Feature (idempotency): Provide idempotency at function level (via wrapper function and decorator) (FR1) Feature (idempotency): Provide idempotency at function level (via wrapper function and decorator) (FR2) Nov 11, 2022
@ijemmy
Copy link
Contributor Author

ijemmy commented Nov 11, 2022

@dreamorosi dreamorosi added feature-request This item refers to a feature request for an existing or new utility confirmed The scope is clear, ready for implementation and removed feature labels Nov 13, 2022
@dreamorosi dreamorosi changed the title Feature (idempotency): Provide idempotency at function level (via wrapper function and decorator) (FR2) Feature request: Provide idempotency at function level (via wrapper function and decorator) (FR2) Nov 14, 2022
@saragerion
Copy link
Contributor

Closing this issue as we will break down the unit of work different ones.

@github-actions
Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@dreamorosi dreamorosi moved this from Coming soon to Closed in AWS Lambda Powertools for TypeScript Feb 17, 2023
@dreamorosi dreamorosi added completed This item is complete and has been merged/shipped and removed confirmed The scope is clear, ready for implementation labels Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed This item is complete and has been merged/shipped feature-request This item refers to a feature request for an existing or new utility idempotency This item relates to the Idempotency Utility
Projects
None yet
Development

No branches or pull requests

3 participants