Skip to content

Maintenance: consolidate IdempotencyHandler implementation #1508

Closed
@dreamorosi

Description

@dreamorosi

Summary

The Idempotency utility heavily relies on a class called IdempotencyHandler. This component contains the implementation for the idempotency logic and is expected to be used by all other Idempotency frontends (aka higher-order function, middleware, decorators).

Currently the Middy middleware implementation for Idempotency doesn't use the IdempotencyHandler class fully, which causes some of the logic being duplicated. This tech debt was assumed because the IdempotencyHandler was modelled after the Python implementation, which didn't take in account the Middy lifecycle.

Why is this needed?

To reduce tech debt and avoid code duplication, which converts in maintenance overhead.

Which area does this relate to?

Idempotency

Solution

Modify the IdempotencyHandler so that it exposes more granular methods that will allow the Middy middleware to offer idempotency according to its programming model, without having to reimplement the same logic.

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippedidempotencyThis item relates to the Idempotency UtilityinternalPRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)

Type

No type

Projects

Status

Shipped

Relationships

None yet

Development

No branches or pull requests

Issue actions