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 a configurable timeout for clone #12

Open
krassowski opened this issue Jun 7, 2024 · 3 comments · May be fixed by #48
Open

Add a configurable timeout for clone #12

krassowski opened this issue Jun 7, 2024 · 3 comments · May be fixed by #48

Comments

@krassowski
Copy link
Member

Cloning needs to have a timeout in case if it the thread gets stuck. This should be configurable to allow for larger repositories.

@andrewfulton9
Copy link
Collaborator

andrewfulton9 commented Jan 8, 2025

I'm not sure we can actually safely cancel a thread task here. We can use an event, but because git.Repo.clone_from if a blocking call, the event can't be processed within clone_task until after git.Repo.clone anyway. We can also check for a timeout outside of the task and do task.join(timeout=n) to unblock ProgressGitPuller and code higher up, but the thread will continue to run in the background still. Is that sufficient?

The work I have done to explore this is in a branch on my fork: issue12/git_clone_timeout

@krassowski
Copy link
Member Author

I think thread running in the background is lesser evil. I think the worst case scenario right now is that the git process is stuck and user cannot do anything. I do not remember the relevant code good enough to advise here, but can take a look at your branch - forgot to push?

@andrewfulton9
Copy link
Collaborator

I did forget to push. Sorry about that. It should be up to date now

@andrewfulton9 andrewfulton9 linked a pull request Jan 21, 2025 that will close this issue
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants