-
-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed the order of importing properties #882
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tomek82. Good catch. Can you add a test for this change?
@maciejwalkowiak What is a good way to test it? My attempts with adding a classpath source to command line in io.awspring.cloud.autoconfigure.config.secretsmanager.SecretsManagerConfigDataLoaderIntegrationTests fail as it seems to be working without this change and I can't get a separate @propertysource to work either (it does load the file but doesn't process the secrets import). |
You can test it like this. Add test to
and another-parameter=from properties file The test passes without your changes too, so I am a bit puzzled. Perhaps this bug exists only in 2.x? |
I've added a test with one more level of indirection, without my fix this fails to load the properties in the right order. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Because it may have surprising side effects we will release it with 3.1.0
…882) Co-authored-by: Tomek Bielecki <Tomek.Bielecki@aus.com>
…882) Co-authored-by: Tomek Bielecki <Tomek.Bielecki@aus.com>
📢 Type of change
📜 Description
Change the Secrets Manager resolver to use resolve instead of resolveProfileSpecific to fix the import order bug.
💡 Motivation and Context
#881
💚 How did you test it?
Build locally and run application with
spring.config.import=aws-secretsmanager:${ENV}/config,optional:classpath:config.properties
and verified that the properties are overridden correctly. Also tested with profile-specific application-local.properties.
📝 Checklist
🔮 Next steps