question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

quarkus-rest-client-reactive related configuration properties problem

See original GitHub issue

Describe the bug

Seems to be related to this one

Tests ignore the %test properties for rest clients and try to use the %prod ones instead. So having properties like these causes a failure in test that try to expand the prod value

%prod.external-service/mp-rest/url=${EXTERNAL_SERVICE_URL}
%test.external-service/mp-rest/url=http://localhost:8000

Expected behavior

Tests should use the correct profile’s properties of rest clients

Actual behavior

Tests use the prod profile’s properties of rest clients

How to Reproduce?

Reproducer: https://github.com/nikosk686/quarkus-config-properties-error-showcase

Try to run the test on the example linked above. The error is:

Caused by: io.quarkus.runtime.configuration.ConfigurationException: One or more configuration errors have prevented the application from starting. The errors are: - SRCFG00011: Could not expand value EXTERNAL_SERVICE_URL in property %prod.external-service/mp-rest/url

Workaround, add a default value %prod.external-service/mp-rest/url=${EXTERNAL_SERVICE_URL:} and the test passes

Output of uname -a or ver

Linux dell-desktop 5.10.0-1051-oem #53-Ubuntu SMP Thu Oct 28 08:11:53 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

correto-11 version 11.0.13

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.4.2.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 7.3

Additional information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
TomasHofmancommented, Nov 22, 2021

I will have a look.

0reactions
TomasHofmancommented, Dec 11, 2021

@BonomoAlessandro I can’t reproduce your problem with 2.5.1.Final neither with current main. Can you open a new issue with a small reproducer if you still experience it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using the REST Client Reactive - Quarkus
This guide explains how to use the REST Client Reactive in order to interact with REST APIs. ... Your configuration properties quarkus.rest-client.
Read more >
Using the REST Client - Quarkus
This guide is about the REST Client compatible with RESTEasy Classic which used to be the default JAX-RS implementation until Quarkus 2.8. It...
Read more >
Writing REST Services with RESTEasy Reactive - Quarkus
Manually setting the response. If you need to set more properties on the HTTP response than just the body, such as the status...
Read more >
All configuration options - Quarkus
AWS Lambda Type Default AWS Lambda Common Type Default AWS Lambda Gateway REST API Type Default Agroal ‑ Database connection pool Type Default
Read more >
Using the REST Client with Multipart - Quarkus
For more information about RESTEasy Reactive, please see the REST Client Reactive guide and, ... Your configuration properties quarkus.rest-client.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found