Included profiles are not loaded anymore
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reviewing PR #3023 and the related closed issue #3186, then reproduce the profile-resolution behavior with the shown Spring Cloud Config client settings and included profiles in the Git repository. Done means establishing whether a supported option restores transitive profile loading or confirming and documenting that clients must explicitly request every profile.
Written by the indexing model from the issue text.
Description
Hello Spring Cloud Config team,
we have a question regarding the behavior change introduced with PR #3023.
As far as we understand it, after this change the Spring Cloud Config Server no longer returns properties from profiles that are only included transitively via spring.profiles.include in the served configuration files.
In our setup, we have a shared config repository with:
- one default profile
- five environment-specific profiles
- additional included profiles
Our clients usually request a config name such as default-config or default-config-camunda-7.22, together with profiles like default,<environment>.
Client side:
spring:
application:
name: dokument-verwaltung
cloud:
config:
username: ${BASIC_AUTH_USER_NAME}
password: ${BASIC_AUTH_USER_PASSWORD}
profile: default,${ENVIRONMENT}
fail-fast: true
name: default-config-camunda-7.22
config:
import: configserver:${SPRING_CLOUD_CONFIG_URI}
Server side or cloud-config (git-repo)
for the profile default-config-camunda-7.22.yml
spring:
cloud:
config:
allow-override: true
override-none: true
profiles:
include: camunda-7-22,kafka
or the application.yml from the default profle
spring:
profiles:
include: security,logging,swagger,urls,feign,websocket
cloud:
config:
allow-override: true
override-none: true
Previously, this worked as expected:
- the requested config file was loaded
- profiles included from there were also resolved
- and the client received the full effective configuration
After the change from PR #3023, this no longer seems to happen.
It looks like we now have to explicitly list all profiles via spring.cloud.config.profile on the client side, including profiles that were previously only activated through spring.profiles.include.
We already reported a related issue here, which has been closed:
#3186
Our question is:
Is there a supported way to restore the previous behavior — for example via a property, flag, or another configuration option — so that included/transitive profiles are resolved again by the Config Server?
Or is the new intended behavior that clients must now always explicitly provide all required profiles themselves?
If the latter is the case, could you please confirm that this is the expected long-term behavior?
Thanks in advance for the clarification.
- Dominant language
- Java
- Stars
- 2k
- Forks
- 1.3k
- Avg merge
- 2d 59m
- Merged PRs (30d)
- 16
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from spring-cloud/spring-cloud-config
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 52/100
spring-cloud/spring-cloud-config#3261 · 5 comments ·
-
waiting-for-triage
Difficulty 3/5 1-2 days Newbie friendliness 52/100
spring-cloud/spring-cloud-config#3220 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 38/100
spring-cloud/spring-cloud-config#2972 ·
-
waiting-for-triage
Difficulty 4/5 3-5 days Newbie friendliness 45/100
spring-cloud/spring-cloud-config#2933 ·
-
enhancement for team discussion
Difficulty 5/5 Over a week Newbie friendliness 20/100
spring-cloud/spring-cloud-config#2918 · 3 comments ·
All issues in spring-cloud/spring-cloud-config
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100