Skip to content
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

Do not combine profiles when spring.cloud.config.pofiles is set. #2354

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

ryanjbaxter
Copy link
Contributor

Fixes #2349

@@ -92,6 +92,9 @@ private List<String> combineProfiles(ConfigClientProperties properties,
if (!ObjectUtils.isEmpty(properties.getProfile())) {
combinedProfiles = Stream.of(properties.getProfile().split(",")).map(String::trim).filter(s -> !s.isEmpty())
.collect(Collectors.toList());
// If spring.cloud.config.profiles is set it should override all other
// profiles set other ways
return combinedProfiles;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes this method weird right? It's no longer combining profiles. It's returning either the config props profiles, or the active profiles, or default profiles

@spencergibb
Copy link
Member

Nothing else broke with the build, so maybe it is ok, but the terminology of the method and some variables don't make sense anymore.

Fixes spring-cloud#2349

Revert "Make method clearer"

This reverts commit fda8596568fb035d8c7839eeef6edaae712b427f.

Make method clearer
@ryanjbaxter
Copy link
Contributor Author

@spencergibb let me know if this makes things clearer

@ryanjbaxter ryanjbaxter merged commit 861ed67 into spring-cloud:3.1.x Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants