-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Read client configuration directly from Config rather than via @ConfigRoot #21530
Read client configuration directly from Config rather than via @ConfigRoot #21530
Conversation
72af106
to
58b3c3b
Compare
Hello @radcortez @michalszynkiewicz , this is my proposal on how to modify the rest client configuration. |
...t/src/test/java/io/quarkus/restclient/configuration/RestClientOverrideRuntimeConfigTest.java
Show resolved
Hide resolved
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 58b3c3b
Failures⚙️ JVM Tests - JDK 11 #- Failing: extensions/smallrye-reactive-messaging-kafka/deployment integration-tests/mongodb-client
! Skipped: integration-tests/kafka-oauth-keycloak integration-tests/kafka-sasl-elytron integration-tests/kubernetes/quarkus-standard-way-kafka and 2 more 📦 extensions/smallrye-reactive-messaging-kafka/deployment✖
📦 integration-tests/mongodb-client✖
⚙️ JVM Tests - JDK 17 #- Failing: integration-tests/mongodb-client
📦 integration-tests/mongodb-client✖
⚙️ Native Tests - Cache #- Failing: integration-tests/cache
📦 integration-tests/cache✖
⚙️ Native Tests - HTTP #- Failing: integration-tests/rest-client
📦 integration-tests/rest-client✖
✖
✖
✖
✖
⚙️ Native Tests - Main #- Failing: integration-tests/main
📦 integration-tests/main✖
✖
✖
✖
✖
✖
✖
✖
✖
✖
✖
✖
✖
✖
✖
✖
⚙️ Native Tests - Misc3 #- Failing: integration-tests/smallrye-opentracing
📦 integration-tests/smallrye-opentracing✖
✖
⚙️ Native Tests - Misc4 #- Failing: integration-tests/opentelemetry
📦 integration-tests/opentelemetry✖
✖
✖
✖
✖
✖
✖
✖
✖
⚙️ Native Tests - Security2 #- Failing: integration-tests/oidc-client integration-tests/oidc-client-wiremock integration-tests/oidc-token-propagation
📦 integration-tests/oidc-client✖
✖
✖
✖
📦 integration-tests/oidc-client-wiremock✖
✖
✖
✖
📦 integration-tests/oidc-token-propagation✖
✖
✖
⚙️ Native Tests - Security3 #- Failing: integration-tests/smallrye-jwt-token-propagation
📦 integration-tests/smallrye-jwt-token-propagation✖
✖
|
I guess the CI is not happy :( |
Yes, I will be looking into that :). |
58b3c3b
to
dfa72ec
Compare
CI looks OK now. |
I guess the only downside is that the config documentation is not going to be auto-generated anymore. Maybe we can keep the |
I didn't thought of that. I will put the annotations back in (hopefully that's enough for the docs generation to keep working). |
Since everything is Optional, it should be ok. |
@radcortez I'll leave it to you to merge this |
dfa72ec
to
e7642de
Compare
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building e7642de
Failures⚙️ Initial JDK 11 Build #- Failing: extensions/resteasy-classic/rest-client/config
! Skipped: devtools/bom-descriptor-json docs extensions/grpc/deployment and 109 more 📦 extensions/resteasy-classic/rest-client/config✖ |
...rather than via `@ConfigRoot` This should help in situations when REST Client config is obtained from a vault ConfigSource, which doesn't list it's contents when `ConfigSource#getPropertyNames()` is called. This causes the configuration to not be included in the `@ConfigRoot` instance.
e7642de
to
03ab336
Compare
@gsmet Can this be backported to the next 2.5 release? All our projects are stuck with 2.3.1.Final because of the rest-client issues fixed by this PR. |
If this is backported, following PR should be backported too: #21709 |
This should make it possible to read REST client configuration from vaults, which currently doesn't work due to the fact that vault config sources do not list their contents when
ConfigSource#getPropertyNames()
is called. This causes the properties from vaults to not being included in@ConfigRoot
instances.Related to #21348
RestClientsConfig
#21348quarkus.http.test-port
with rest-client not working with 2.4.1 #21332