spring-cloud / spring-cloud/spring-cloud-config
Use the configured application name, profile and label in `client.ConfigServerHealthIndicator`
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2k
- Forks
- 1.3k
- Avg merge
- 2d 59m
- Merged PRs (30d)
- 16
Description
config server health page shows below information on config-server section :
"configServer": {
"status": "UNKNOWN",
"error": "no property sources located"
},
After did a little investigation, seems like it requesting the 'default' profile instead of spring.application.name as profile to config server.
I suspect that the code on below made the ConfigServerHealthIndicator override the existing environment and made it unable to resolve spring application name ('default' was returned) :
https://github.com/spring-cloud/spring-cloud-config/blob/master/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerHealthIndicator.java#L25
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 in spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerHealthIndicator.java at the referenced code, then reproduce the config-server health output. Check how the indicator resolves the application name, profile, and label, and verify that the health request uses the configured values rather than the default profile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100