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: recover from git2go panic #707

Merged
merged 2 commits into from
May 6, 2022
Merged

Conversation

pjbgf
Copy link
Member

@pjbgf pjbgf commented May 6, 2022

Some specific scenarios may lead libgit2 or git2go to panic.
Adding a recovery logic, ensures a predictable execution path for callers, and safeguards the controller's stability.

xref: fluxcd/flux2#2593

Some specific scenarios may lead libgit2 or git2go to panic.
Adding a recovery logic, ensures a predictable execution path
for callers, and safeguards the controller's stability.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
@pjbgf pjbgf added the area/git Git related issues and pull requests label May 6, 2022
@pjbgf pjbgf added this to the GA milestone May 6, 2022
@pjbgf
Copy link
Member Author

pjbgf commented May 6, 2022

Failing tests are orthogonal to the changes. 👀

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
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

IMO a controller should never panic as it would impact all tenants, great improvement!

Thanks @pjbgf

@stefanprodan stefanprodan added the enhancement New feature or request label May 6, 2022
@pjbgf pjbgf merged commit d425923 into fluxcd:main May 6, 2022
@pjbgf pjbgf deleted the libgit2_panic branch May 6, 2022 08:31
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 enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants