quarkus
quarkus copied to clipboard
REST client considers the wrong environment variable for `quarkus.rest-client."config-key".url`
Describe the bug
I have set an environment QUARKUS_REST_CLIENT__MY_CLIENT__URL
variable set which is supposed to override the quarkus.rest-client."my-client".url
at runtime. The quarkus.rest-client."my-client".url
has a fallback setting in application.properties
.
Expected behavior
The REST client uses the URL from the environment variable. This works in Quarkus 2.11.1, but does not work in Quarkus 2.12.2.
Actual behavior
This happens in Quarkus 2.12.2:
The REST client ignores the environment variablee and uses the fallback setting in application.properties
. When I change the name of the environment variable to QUARKUS_REST_CLIENT_MY_CLIENT_URL
(note the missing extra underscores for the "
) then the value of the environment variable is used.
In Quarkus 2.11.1, everything works as expected.
How to Reproduce?
No response
Output of uname -a
or ver
Darwin
Output of java -version
openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.12.2
Build tool (ie. output of mvnw --version
or gradlew --version
)
Apache Maven 3.8.6
Additional information
No response
/cc @Sgitario, @cescoffier, @geoand
@radcortez what is the proper value for the env var here?
It should be QUARKUS_REST_CLIENT__MY_CLIENT__URL
. Let me have a look.
The issue here is that the KeyMap
for recorded default values is not handling quoted keys correctly in certain API calls. I'll fix this.