Closed atrzcinski closed 7 months ago
Sorry for delay with writing tests. I implemented second test with v2
suffix. It shows, that different application-specific file name affects the final effect, so order of propertySources are different. With this fix, the priority parameter of the propertySource will be valid, so sorting will always be deterministic.
Hi,
@jeremyg484 When do you plan to merge this change?
With the existing code, the value of the
envName
variable will never be resolved correctly because theresolveEnvironment
method will get the value of thefileName
variable.For example: if the name of the configuration file is
my-service-prod.yaml
(where prod is the name of the environment) and we providefileName
as a parameter (value is my-service-prod) instead offinalName
(value is my-service[alpha]), thenresolveEnvironment
method will not be able to find environment.The effect is that consul will overwrite the environment configuration with the standard configuration (e.g.
my-service.yaml
), i.e. the environment configuration will not be considered appropriate.