spring-cloud / spring-cloud-config

External configuration (server and client) for Spring Cloud
Apache License 2.0
1.94k stars 1.28k forks source link

After updating from 4.0.x to 4.1.2 application asks wrong Spring Profile #2431

Closed bvn13 closed 2 weeks ago

bvn13 commented 2 weeks ago

My application uses Spring Config Server. In application.yaml there is no spring.profiles.active property. Active profiles is passed through env variables in gitlab CI.

After upgrading spring-cloud-config-client library upto 4.1.2 version I faced an issue. Logs in application:

Located environment: name=NAME, profiles=[prod], label=null, version=a56ea361ee44, state=null

But it asks Config Server with DEFAULT profile.

How can it happen?

bvn13 commented 2 weeks ago

Oh... My colleague have just found this update https://github.com/spring-cloud/spring-cloud-config/commit/8e090b971338899ae2b1efb51c3fff7d7a8bd61f#diff-0b163e7aa4ac496d637a29fb55fb224c53c473a8c9902472819adff2ef27e0bb

And now I understand that it is a normal behavior.

So... it is not a bug, it is a feature now. :)