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

Fix: retry networking errors (with backoff) #57

Merged
merged 5 commits into from
Nov 18, 2020

Conversation

kares
Copy link
Contributor

@kares kares commented Nov 16, 2020

in case of networking errors such as a timeout or a (temporary) failure to resolve DNS names the plugin should retry

resolves #56
resolves #55

Copy link
Contributor

@robbavey robbavey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than a couple of nits, lgtm.

And thanks for adding tests

lib/logstash/inputs/sqs.rb Outdated Show resolved Hide resolved
if error_count == 1
raise Seahorse::Client::NetworkingError.new(Net::OpenTimeout.new, 'timeout')
end
if error_count == 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this combining two test scenarios? One, that the backoff resets after a successful run, and two, testing the NetworkingError class of events? Maybe split these into separate specs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it is as I also wanted to test the sleep_time being reset after a successful invocation

@kares kares merged commit 6ea3485 into logstash-plugins:master Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants