-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deletion PRs don't remove cluster directories #747
Comments
So really we're trying to do something like this:
git clone $repo
# this is what we're currently doing right now..
git rm clusters/management/clusters/my-old-cluster.yaml
# .. but now we also want to clean up this directory too:
git rm -r ./clusters/my-old-cluster
git commit -avm "deletes cluster"
git push However the However, to make it a bit more complicated it doesn't call the github/gitlab HTTP APIs directly but instead delegates to another go module https://github.com/fluxcd/go-git-providers Approach Unfortunately
So we have to explicitly provide a list of files we want to delete. That means we have to:
Point 2. here is quite easy and we have some examples of doing this e.g. here weave-gitops-enterprise/cmd/clusters-service/pkg/server/clusters.go Lines 222 to 225 in 25da7e2
Point 1. is the harder one which we don't do anywhere yet and will require some changes to the go-git-provider. 🤔 . So now I'm thinking about that a bit more.. |
So I think we need to tackle this one fluxcd/go-git-providers#143 Shouldn't be too hard. 🤔 |
Closing as this is now very different in 0.9.0-rc.3 |
This one we're addressing at the moment and I think it is still very useful to implement. |
WGE release:
I'm expecting Deletion PRs to clear out my cluster directory as well clusters/lm18 does still exist and holds profiles.yaml and the whole flux system of the leaf cluster.
The text was updated successfully, but these errors were encountered: