Upgrade libgit2 to 1.3.0 and git2go to V33#573
Merged
hiddeco merged 5 commits intofluxcd:mainfrom Feb 16, 2022
pjbgf:bump-libgit2
Merged
Upgrade libgit2 to 1.3.0 and git2go to V33#573hiddeco merged 5 commits intofluxcd:mainfrom pjbgf:bump-libgit2
hiddeco merged 5 commits intofluxcd:mainfrom
pjbgf:bump-libgit2
Conversation
hiddeco
reviewed
Feb 10, 2022
| select { | ||
| case <-ctx.Done(): | ||
| return git2go.ErrorCodeUser | ||
| return fmt.Errorf("transport close - potentially due to a timeout") |
Member
There was a problem hiding this comment.
I feel for some reason weird about the - in the error message, but not really sure if something like this would be better:
Suggested change
| return fmt.Errorf("transport close - potentially due to a timeout") | |
| return fmt.Errorf("transport close (potentially due to a timeout)") |
| roots := x509.NewCertPool() | ||
| if ok := roots.AppendCertsFromPEM(caBundle); !ok { | ||
| return git2go.ErrorCodeCertificate | ||
| return fmt.Errorf("x509 cert could not be appended") |
Member
There was a problem hiding this comment.
Wondering if something like this would be more useful to the end-user:
Suggested change
| return fmt.Errorf("x509 cert could not be appended") | |
| return fmt.Errorf("PEM CA bundle could not be appended to x509 cert pool") |
| } | ||
| if _, err := cert.X509.Verify(opts); err != nil { | ||
| return git2go.ErrorCodeCertificate | ||
| return fmt.Errorf("x509 cert could not be verified") |
Member
There was a problem hiding this comment.
Suggested change
| return fmt.Errorf("x509 cert could not be verified") | |
| return fmt.Errorf("x509 cert could not be verified: %w", err) |
hiddeco
reviewed
Feb 10, 2022
added 5 commits
February 16, 2022 10:17
Downstream breaking changes introduced since git2go@V31: - git2go.ErrorCode was deprecated in favour of the native error type. - FetchOptions no longer expects a pointer, but rather the actual value of git2go.FetchOptions. Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
This adds a test to detect any regression in libgit2's ED25519 key support. go-git supports ED25519 but not the current version of libgit2 used in flux. The updates to libgit2 in v1.2.0 adds support for ED25519. This test would help ensure the right version of libgit2 is used. Signed-off-by: Sunny <darkowlzz@protonmail.com> Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
The environment variables set at the Makefile were causing go install to yield a corrupted file for setup-envtest. To fix the issue, such operation is now always executed in a clean bash. 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>
hiddeco
approved these changes
Feb 16, 2022
Member
hiddeco
left a comment
There was a problem hiding this comment.
Thanks a lot for following through on the nitpicks, and the upgrade itself 🙇 💯 🥇
This was referenced Feb 16, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #399 fluxcd/image-automation-controller#298
Relates to #397 #490 fluxcd/image-automation-controller#186 fluxcd/image-automation-controller#281
Depends on fluxcd/golang-with-libgit2#17