-
Notifications
You must be signed in to change notification settings - Fork 3
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
More resilient schema lookup #9
Conversation
It happened to me once or twice that specs were running for a long time, and then it didn't pass b/c there was a problem with iglucentral connection. I don't have the exception at hand, and couldn't reproduce it, but I believe it was a flaky network connection or maybe iglucentral wasn't available. I've added `read_timeout` and simple retry in case it happens again. Hopefully this will make it more robust.
Thanks again, @sparrovv! This also makes it more consistent with canonical Scala Iglu client. |
@sparrovv has signed the Software Grant and Corporate Contributor License Agreement |
begin | ||
response = HTTParty.get(schema_uri) | ||
response = HTTParty.get(schema_uri, timeout: 3) | ||
rescue SocketError => _ |
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'm just thinking that we might also want to retry on the SocketError 🤔
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 don't have a strong opinion on that. But leaning towards not retrying on the SocketError
as this is rarely something that can be fixed by bigger delay.
Why only catch and retry on |
Cherry-picked to #14 . Closing. |
It happened to me once or twice that specs were running for a long time,
and then they've failed b/c there was a problem with iglucentral
connection.
I don't have the exception at hand, and couldn't reproduce it now, but I believe it was a flaky network connection or maybe iglucentral wasn't available. I've added
read_timeout
and simple retry in case it happens again.Hopefully this will make it more robust.