-
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
Strict config lookup for the REST Client #43345
Conversation
41c340b
to
425c91d
Compare
18216d0
to
030a2b6
Compare
030a2b6
to
66fab28
Compare
🎊 PR Preview de27583 has been successfully built and deployed to https://quarkus-pr-main-43345-preview.surge.sh/version/main/guides/
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
66fab28
to
d4a650a
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
d4a650a
to
5c62c82
Compare
Status for workflow
|
Status for workflow
|
Follow up #42932
SmallRye Config now has the ability to add a
@WithKeys
annotation to aMap
mapping. This allows us to provide the list of keys aMap
must load. In the case of the REST Client, these keys are known during build time, so we can set them to be loaded during runtime with the following benefits:This PR is a breaking change . Currently, to populate a REST Client configuration, we query the following configuration names:
quarkus.rest-client."[FQN]".*
quarkus.rest-client.[Simple Class Name].*
quarkus.rest-client."[Simple Class Name]".*
quarkus.rest-client.[Config key from @RegisterRestClient].*
quarkus.rest-client."[Config key from @RegisterRestClient]".*
[FQN]/mp-rest/*
[Config key from @RegisterRestClient]/mp-rest/*
Users can mix all of these in their configuration. The final configuration is a merge of all names.
This PR will selectively add which fallbacks are required. For instance, if
@RegisterRestClient#configKey
is absent, we don't include fallbacks for that style name. We don't include an unquoted fallback if theconfigKey
is multi-segments. This should help reduce the number of lookups, but there are still too many combinations for little value.We may want to consider removing the
[Simple Class Name]
and"[Simple Class Name]"
lookups. Or merge it withconfigKey
, as ifconfigKey
is absent use[Simple Class Name]
; if not, useconfigKey
. In the documentation, I couldn't find any references to[Simple Class Name]
to configure the REST Client: https://quarkus.io/guides/rest-client#create-the-configurationBreaking changes:
Map
always uses the FQN of the REST Client. Before, it would use all the keys found, even if related with the same REST Client duplicating (or more) entries.quarkus.rest.client.max-redirects
andquarkus.rest.client.multipart-post-encoder-mode