powertools-lambda-java icon indicating copy to clipboard operation
powertools-lambda-java copied to clipboard

feat(idempotency): handle lambda timeout scenarios for INPROGRESS records

Open jeromevdl opened this issue 3 years ago • 0 comments

Issue #, if available: https://github.com/awslabs/aws-lambda-powertools-python/issues/1038

Description of changes:

Using the same mechanism as python to handle functions timeout: see https://github.com/awslabs/aws-lambda-powertools-python/pull/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 tests

WIP: To test this feature properly, we need an integration test with real function timeout. I've started to implement integration 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

  • [x] Meet tenets criteria
  • [x] Update tests
  • [ ] Update docs ==> doc is not updated yet (PR in draft)
  • [x] PR title follows conventional commit semantics

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.

jeromevdl avatar Aug 05 '22 14:08 jeromevdl