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
Use API server retry logic #6538
Conversation
…resulted in all the workers restarting after three seconds. The intent was obviously different. Will now try connecting every 200ms for a second. A pleasing side effect is that tests run much more quickly without 3 second pauses in them.
!!retry!! |
2 similar comments
!!retry!! |
!!retry!! |
Anything between !! !! Will trigger a build. It seems like @gz, the bot doesn't like you :( |
!!weneedaretrythebotlikesme!! |
@nskaggs boo. The quick tests seem to be broken too :-( |
@dooferlad yea, looks like the upgrade just broke things. |
!!build!! |
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.
LGTM. Note: we might want to tweak this again as we may be standardizing on https://gopkg.in/retry.v1
|
||
if openAttempt.Min == 0 && openAttempt.Delay > 0 { | ||
openAttempt.Min = int(openAttempt.Total / openAttempt.Delay) | ||
} |
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.
I would instead fail here. This is a great way to hide issues in calling code.
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
When connecting to the API server the retry logic didn't fire, which resulted in all the workers restarting after three seconds. The intent was obviously different. Will now try connecting every 200ms for a second. A pleasing side effect is that tests run much more quickly without 3 second pauses in them.
Tested by running the unit tests.