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

REST client considers the wrong environment variable for quarkus.rest-client."config-key".url #28088

Closed
derkork opened this issue Sep 20, 2022 · 4 comments · Fixed by #28174
Closed
Assignees
Labels
Milestone

Comments

@derkork
Copy link

derkork commented Sep 20, 2022

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 20.6.0 Darwin Kernel Version 20.6.0: Tue Feb 22 21:10:41 PST 2022; root:xnu-7195.141.26~1/RELEASE_X86_64 x86_64

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

@derkork derkork added the kind/bug Something isn't working label Sep 20, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 20, 2022

/cc @Sgitario, @cescoffier, @geoand

@geoand
Copy link
Contributor

geoand commented Sep 20, 2022

@radcortez what is the proper value for the env var here?

@radcortez
Copy link
Member

It should be QUARKUS_REST_CLIENT__MY_CLIENT__URL. Let me have a look.

@radcortez
Copy link
Member

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.

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.

4 participants