src-d / lookout-sdk

SDK for lookout analyzers
Apache License 2.0
4 stars 11 forks source link

Add retry policy to grpc connect helper #64

Closed smacker closed 5 years ago

smacker commented 5 years ago

Analyzers using sdk should retry to connect to data server if the connection is broken.

Ref: https://github.com/src-d/style-analyzer/issues/509

smacker commented 5 years ago

It's impossible to do on connect level. We can change default timeouts but they seem very reasonable.

For go we can workaround it using ResetConnectBackoff when we receive an event. I added documentation about it. For python I can't reproduce the error with new grpcio. Most probably it works a little bit differrent from go implementation and the current error was caused by https://github.com/grpc/grpc/pull/15983