Skip to content
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

move away from go-git #10091

Open
rohankmr414 opened this issue Nov 22, 2022 · 7 comments
Open

move away from go-git #10091

rohankmr414 opened this issue Nov 22, 2022 · 7 comments
Labels
area/artifacts S3/GCP/OSS/Git/HDFS etc go Pull requests that update Go dependencies type/dependencies PRs and issues specific to updating dependencies type/feature Feature request

Comments

@rohankmr414
Copy link
Member

Summary

We changed the git library in v3.4 to go-git which seems to have a lot of bugs and also is not actively maintained, the last release created for this project was on June 2, 2021, which was more than an year ago. Currently we are maintaining our own fork of go-git at argoproj-labs/go-git. There's a similar package git2go which has go bindings for libgit2 and is also actively maintained and being used widely. Should we consider migrating to that package?


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

@rohankmr414 rohankmr414 added the type/feature Feature request label Nov 22, 2022
@alexec
Copy link
Contributor

alexec commented Nov 22, 2022

+1 to this. go-git does not appear to be as well maintained as would be desirable. Would you be willing to do an evaluation of the alternatives? One thing to consider is that git normally requires a fat (and much less secure) base image (e.g. ubuntu). Does git2go work? Do we need to use CGO? It’s fine to use CGO, just more complex. What about Windows support?

@alexec
Copy link
Contributor

alexec commented Nov 22, 2022

The reason for using go-git instead of the git binary is that the git binary was being installed using a package manager and therefore requiring a fat base image.

Can we install the git binary without a fat base image? I.e. standalone/statically linked binary. We would have a properly tested and supported git, without the downsides.

I think we could just have another Dockerfile target that builds a statically linked git from source:

https://stackoverflow.com/questions/11570188/how-to-build-git-with-static-linking
https://www.lyraphase.com/wp/projects/how-to-build-git-for-a-host-with-no-compiler/

@alexec
Copy link
Contributor

alexec commented Nov 22, 2022

#10018
#9613

@weafscast
Copy link
Contributor

weafscast commented Mar 27, 2023

I am working on this.

Update :

  • Private HTTP is working
  • Private SSH fixing.
  • submodule haven't tested.

@terrytangyuan
Copy link
Member

Thanks. Assigned to you.

@terrytangyuan
Copy link
Member

terrytangyuan commented May 16, 2023

go-git is back to maintenance and active for a couple of months already so we should contribute any changes back to upstream and switch back to upstream go-git: https://github.com/go-git/go-git

Another motivation to switch back to upstream: #11091 (comment)

See project status update: https://github.com/go-git/go-git#project-status

weafscast added a commit to weafscast/argo-workflows that referenced this issue May 28, 2023
Signed-off-by: weafscast <weafscast@proton.me>
weafscast added a commit to weafscast/argo-workflows that referenced this issue May 28, 2023
Signed-off-by: weafscast <weafscast@proton.me>
@agilgur5 agilgur5 added type/dependencies PRs and issues specific to updating dependencies go Pull requests that update Go dependencies area/artifacts S3/GCP/OSS/Git/HDFS etc labels Sep 5, 2023
@terrytangyuan
Copy link
Member

One user mentioned another upstream bug go-git/go-git#511

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/artifacts S3/GCP/OSS/Git/HDFS etc go Pull requests that update Go dependencies type/dependencies PRs and issues specific to updating dependencies type/feature Feature request
Projects
None yet
5 participants