Closed making closed 1 month ago
It looks like this is an existing issue that surfaced with the changes for #958. The exception handling in adaptCallable
is lacking compared to what we have in doInvoke
. In this case the controller method does not return Callable and therefore previously it would have been invoked directly with the exception handled in doInvoke
. After #958, on Java 21+, we wrap blocking methods with Callable
transparently, and that's what exposed the issue.
Fixed via 33bdea95567e5b24b39bbdcc5b65adc193db98ed
After upgrading Spring Boot to 3.3.0-SNAPSHOT, I encountered an issue that seems related to #958 in Spring GraphQL, causing my tests to fail with the following stack trace. The tests pass with 3.3.0-RC1 and also pass if virtual threads are disabled.
https://github.com/categolj/blog-api/actions/runs/9154720818/job/25165762034?pr=268#step:5:827
This test attempts to check for Unauthorized access to a GraphQL endpoint that calls an authorized service with
@Authorized
. From the stack trace, it seems micrometer might also be involved.I was able to pass the test by modifying
InvocableHandlerMethodSupport#adaptCallable
as follows. This is probably unrelated to the support for virtual threads and is likely an existing issue that surfaced due to the recent changes.