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

libgit2: Improve HTTP redirection observability #772

Merged
merged 1 commit into from
Jun 8, 2022

Conversation

pjbgf
Copy link
Member

@pjbgf pjbgf commented Jun 8, 2022

Git repositories may be redirected to different URLs when they are accessed via HTTP. The two most obvious scenarios are from HTTP to HTTPS and when the .git suffix is missing.
By improving the logging on this process users can identify changes required to their GitRepository objects.

For the URL https://gitlab.com/org/repository which is missing the .git suffix, the output message on the logs will be:

{"level":"debug","ts":"2022-06-08T08:24:16.040Z","logger":"managed-transport","msg":"[http]: server responded with redirect","newURL":"https://gitlab.com/org/repository.git","StatusCode":301}

Git repositories may be redirected to different URLs
when they are accessed via HTTP. The two most obvious
scenarios are from HTTP to HTTPS and when the .git suffix
is missing.
By improving the logging on this process users can identify
changes required to their GitRepository objects.

Signed-off-by: Paulo Gomes <[email protected]>
@pjbgf pjbgf merged commit 5f9ce26 into fluxcd:main Jun 8, 2022
@pjbgf pjbgf deleted the redirect-logging branch June 8, 2022 09:01
@pjbgf pjbgf added the area/git Git related issues and pull requests label Jun 8, 2022
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
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants