feat(idempotency): handle lambda timeout scenarios for INPROGRESS records#933
Merged
msailes merged 9 commits intoaws-powertools:masterfrom Dec 14, 2022
Merged
Conversation
b8e3d65 to
3387653
Compare
Contributor
Author
|
I removed the integration tests part, so that this PR focuses on the fix for idempotency. @msailes @rubenfonseca can you have a look at this one? I still need to update the doc. |
Contributor
|
I've checked the code and everything on the logic level made sense to me :) I'm just a little bit rust on the Java syntax 😅 Thanks @jeromevdl! |
msailes
reviewed
Nov 2, 2022
.../test/java/software/amazon/lambda/powertools/idempotency/internal/IdempotencyAspectTest.java
Show resolved
Hide resolved
msailes
reviewed
Nov 2, 2022
.../test/java/software/amazon/lambda/powertools/idempotency/internal/IdempotencyAspectTest.java
Outdated
Show resolved
Hide resolved
msailes
reviewed
Nov 2, 2022
.../test/java/software/amazon/lambda/powertools/idempotency/internal/IdempotencyAspectTest.java
Outdated
Show resolved
Hide resolved
msailes
reviewed
Nov 2, 2022
...java/software/amazon/lambda/powertools/idempotency/persistence/DynamoDBPersistenceStore.java
Outdated
Show resolved
Hide resolved
msailes
reviewed
Nov 2, 2022
...ain/java/software/amazon/lambda/powertools/idempotency/persistence/BasePersistenceStore.java
Outdated
Show resolved
Hide resolved
msailes
reviewed
Nov 2, 2022
...empotency/src/main/java/software/amazon/lambda/powertools/idempotency/IdempotencyConfig.java
Outdated
Show resolved
Hide resolved
…ls#967) Bumps `aws.sdk.version` from 2.18.4 to 2.18.7. Updates `software.amazon.awssdk:bom` from 2.18.4 to 2.18.7 - [Release notes](https://github.com/aws/aws-sdk-java-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-java-v2/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-java-v2@2.18.4...2.18.7) Updates `http-client-spi` from 2.18.4 to 2.18.7 - [Release notes](https://github.com/aws/aws-sdk-java-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-java-v2/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-java-v2@2.18.4...2.18.7) Updates `url-connection-client` from 2.18.4 to 2.18.7 --- updated-dependencies: - dependency-name: software.amazon.awssdk:bom dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: software.amazon.awssdk:http-client-spi dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: software.amazon.awssdk:url-connection-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…rtools#960) * add precedence for the envelope over built-in types * cannot use same envelope for in and out * remove extra new line * handle event field names properly ex: SQS Records with big R * more explicit exception message
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available: aws-powertools/powertools-lambda-python#1038
Description of changes:
Using the same mechanism as python to handle functions timeout: see aws-powertools/powertools-lambda-python#1387, adding a timestamp in dynamoDB for the expected time of the function timeout. When the item is INPROGRESS, we check if this timestamp is in the past, to let the execution go and avoid blocking.
Adding integration testsWIP: To test this feature properly, we need an integration test with real function timeout. I've started to implementintegration tests, with the deployment of some infrastructure (based on python integration tests).This is not finished (still have some error with log4j when running the function...).Checklist
Breaking change checklist
RFC issue #:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.