Currently when trying to configure multiple repositories in spring config server along with AWSSecretsManager, the order specified for the AWSSecretsManager is not followed.
Version : v3.1.0-M2 Module : Spring-Cloud-Config-Server
Config :
spring:
application:
name: Config-Server
profiles:
active: native,awssecretsmanager
cloud:
config:
server:
aws-secretsmanager:
region: ap-south-1
prefix: secrets/app
order: 2
native:
order: 1
searchLocations: file://${user.home}/Workspace/Config
SecretManagerRepository:
NativeRepository:
This is causing the order defined for the awssecretmanager to be ignored, and not work as expected. Is there any reason for not extending Ordered for 'AwsSecretsManagerEnvironmentRepository'?
Comment From: ryanjbaxter
Seems like it should, would you be interested in submitting a PR?
Comment From: knvs97
Already done @ryanjbaxter . https://github.com/spring-cloud/spring-cloud-config/pull/1981
Comment From: knvs97
Also wanted to point it out, there were some other profiles where order was not supported in like AwsParameterStoreEnvironmentRepository, CompositeEnvironmentRepository, CredhubEnvironmentRepository, GoogleSecretManagerEnvironmentRepository, JGitEnvironmentRepository, RedisEnvironmentRepository. It appears like a bug. Can you confirm @ryanjbaxter
Comment From: ryanjbaxter
Not sure if all of them makes sense. Particularly JGitEnvironmentRepository
extends AbstractScmEnvironmentRepository
so it implements Ordered
. I am unsure if it makes sense for CompositeEnvironmentRepository
to implement Ordered
because it is the one leveraging the Ordered
interface. Sounds like maybe the others should.
Comment From: knvs97
Yeah JGitEnvironmentRepository
, CompositeEnvironmentRepository
need not extend Ordered. Others do. Do you want me to make the changes for the above discussed in the same PR?
Comment From: ryanjbaxter
Sure.