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
Error from git fetch cannot lock ref
caused by incorrect branch paths
#10664
Comments
I think you're right about this. I also can't think of a reason why prune would be bad, since our local copy should mirror the remote. |
@jessesuen Would you mind if I made a PR for this? Is there a process such as a proposal I need to follow for this? |
@ADustyOldMuffin a PR is fine, no proposal needed! I'm a little worried about whether there's a performance impact associated with running Either way, happy to review a PR! :-) |
👍🏻 When this was initially mentioned in the chat on Slack I did a bunch of timing with fetch and prune on various repositories we use since they change very often. I'll do some more testing to double check, but on initial viewing the difference was in the milliseconds for a repo getting hundreds to thousands of commits a day and lots of branches coming and going and on less busy repos the difference was close to un-measurable (do not that I waited significant time between each fetch to properly load up something that would require pruning). I can also check into possibly building and running a custom version of ArgoCD with this change and monitor metrics to see if we have a change if needed. |
Cool, that sounds worth it. Would also get rid of the weird fallback logic we have now.
The extra validation would be helpful! |
Posted the small PR to start the process, I'll note if I can manage to get the custom build working and/or any findings I get. |
This should clean up any old branches and save on disk space, and fix any errors around bad branch names. Signed-off-by: Daniel Hix <danieljacobhix@gmail.com> Signed-off-by: Daniel Hix <danieljacobhix@gmail.com>
This should clean up any old branches and save on disk space, and fix any errors around bad branch names. Signed-off-by: Daniel Hix <danieljacobhix@gmail.com> Signed-off-by: Daniel Hix <danieljacobhix@gmail.com>
Checklist:
argocd version
.Describe the bug
When 2 branches are created that are in a format of
mybranch/mychange
mybranch/mychange/subchange
this causes issues in Git and as such also causes issues in ArgoCD when running a fetch.To Reproduce
my-cool-branch/sub
on a repomy-cool-branch/sub/another-one
(perform any cleanup needed to allow this to push)Expected behavior
ArgoCD should run a
--prune
option which would fix this issue.Version
Logs
Extra Notes
Git prune is currently being used to fix other issues, as seen here but I believe it would be better to just run
--prune
by default to remove any hanging branches not around on the remote anyway. I'm open to hearing why this might cause issues.The text was updated successfully, but these errors were encountered: