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

chore: Add support for custom key prefixes in Idempotency utility #745

Merged

Conversation

hjgraca
Copy link
Contributor

@hjgraca hjgraca commented Feb 5, 2025

Please provide the issue number

Issue number: #703

Summary

Changes

This pull request introduces a new feature to allow custom prefixes for idempotency keys in the Idempotency utility. The changes include updates to the IdempotentAttribute class, the IdempotencyAspectHandler class, and various test cases to support and validate the new feature (including E2E tests).

New Feature: Custom Prefix for Idempotency Key

Persistence Store Configuration

Test Cases

User experience

Please share what the user experience looks like before and after this change

Checklist

Please leave checklist items unchecked if they do not apply to your change.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

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.

@auto-assign auto-assign bot requested a review from amirkaws February 5, 2025 18:44
@auto-assign auto-assign bot requested a review from sliedig February 5, 2025 18:44
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 5, 2025
@hjgraca hjgraca self-assigned this Feb 5, 2025
@github-actions github-actions bot added the internal Maintenance changes label Feb 5, 2025
Copy link

sonarqubecloud bot commented Feb 5, 2025

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.

Project coverage is 73.49%. Comparing base (fb7e6c3) to head (ffda1ec).
Report is 23 commits behind head on develop.

Files with missing lines Patch % Lines
...ls.Idempotency/Persistence/BasePersistenceStore.cs 94.44% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #745      +/-   ##
===========================================
+ Coverage    73.46%   73.49%   +0.02%     
===========================================
  Files          203      203              
  Lines         8181     8190       +9     
  Branches       878      879       +1     
===========================================
+ Hits          6010     6019       +9     
  Misses        1880     1880              
  Partials       291      291              
Flag Coverage Δ
unittests 73.49% <95.65%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@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.

Super nice @hjgraca! APPROVED

@hjgraca hjgraca merged commit 5f62f2c into aws-powertools:develop Feb 6, 2025
13 checks passed
@hjgraca hjgraca deleted the feature/idempotency-key-prefix branch February 6, 2025 15:19
@hjgraca hjgraca linked an issue Feb 6, 2025 that may be closed by this pull request
2 tasks
@github-actions github-actions bot added the pending-release Fix or implementation already in dev waiting to be released label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/idempotency internal Maintenance changes pending-release Fix or implementation already in dev waiting to be released size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tests
Projects
Status: Coming soon
Development

Successfully merging this pull request may close these issues.

Feature request: Idempotency prefix is susceptible to refactoring
2 participants