-
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
REST reactive: use ClientLogger bean, if present #33868
Conversation
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
|
cc @Sgitario |
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 would add a simple test case that ensures this works when:
- Injecting the REST Client via
@RestClient
- Programmatically using QuarkusRestClientBuilderImpl
- Programmatically using RestClientBuilderImpl
...ive/runtime/src/main/java/io/quarkus/rest/client/reactive/runtime/RestClientBuilderImpl.java
Outdated
Show resolved
Hide resolved
🙈 The PR is closed and the preview is expired. |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
(sorry for all the force pushes. i currently don't have a working local dev environment for quarkus and the builds in my github codespace keep dying with exit code 143, suspected SIGTERM) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@Sgitario I added both a test using |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Please, be sure you build the modules you have modified using the Maven command before pushing the commit to avoid formatting issues. For example, running Also, the linting issue with the documentation still stands. |
Sorry for the push-mess in this PR. For the doc linting issue: I added "TIP: " in front of it and followed the recommendation to replace "via" with "through". The Documentation CI build is successful. Or am i missing something else there? |
adds integration tests for ClientLogger
✔️ 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. |
@michalvavrik do you want to take another look before merging this one? |
thanks @Sgitario , |
Thanks for your patience, @Sgitario and @michalvavrik |
Thanks to you for your work! |
With
org.jboss.resteasy.reactive.client.api.ClientLogger
, there is already an api to implement a custom REST reactive client logger. For now, the only way to use it, is to set it while buildingorg.jboss.resteasy.reactive.client.impl.ClientBuilderImpl
manually. All other REST reactive clients fall back to usingorg.jboss.resteasy.reactive.client.logging.DefaultClientLogger
.This PR adds bean pickup logic: if a CDI bean for
ClientLogger
is found, it is used. Otherwise, useDefaultClientLogger
.As Arc is not a dependency in the
org.jboss.resteasy.reactive.client
context (and shouldn't be if i understand correctly), i added the pickup logic toio.quarkus.rest.client.reactive.runtime.RestClientBuilderImpl
, which in turn usesClientBuilderImpl
.But there is another place where
ClientBuilderImpl
is used:io.quarkus.keycloak.admin.client.reactive.runtime.ResteasyReactiveClientProvider
. So i added the pickup logic there as well.The solution was discussed here: #33332
cc @michalvavrik, @geoand