devspace-sh / devspace

DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
https://devspace.sh
Apache License 2.0
4.19k stars 351 forks source link

Specifying rules for pulling helm charts from git #2677

Open JoshInLisbon opened 12 months ago

JoshInLisbon commented 12 months ago

Is your feature request related to a problem?

Sometimes, after a change has been made to a helm chart, devspace will recognise this as a divergent branch:

Error cloning repo:  Error running 'git pull git@gitlab.com:project/helm/service.git': error executing 'git -C /Users/username/.devspace/dependencies/git-gitlab-com-helm-service-shar pull':  -> From gitlab.com:project/helm/service
+ 3c2665a...a40b451 branch-name -> origin/branch-name  (forced update)
...
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
project service deploy:service Switching URL from git@gitlab.com:project/helm/service.git to https://gitlab.com/project/helm/service.git and will try cloning again
hint: your next pull:
hint:
hint:   git config pull.rebase false  # merge
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.

Which solution do you suggest?

While I can edit my .gitconfig file, I do not want to force an edit onto other users in the company as we roll out the use of devspace. It would be great if we could specify the rules for pulling from git as part of the devspace.yaml configuration/

FabianKramm commented 11 months ago

@JoshInLisbon thanks for creating this issue! How would the rules look like?

alexandradragodan commented 11 months ago

Hey, @JoshInLisbon.

Thanks for suggesting this.

After discussing this issue internally, we decided this would be a good addition to devspace. Honestly though, our roadmap is quite full atm so I don't expect we'd be able to get to implement this in the following months.

If you want to contribute with a PR sooner, we'd be more than happy to support you. 🥇