-
Notifications
You must be signed in to change notification settings - Fork 9
feat: retry x times if unable to find pom data #7
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
base: master
Are you sure you want to change the base?
Conversation
b87c12d to
a43701a
Compare
|
I at first kept I then updated |
a43701a to
2196acb
Compare
|
After keeping delay of 1 second, so probably this change is not such a good idea :) |
could also be because of hotel wifi, |
|
yeah right the 40mins was due to bad wifi, it takes 9 minutes now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are embedding magic constants into the finder modules. This is not how things should be done. Look at the Options struct that contains things like IgnoreOptional or RecursiveSearch. Clearly these settings should be added there as retryAttempts and retryDelayMsec to allow for configuration at runtime via CLI flags.
Secondly, why are you adding retries here if the fetcher module already has retries implemented?
go-maven-resolver/fetcher/fetcher.go
Lines 70 to 72 in bd9da57
| func (p *Fetcher) retryFetch(url string) (io.ReadCloser, error) { | |
| var resp http.Response | |
| for r := 1; r <= p.retries; r++ { |
As seen here : status-im/status-mobile#18294 and multiple times locally,
sometimes
make nix-update-gradlefails to get pom data for this gradle dependency : https://plugins.gradle.org/plugin/com.adarshr.test-logger/2.0.0Running
make nix-update-gradleagain fixes it, sometimes it takes more than a single retry to fix.This PR introduces a minimum of 3 retries if
go-maven-resolverfails to get pom data for any gradle dependency due to networking issues that could potentially be caused by concurrent threads.This is just a suggestion and my not fix the problem for good, but I wanted your opinion on this @jakubgs and hence I opened this PR.