Support multiple Spring application names for AWS Secrets Manager#2664
Support multiple Spring application names for AWS Secrets Manager#2664ryanjbaxter merged 2 commits intospring-cloud:mainfrom
Conversation
- Enable processing of comma-separated application names in Spring Cloud Config. - Add test cases for handling multiple application names.
| } | ||
| } | ||
| if (!Arrays.asList(profiles).contains(defaultProfile)) { | ||
| addPropertySource(environment, application, defaultProfile, l); |
There was a problem hiding this comment.
Are there existing tests that verify that changing this logic doesn't break anything? I am nervous that we might be changing the order of certain property sources and breaking expectations.
There was a problem hiding this comment.
This one appears to provide good coverage for the logic changes in AWS Secrets Manager, particularly regarding the ordering and inclusion of profiles.
It helps ensure that:
- Profiles specified as a comma-separated list (like
"prod,east") are handled in the correct order. nullprofiles are properly included.- The default profile is correctly added, and its position relative to other profiles (including
nullprofiles) is maintained.
For label-related scenarios, testFindOneWithExistingApplicationAndDefaultProfileAndExistingLabelWhenMultipleLabelIsSet seems to cover the handling of multiple labels effectively.
Based on my review, these tests, along with testFindOneWithNullApplicationAndNonExistingProfileAndNullLabelWhenDefaultLabelIsSet and testFindOneWithExistingApplicationAndNonExistingProfileAndNoDefaultProfileForFooAndNullLabelWhenDefaultLabelIsSet, seem to cover the existing logic quite well.
… labels and profiles
|
I added a comprehensive test case to thoroughly ensure that the logic for retrieving secrets remains consistent with the previous implementation. The test covers scenarios with multi-profiles and multi-labels, including default profiles and null profiles, verifying the exact order of secrets in all cases. |
|
The tests are great! Thank you! |
Support multiple spring application names for AWS Secret Manager
Spring Cloud Config supports multiple application names in backends like Git and Vault, but this feature seems to be missing in AWS Secret Manager. This change enables AWS Secret Manager to handle comma-separated application names, aligning with these backends.
This implementation is similar to PR #1379, which added support for multiple applications in the Vault backend, and resolves the limitations discussed in issue #1356.
What’s Changed
Why This Matters
Testing