Skip to content

Strange merging of configuration properties in native mode when using snake-case-like config properties form #36671

Closed

Description

Describe the bug

I have REST client url defined like this inside src/main/resources/application.properties:

io.quarkus.ts.opentelemetry.reactive.PingPongService/mp-rest/url=${pongservice_url}:${pongservice_port}

and when I deploy application to OpenShift, I have mounted $PWD/config/application.properties with:

application-properties:
----
pongservice_url=http://pongservice-ts-ejyxaezkwz.apps.ocp4-13.dynamic.quarkus

and environment variable defined in pod as:

pongservice_url: http://pongservice-ts-ejyxaezkwz.apps.ocp4-13.whatever

and receive exception like Invalid REST Client URL used: 'http://pongservice-ts-yfyycuckno.apps.ocp4-13.whatever:tcp://172.30.209.30:8080/hello'

Expected behavior

While I understand pongservice_url is not exactly kebab-case, I have to wonder - where does tcp://172.30.209.30:8080 comes from? Isn't this behavior strange?

Actual behavior

  • In JVM mode everything works
  • In native I get exception
  • In native it works if I convert environment variable name to the PONGSERVICE_URL

How to Reproduce?

Steps to reproduce the behavior:

  1. log in to OCP
  2. git clone git@github.com:michalvavrik/quarkus-test-suite.git
  3. cd quarkus-test-suite/monitoring/opentelemetry-reactive
  4. git checkout reproducer/oc-otel-native-issue
  5. mvn clean verify -Dopenshift -Dnative -Dit.test=OpenShiftOpentelemetryReactiveIT

I bet you can simulate it in native mode just on bare-metal, but you will need to define env variables and config source to different value than is in native. Didn't try it though.

Output of uname -a or ver

Fedora 38

Output of java -version

Temurin 17

Quarkus version or git rev

999-SNAPSHOT (due to Kubernetes client bumps and changes in #35322 I can't test it with earlier versions without significant changes)

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

Apache Maven 3.9.3

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions