Skip to content
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

interceptor bindings on RestClient interfaces don't work with RestClient Reactive #22764

Closed
Ladicek opened this issue Jan 10, 2022 · 3 comments · Fixed by #22853
Closed

interceptor bindings on RestClient interfaces don't work with RestClient Reactive #22764

Ladicek opened this issue Jan 10, 2022 · 3 comments · Fixed by #22853
Assignees
Labels
Milestone

Comments

@Ladicek
Copy link
Contributor

Ladicek commented Jan 10, 2022

Describe the bug

If I have a RestClient interface like this:

@RegisterRestClient(baseUri = "http://localhost:8080")
@CircuitBreaker(requestVolumeThreshold = 4)
public interface HelloClient {
    @GET
    @Path("/ft-hello")
    String hello();
}

and use RestClient Reactive together with Fault Tolearnce, the circuit breaker doesn't work. If I put the @CircuitBreaker annotation on the hello method, the circuit breaker works just fine.

This is caused by RestClient Reactive not copying annotations from the interface itself to the generated class (though annotations from RestClient methods are copied to the generated methods).

Expected behavior

Interceptor bindings declared on the RestClient interface itself work with RestClient Reactive.

Actual behavior

Interceptor bindings declared on the RestClient interface itself don't work with RestClient Reactive.

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@Ladicek Ladicek self-assigned this Jan 10, 2022
@Ladicek
Copy link
Contributor Author

Ladicek commented Jan 10, 2022

Interesting twist: the generated class extends RestClientReactiveCDIWrapperBase, which defines a few methods. In a naive implementation, these methods would get intercepted as well, and that should not happen.

@Ladicek
Copy link
Contributor Author

Ladicek commented Jan 10, 2022

#22774 will help with that problem. I have a fix ready, but it needs to wait for that PR.

@Ladicek
Copy link
Contributor Author

Ladicek commented Jan 13, 2022

#22853 will fix this.

@quarkus-bot quarkus-bot bot added this to the 2.7 - main milestone Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant