Describe the bug Given - Spring Cloud Config Server Version 4.1.3 - spring.application.name: appA,appB - spring.profiles.active: dummy


When - Resulting Request: http://<config server>/appA,appB/dummy (the profile name doesn't matter here, just the app names)


Then - Against Git and Vault backends (#1356), this will return appB as propertySources[0] and appA as propertySources[1] - Against the S3 backend, this will return appA as propertySources[0] and appB as propertySources[1]


This is a problem because: This affects the override behavior in cases where the same value exists in both appA and appB's responses

Comment From: dmarmugi

Searching with regex for \.findOne\("\w+,\w+ turned up these tests: Vault and Spring Vault have tests asserting precedence: - https://github.com/spring-cloud/spring-cloud-config/blob/ae2e2448a7fbf39e2704e29d167753d4c9e0478e/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/VaultEnvironmentRepositoryTests.java#L133-L152 - https://github.com/spring-cloud/spring-cloud-config/blob/ae2e2448a7fbf39e2704e29d167753d4c9e0478e/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/vault/SpringVaultEnvironmentRepositoryTests.java#L142-L161

So, too, CredHub: - https://github.com/spring-cloud/spring-cloud-config/blob/ae2e2448a7fbf39e2704e29d167753d4c9e0478e/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/CredhubEnvironmentRepositoryTests.java#L147-L164

Unfortunately, AWSS3 and Git seem to just assert on size of response: - https://github.com/spring-cloud/spring-cloud-config/blob/ae2e2448a7fbf39e2704e29d167753d4c9e0478e/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/AwsS3EnvironmentRepositoryTests.java#L259-L267 - https://github.com/spring-cloud/spring-cloud-config/blob/ae2e2448a7fbf39e2704e29d167753d4c9e0478e/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/JGitEnvironmentRepositoryIntegrationTests.java#L228-L237