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

Add networking timeouts to git pushes #941

Merged
merged 5 commits into from
Sep 14, 2023
Merged

Conversation

hannesg
Copy link
Member

@hannesg hannesg commented Sep 13, 2023

The solution take is highly unelegant but kinda unavoidable given the options available. Basically, libgit as most c based libs doesn't allow cancelling anything. The only thing we can do is to run the push operation in a seperate go routine and return our own timeout after some time while throwing a cancellation at the lib to stop. This is now done in the useRemote function. The network timeout is now 1 minute which is probably good enough for most consumers.

@hannesg hannesg requested a review from a team as a code owner September 13, 2023 18:19
@hannesg hannesg enabled auto-merge (squash) September 14, 2023 11:29
@hannesg hannesg merged commit dc267ed into main Sep 14, 2023
@hannesg hannesg deleted the network-timeout-cd-service branch September 14, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants