Skip to content

feat(idempotency): Add response hook feature #1814

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

Merged
merged 6 commits into from
Mar 28, 2025
Merged

feat(idempotency): Add response hook feature #1814

merged 6 commits into from
Mar 28, 2025

Conversation

phipag
Copy link
Contributor

@phipag phipag commented Mar 28, 2025

Issue #, if available: #1780

Description of changes:

This PR adds the possibility of creating a response hook in the Idempotency configuration that will be applied on all idempotent responses before returning.

Checklist

Breaking change checklist

N/A

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

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

Hey @phipag! overall it looks good for me. I just left 2 comments.

Also, please consider adding the workflows we have in TS, PY and dotnet: https://docs.powertools.aws.dev/lambda/python/latest/utilities/idempotency/#idempotency-request-flow

Copy link
Contributor

@hjgraca hjgraca left a comment

Choose a reason for hiding this comment

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

Looks good. Make sure to address Leandro's questions.

@phipag
Copy link
Contributor Author

phipag commented Mar 28, 2025

@leandrodamascena We have some diagrams already (see rendered preview docs: https://docs.powertools.aws.dev/lambda/java/preview/utilities/idempotency/#idempotency-request-flow).

I like more how they are arranged for example in the Python docs. All bundled in one section. Whereas they are distributed across the page in the Java docs.

I have in mind to review the docs anyway and will create another issue to track such updates.

@leandrodamascena leandrodamascena self-requested a review March 28, 2025 14:41
@phipag
Copy link
Contributor Author

phipag commented Mar 28, 2025

@leandrodamascena This is the tracker issue for the docs and I mapped individual sub-issues below this tracker -> #1352

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Support for Differentiating Cached and Regular Responses in Idempotency Handling for Accurate Metrics
3 participants