Support merging lists across property sources as well as overriding lists via separate property sources.
Describe the bug We depend on spring cloud config server to externalize our configuration and we have two configured backends:
- git
- vault
We have existing configuration that loads credential objects in an array, for example:
infra:
credentials:
- name: some-credential
secret: something-in-vault
We have depended on the ability for the config server to merge the vault and git configuration
# vault
infra.credentials[0].secret=something-in-vault
# git
infra.credentials[0].name=some-credential
Since upgrading our dependency of spring-cloud-commons to 2.2.3.RELEASE from 2.2.0.RELEASE, we noticed the change to PropertySourceBootstrapConfiguration. The use of CompositePropertySource was replaced with a List<PropertySource<?>> as part of https://github.com/spring-cloud/spring-cloud-commons/issues/611.
Opinion
Would there be interest in supporting both styles in just spring-cloud? Maybe take the List as a default but allow a feature toggle so that clients who are reliant on the merging of configurations via config server is maintained.
With the current implementation, we either need to do quite a bit of refactoring of existing configuration structures or migrate all of the configurations that was previously in git into vault which would hinder debugging and the developer experience.
I think it depends. #611 was merged a while ago and we haven't seen any complaints until now. To be honest, if there isn't much interest, the maintenance burden would be more than it is worth. Let's see if we get any votes.