You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add retry with exp. backoff to all RPC network calls (#148)
This PR adds retry logic to all RPC network calls. It relies on the
avast/retry-go library, and is configured with the following parameters:
* delays: [0.5s, 2s, 8s, 32s]
* attempts: 5
* timeout of each network call: 30s
In addition, the PR "fixes" the semantic of the
is{Operation,Ready,Pending,Done} methods. Previously, they would return
false in case of a network error -- which naturally let to unexpected
behavior in the core event handling logic. Now, we return (bool, error)
and the calling code properly handles the network failures.
--
Test coverage is low due to (1) the complexity of mocking the failed
calls on a code base that was not designed with a clear separation
between i/o and business logic and (2) the short lifespan of changes to
the timelock-worker service, which should be deprecated soon.
To compensate, I spent a significant amount of time running local manual
tests, trying to validate all failure scenarios.
0 commit comments