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

Fallback to default values from application.yaml on "spring.cloud.config.fail-fast: true"

Open
#2,277 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is your feature request related to a problem? Please describe.
As per the docs:

If you expect that the config server may occasionally be unavailable
 when your application starts, you can make it keep trying after a failure.

We want to use that, since our config server take some time to be up. But, we also want to use the application.yaml, if the server is not reachable (basically, the behaviour of spring.cloud.config.fail-fast: false).
Can we have the "best of both worlds"?

Describe the solution you'd like
When I have the spring.cloud.config.fail-fast: false set and added spring-retry and spring-boot-starter-aop to my classpath, I want to have an additional flag to indicate, that the application should fall back default values from the application.yaml

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
In the ConfigServicePropertySourceLocator is the code that checks for the fail-fast propery.

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 with ConfigServicePropertySourceLocator at the fail-fast check referenced in the issue. Review how spring.cloud.config.fail-fast, spring-retry, spring-cloud-config-client, and application.yaml currently interact. Done means defining and documenting an additional flag that retries an unavailable config server while allowing fallback to application.yaml defaults.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.