Skip to content

fix: idempotency timeout bug #1285

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 7 commits into from
Jul 17, 2023
Merged

fix: idempotency timeout bug #1285

merged 7 commits into from
Jul 17, 2023

Conversation

scottgerring
Copy link
Contributor

@scottgerring scottgerring commented Jul 13, 2023

Issue #, if available:
#1281

Description of changes:

Fixes a bug in idempotency where the processing of a idempotent record can become stalled after an earlier Lambda timeout.

Checklist

Breaking change checklist

RFC issue #:

  • Migration process documented
  • Implement 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.

@scottgerring scottgerring changed the title Fix idempotency timeout bug fix: idempotency timeout bug Jul 13, 2023
@pull-request-size pull-request-size bot added size/M and removed size/S labels Jul 13, 2023
@scottgerring
Copy link
Contributor Author

I've gone through all uses of the DataRecord constructor and DataRecord::getExpiryTimestamp to make sure there are no other unit mismatch surprises. I think this covers it!

@scottgerring scottgerring requested a review from jeromevdl July 13, 2023 10:56
@scottgerring scottgerring marked this pull request as ready for review July 13, 2023 10:56
@codecov-commenter
Copy link

codecov-commenter commented Jul 13, 2023

Codecov Report

Patch coverage: 60.00% and project coverage change: +0.24 🎉

Comparison is base (c7aedc4) 78.94% compared to head (40390f4) 79.19%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1285      +/-   ##
============================================
+ Coverage     78.94%   79.19%   +0.24%     
- Complexity      629      639      +10     
============================================
  Files            72       73       +1     
  Lines          2332     2360      +28     
  Branches        253      258       +5     
============================================
+ Hits           1841     1869      +28     
+ Misses          412      410       -2     
- Partials         79       81       +2     
Impacted Files Coverage Δ
...powertools/idempotency/persistence/DataRecord.java 73.17% <ø> (ø)
...lambda/powertools/parameters/DynamoDbProvider.java 80.32% <8.33%> (-3.01%) ⬇️
.../lambda/powertools/parameters/SecretsProvider.java 65.85% <10.00%> (-0.82%) ⬇️
...azon/lambda/powertools/parameters/SSMProvider.java 87.14% <70.00%> (+6.26%) ⬆️
...oftware/amazon/lambda/powertools/sqs/SqsUtils.java 79.72% <95.23%> (+4.72%) ⬆️
...mpotency/persistence/DynamoDBPersistenceStore.java 88.19% <100.00%> (+0.08%) ⬆️
...zon/lambda/powertools/parameters/ParamManager.java 77.77% <100.00%> (+0.85%) ⬆️
...ption/SkippedMessageDueToFailedBatchException.java 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@jeromevdl jeromevdl left a comment

Choose a reason for hiding this comment

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

few things to look at

Copy link
Contributor

@jeromevdl jeromevdl left a comment

Choose a reason for hiding this comment

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

good for me!

@scottgerring
Copy link
Contributor Author

Retested using powertools-examples-idempotency as well as the fixed tests in here. This is good to go.

@scottgerring scottgerring merged commit ba190dc into main Jul 17, 2023
@scottgerring scottgerring deleted the fix-idemp branch July 17, 2023 08:31
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.

3 participants