Describe the bug The /{application}/{profile}/{label}/** endpoint doesn't seem to look for the resource in regard to the defined search-paths any more. Instead of taking the last resource encountered it seems to take the first one.
Regression after upgrading from Hoxton.R10 to Hoxton.R11 (wasn't able to reproduce on Hoxton.R10). Version of Spring Boot didn't change (2.3.12.RELEASE).
Sample Repository content (master) : - commons/application.conf - commons/myapp/application.conf
Configuration :
spring:
cloud:
config:
server:
git:
cloneOnStart: true
uri: git@gitlab.mycompany.com:path/to/repo.git
searchPaths: >
commons,
commons/{application},
{profile},
{profile}/{application}
Resource URL : https://configserver.mycompany.com/myapp/myprofile/master/application.conf
Result:
the resource located under commons/
is served instead of the one under commons/myapp/
.
Comment From: tnaskali
The behaviour was changed after #1857.
Comment From: tnaskali
Any news on this issue ? This really is a big change of behaviour for a minor release and it prevents any upgrade on our side
Comment From: aconic-sb
Hi all,
we too are experiencing this behavior. Our workaround solution was to reverse searchPaths:
order. This however could cause future issues if this report would end up being a bug and the fix would bring back old behavior. So, is this a feature for all new versions or a bug?
Thank you very much.
Comment From: aconic-sb
Hello, are there any updates on this? We can reconfigure our Config Server as a workaround but I fear if this gets fixed we'll be experiencing issues. Thank you.
Comment From: ryanjbaxter
@aconic-sb what version of Spring Cloud are you using?
Comment From: aconic-sb
Hi Ryan,
currently we are running version (where everything works as expected):
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-parent</artifactId>
<version>Greenwich.SR6</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
When we tried version 2021.0.6
, we are getting this "reversed" order search behavior. We tried switching the search-paths
order and the "static file" retrieval got fixed. This however also switched the order of "property sources" / data for the static file.
For now it looks like if we want to keep the current behavior the last version that should work for us would be Hoxton.SR10
as stated by the OP.
Thank you for your time.
Comment From: ryanjbaxter
After speaking with the team we have decided to introduce a property that when set to true
will return the functionality to the behavior in Hoxton.SR10.
Comment From: tnaskali
After speaking with the team we have decided to introduce a property that when set to
true
will return the functionality to the behavior in Hoxton.SR10.
Hello Ryan, Great news, thank you for taking the time to look into this.