-
Notifications
You must be signed in to change notification settings - Fork 90
feature: Idempotency module #717
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
feature: Idempotency module #717
Conversation
...src/main/java/software/amazon/lambda/powertools/idempotency/internal/IdempotencyHandler.java
Outdated
Show resolved
Hide resolved
...y/src/main/java/software/amazon/lambda/powertools/idempotency/internal/IdempotentAspect.java
Show resolved
Hide resolved
...src/main/java/software/amazon/lambda/powertools/idempotency/internal/IdempotencyHandler.java
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Project seems to have failing build when build on M1 Mac. Looks like the native lib does not support it ? Can be a problem
Related post |
I would recommend not to use the library which is in preview. It might be a an issue in adoption as well. We can definitely create a issue to upgrade to CRT once its out as GA |
Yes I had the issue, I'm on M1. It works using another JDK (x86 64-bit):
|
.../src/main/java/software/amazon/lambda/powertools/idempotency/persistence/cache/LRUCache.java
Outdated
Show resolved
Hide resolved
...empotency/src/main/java/software/amazon/lambda/powertools/idempotency/IdempotencyConfig.java
Show resolved
Hide resolved
Hmm I didnt try this specific version, But any other way not to force developing module on a specific java version for M1s ? I dont think its ideal to force a specific version. I am using latest corretto java 8. If there is no other way of configuring things differently, then may be we should re consider how the tests are written ? |
I will have a look at the comments on the issue, see if there are alternative solutions. Happy to hear if you have other ideas on how to test DynamoDB locally without Dynamodb Local. Docker? I thought about that initially, but I remember having issues on Github as build are already executed in docker (docker in docker is often an issue). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall UX looks solid IMO.
I have few suggestions and nit picks, but it looks nice. Have a look and see if you agree.
Also we need to bring in module under CI/CD via git actions and include new module in all the workflow files where relevant.
...ain/java/software/amazon/lambda/powertools/idempotency/persistence/BasePersistenceStore.java
Outdated
Show resolved
Hide resolved
...ilities/src/main/java/software/amazon/lambda/powertools/utilities/jmespath/JsonFunction.java
Outdated
Show resolved
Hide resolved
...tware/amazon/lambda/powertools/idempotency/exceptions/IdempotencyConfigurationException.java
Outdated
Show resolved
Hide resolved
...src/main/java/software/amazon/lambda/powertools/idempotency/internal/IdempotencyHandler.java
Show resolved
Hide resolved
...java/software/amazon/lambda/powertools/idempotency/persistence/DynamoDBPersistenceStore.java
Outdated
Show resolved
Hide resolved
import java.util.Map; | ||
import java.util.stream.Collectors; | ||
|
||
public class AppIdempotency implements RequestHandler<APIGatewayProxyRequestEvent, APIGatewayProxyResponseEvent> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would avoid anything new to the examples project. see #726.
it will be great to have a working app with demo showcased here instead https://github.com/aws-samples/aws-lambda-powertools-examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can i just let it here and also add it to the other repo, now that it's done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean if you want to leave it here for now thats fine, as long as its added in the example repo too. Eventually examples folder will be gone from the project. We are tracking this against this issue #732
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sample is created, see PR aws-samples/aws-lambda-powertools-examples#14
...src/main/java/software/amazon/lambda/powertools/idempotency/internal/IdempotencyHandler.java
Outdated
Show resolved
Hide resolved
.../test/java/software/amazon/lambda/powertools/idempotency/persistence/cache/LRUCacheTest.java
Outdated
Show resolved
Hide resolved
.../test/java/software/amazon/lambda/powertools/idempotency/internal/IdempotencyAspectTest.java
Outdated
Show resolved
Hide resolved
Move ObjectMapper and JMESPath config to a new module, to be reused by other powertools modules
14c6371
to
1803bb9
Compare
@msailes @pankajagrawal16 If you are ok with the code, I will create the doc, so we have everything in the same PR. I will also create (copy) the example in the other repo. |
It looks good to me that we can start writing docs for sure. Issue related to building module on M1 mac with a specific java version still remains rite ? If we dont have an alternate solution for it now, I would say document rationale, related issues and workaround in the readme for I can use the same steps to validate if it works on my system. Sounds good ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs looks solid too now. Some minor suggestion
...empotency/src/main/java/software/amazon/lambda/powertools/idempotency/IdempotencyConfig.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me. @msailes Would you like to give a pair of 👀 to the docs as well ?
...empotency/src/main/java/software/amazon/lambda/powertools/idempotency/IdempotencyConfig.java
Outdated
Show resolved
Hide resolved
- add installation guide - sam template indentation - local cache disabled by default - + minors changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fantastic!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Issue #, if available: #515
Description of changes:
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.