HomeSoftware Heritage

Add svn_retry decorator to mitigate possible network errors

Description

Add svn_retry decorator to mitigate possible network errors

The subversion loader was not really resilient to network errors.
In particular, if a network error (for instance a connection reset
by peer) happened during one of the following subversion command
executed by the loader: export, checkout, propget or remote access
creation, the loading was aborted.

So instead of aborting the loading process, prefer to retry the
subversion command that failed due to a network error with the
hope that it will not happen again.

To do so introduce a svn_retry decorator based on the use of
the tenacity module. It enables to retry a subversion command
at most five times using exponential backoff as wait policy.

Details

Provenance
anlambertAuthored on Jan 5 2022, 2:42 PM
anlambertPushed on Mar 24 2022, 1:28 PM
Differential Revision
D7416: Add svn_retry decorator to mitigate possible network errors
Parents
rDLDSVN74c010656abc: pytest: Exclude build directory for tests discovery
Branches
Unknown
Tags
Unknown
References
tag: v1.3.0
Build Status
Buildable 27773
Build 43472: test-and-buildJenkins console · Jenkins