spring-cloud / spring-cloud/spring-cloud-config

Included profiles are not loaded anymore

Open
#3,260 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-triage
Dominant language
Java
Stars
2k
Forks
1.3k
Avg merge
2d 59m
Merged PRs (30d)
16

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)

Image

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

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.

Assessment

Tech stack
git, java, spring, spring-boot
Domain
api, backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.