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 three times using exponential backoff as wait policy.
Should mitigate:
- SWH-LOADER-SVN-6W
- SWH-LOADER-SVN-6A
- SWH-LOADER-SVN-68
- SWH-LOADER-SVN-66
- SWH-LOADER-SVN-5J
- SWH-LOADER-SVN-5M
- SWH-LOADER-SVN-3M
- SWH-LOADER-SVN-72
Migrated from D7416 (view on Phabricator)