-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Ensure that Amazon Lambda uses the ObjectMapper bean when available #7508
Conversation
...azon-lambda/runtime/src/main/java/io/quarkus/amazon/lambda/runtime/AmazonLambdaRecorder.java
Show resolved
Hide resolved
8eb25b2
to
0995bb4
Compare
Validated as working on my build, post rolling in the changes. Nice one! |
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'm a bit torn about that one. I wonder if it's such a good idea to reuse the object mapper if it's one used for a very specific context and that needs a very specific configuration.
Can we discuss it? (Marking it as Request changes so that we have a discussion before merging)
Sure, let's talk tomorrow |
Maybe this should have a specific Qualifier so you have a bean that is just the object mapper for Lambda. |
The idea of using the bean from Arc is that it's been properly configured with various Jackson modules automatically by Quarkus. @gsmet @stuartwdouglas The alternative would be to create a second ObjectMapper bean for Lamdba under the covers, that applies the same modules but also applies the few extra settings that Lambda needs. Like Stuart said this would have a qualifier and we would use that qualifier when pulling the bean out of Arc in the Lambda Recorder code. |
Actually I think the current implementation is probably fine. The would be the main use case for using the mapper with AWS lambda anyway, so any customisers the users provide would be expected to be used for this. I don't think we need to complicate it any further. |
@gsmet are you OK with this? |
Yes, let's move on then. |
This was the result of me looking into: #6041 (comment)