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

Remove libgit2 and git2go from codebase #468

Merged
merged 6 commits into from
Dec 9, 2022
Merged

Remove libgit2 and git2go from codebase #468

merged 6 commits into from
Dec 9, 2022

Conversation

pjbgf
Copy link
Member

@pjbgf pjbgf commented Dec 9, 2022

This PR removes the libgit2 implementation which was deprecated in v0.27.0,
resulting in a smaller code base and more streamlined build process.

Test image: ghcr.io/fluxcd/image-automation-controller:rc-95ace68b.

Things of note:

Breaking changes:

  • Feature gate ForceGoGitImplementation has been deprecated and removed.

Paulo Gomes added 3 commits December 9, 2022 11:27
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
@pjbgf pjbgf added the area/git Git related issues and pull requests label Dec 9, 2022
@pjbgf pjbgf added this to the Bootstrap GA milestone Dec 9, 2022
@pjbgf pjbgf marked this pull request as ready for review December 9, 2022 12:12
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @pjbgf 🏅

Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌 awesome work coming together @pjbgf (& @aryan9600)

Two tiny nits.

Comment on lines 114 to 115
The [`gitImplementation` field][source-docs] in the referenced `GitRepository` is now ignored. All
reconciliations are now executed using the `go-git` implementation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The [`gitImplementation` field][source-docs] in the referenced `GitRepository` is now ignored. All
reconciliations are now executed using the `go-git` implementation.
The [`gitImplementation` field][source-docs] in the referenced `GitRepository` is ignored. All
reconciliations are executed using the `go-git` implementation.


# Some dependencies have to installed
# for the target platform: https://github.com/tonistiigi/xx#go--cgo
RUN xx-apk add musl-dev gcc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ref recommends explicit declaration of CGO_ENABLED.

In addition: might be worth taking note of a brief "why" for the CGO dependency.

@pjbgf
Copy link
Member Author

pjbgf commented Dec 9, 2022

Successfully tested the rc image against:

  • Azure DevOps
  • GitLab push branch
  • BitBucket
  • GitHub
  • GitHub push branch

Paulo Gomes added 3 commits December 9, 2022 13:43
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
@pjbgf pjbgf merged commit f48e3bd into main Dec 9, 2022
@pjbgf pjbgf deleted the remove-libgit2 branch December 9, 2022 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/git Git related issues and pull requests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants