-
Notifications
You must be signed in to change notification settings - Fork 90
feat(v2): GraalVM support for parameters module #1824
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
base: v2
Are you sure you want to change the base?
feat(v2): GraalVM support for parameters module #1824
Conversation
I tried to follow the guide as mentioned by https://github.com/aws-powertools/powertools-lambda-java/blob/v2/GraalVM.md which helped a lot with generating the meta data. However I do wonder if we need all the metadata generated by the GraalVM agent. In on of my projects where I used v1 of Powertools I only needed the following snippet to get the SecretsProvider to work:
Now we have all sorts of java internal classes or classes coming from other libraries or the JVM, which I don't think we need? Shouldn't they be handled by the corresponding projects? I'm by no means a GraalVM expert, but I always understood it in such a way that metadata in a provided library only contains metadata about its own classes and resources which otherwise can't be reached. |
Hi @jreijn, I just review your changes and you did an amazing job 🚀 – especially cleaning up the test scoped dependencies in the generated metadata files. This helped us a lot. I just verified that unit tests against the native image pass, which they do ✅ Before we go ahead merging this PR, I would love to do two things:
I am happy to also update the example and don't want to cause more work on your end. But let me know if you like to do it. Regarding your comment:
You are absolutely right here. Since we run the metadata generation via unit tests (which is uncommon) there is a risk of including "too much" metadata and this is something we can optimize in the future. This is also why the manual cleanup is needed. The unit tests are good candidate for now since they have pretty good coverage. One way to address this which I tested was including a filter on the GraalVM tracing agent to only generate metadata for the library itself and not dependencies. However, this led to two issues:
Having said that, there is a lot of potential on improving this and before going to production with It seems like in the parameters example that you also tested in |
@phipag thanks for the feedback! With regards to the two open items:
With regard to the reflection metadata I see your point. I'm fine with leaving it for now and improving it later. Once we get to that point I would love to brainstorm a bit about it and see how I can contribute. |
Thanks @jreijn, this sounds like a good plan. Awesome that you would like to update the example as well! I'll be waiting for your update here and try to review it promptly. Regarding the roadmap update, I will take care of this as part of a separate PR since I am already working on a different documentation update. Next steps: Wait for |
|
Issue #, if available: #1833
Description of changes:
Introduced GraalVM metadata for all submodules of the parameters module:
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.