spring-cloud / spring-cloud/spring-cloud-config
Profile groups are not honored by client
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2k
- Forks
- 1.3k
- Avg merge
- 2d 59m
- Merged PRs (30d)
- 16
Description
I reported this in spring-boot but the issue is with the spring-cloud-config client.
https://github.com/spring-projects/spring-boot/issues/26116
Using a config server, in the application.yml I have defined a group:
# application.yml
spring:
profiles:
group:
dev:
- local
- other
In my application configuration, I'm making use of the other profile:
# my-service.yml
spring:
datasource:
url: jdbc:...
---
spring:
config:
activate:
on-profile: other
some:
other:
setting: true
When running the application with the dev profile, I expected to see the some.other.setting=true property. However, the file seems to be skipped and the property is therefore missing. Looking at the output of the HTTP request to config server, I see that both documents in my-service.yml are returned - the default and the one activated by the other profile.
I'm currently using Spring Boot 2.4.4 and Spring Cloud Config Client 3.0.3.
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.
Research direction
Start with the reported Spring Cloud Config client setup, using application.yml for the dev profile group and my-service.yml for the other-profile document. Reproduce the HTTP response from the config server, then trace how the client processes those returned documents; done means the other-profile property is available when the dev profile is active.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100