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

feature request: auto retry + skip #76

Closed
ImSingee opened this issue Dec 20, 2024 · 8 comments
Closed

feature request: auto retry + skip #76

ImSingee opened this issue Dec 20, 2024 · 8 comments
Labels
enhancement New feature or request planned

Comments

@ImSingee
Copy link

Describe the feature or enhancement

Now, if cloning of any repo fails, the program exits immediately.

Sometimes, this is a permission problem, and sometimes a temporary network issue or rate limit error.

I hope if there's an error occurs, it should be auto-retry for some time (to prevent temporary error), and if it's still error after the maximum retry time, simply skip it and handle next repo (not exit the whole program).

@ImSingee ImSingee added the enhancement New feature or request label Dec 20, 2024
@AkashRajpurohit
Copy link
Owner

makes sense, thanks for the sharing the suggestion.

@AkashRajpurohit
Copy link
Owner

Additionally, if you want to contribute with this feature then feel free to pick it up! :)

@ImSingee
Copy link
Author

@AkashRajpurohit Got it. Since the project is new for me, I don’t have enough time to work on it now. But I may take it next week if I have free time then.

@AkashRajpurohit
Copy link
Owner

@ImSingee this feature have been landed in the latest 0.15.0 release. It was quite fun working on this, thanks for the sharing about this, do try it and let me know if you face any issues.

@ImSingee
Copy link
Author

@AkashRajpurohit Thanks for implementing my request feature!

BTW, I belive there must be a problem related the retry:

output, err := command.CombinedOutput()

The command is reused between the retry. But it can't -- the second (and later) call to CombinedOutput will fail as Golang expect each command to be only used once and it will return a "stdout is already set" error (https://cs.opensource.google/go/go/+/refs/tags/go1.23.4:src/os/exec/exec.go;l=1013).

I don't have a computer with golang setup now. I will submit the PR tomorrow (but if you have time, feel free to fix it by yourself).

@AkashRajpurohit
Copy link
Owner

Nice catch, thanks for pointing this out.
I've pushed this commit to address this, let me know if you have any thoughts on this. Will create a patch release on 0.15 with this fix.

@AkashRajpurohit
Copy link
Owner

@all-contributors please add @ImSingee for ideas.

Copy link
Contributor

@AkashRajpurohit

I've put up a pull request to add @ImSingee! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request planned
Projects
None yet
Development

No branches or pull requests

2 participants