Skip to content

Conversation

@gsmet
Copy link
Member

@gsmet gsmet commented Oct 27, 2025

It started as a small quest to fix an issue detected by running the Quarkus CI build with IBM Semeru and I stumbled upon the fact that we had one test (LambdaWithHierarchyTest) relying on the fact that the method we wanted was the first method returned by getMethods(), which was clearly wrong and just pure luck.

In Semeru, the order in which the methods were returned wasn't the same and the test failed.

I worked on fixing the issue but I ended up relying on a LOT of reflection at runtime (see intermediary commit), which wasn't ideal.
I then decided to rewrite the whole thing using Jandex and it allowed me to reduce the usage of reflection to the case where we have a Collection type as we need to get the ParameterizedType from the method parameter and I wasn't sure about serializing it, even if I saw some elements in Redis were serializing a specific impl of ParameterType.

I let it at that as the new implementation should already be a lot better and tests pass both with Temurin and Semeru.

gsmet added 3 commits October 24, 2025 18:46
The handler method resolution was relying on the order in which methods
were returned by getMethods(), which is not guaranted at all.
This makes the extension fail with IBM Semeru for LambdaWithHierarchyTest.

The new implementation should be a lot more solid but is also doing a
lot more reflection calls.
My guess is that we should probably move this resolution to Jandex
We still have one reflection call if the input type is a collection but
we avoid reflection for everything else.
@gsmet
Copy link
Member Author

gsmet commented Oct 27, 2025

@zakkak you should be happy about this one as it further reduces the need for reflection for AWS Lambda.

I was surprised we don't have a reason for ReflectiveMethodBuildItem, should we add one?

@quarkus-bot
Copy link

quarkus-bot bot commented Oct 27, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit f9e7eb7.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant