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

Possibility to enhance cloneOnStart to not delete directory

Open
#816 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted icebox
Dominant language
Java
Stars
2k
Forks
1.3k
Avg merge
2d 59m
Merged PRs (30d)
16

Description

Hello,

We're using cloud config server with a git backend and our current setup of bitbucket cluster doesn't make it to be considered HA (because it is not clustered across multiple datacenters). So I would like to support a failover mode in cloud config.

I would ideally like to use the "cloneOnStart" feature, but since it deletes and recreates the base directory - it would mean that a config server has a hard dependency on bitbucket to even start the server. How can I enhance it to not delete the base directory and rather do a hard reset on start up, so the previous state of all my git repos will keep the application functioning?

The current implementation of the environment repository makes it very tough to enhance it due to most of the logic being in private methods.

Please advice.

Thanks!

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 the environment repository and the cloneOnStart implementation, focusing on how the base directory is deleted and recreated for a Git backend. Review the private-method-heavy logic and determine how startup could preserve existing repositories while resetting them. Done means the server can start from the previous repository state when the Bitbucket backend is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, java, spring
Domain
backend, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.