Skip to content

Commit

Permalink
Retry if git clone failed
Browse files Browse the repository at this point in the history
  • Loading branch information
JarLob authored Feb 24, 2025
1 parent 9ece30f commit 212aac2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions infra/cifuzz/filestore/git/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

_PUSH_RETRIES = 3
_PUSH_BACKOFF = 1
_CLONE_RETRIES = 5
_CLONE_DELAY = 1
_CLONE_BACKOFF = 2
_GIT_EMAIL = '[email protected]'
_GIT_NAME = 'CIFuzz'
_CORPUS_DIR = 'corpus'
Expand Down Expand Up @@ -64,6 +67,7 @@ def __init__(self, config, ci_filestore):
def __del__(self):
shutil.rmtree(self.repo_path)

@retry.wrap(_CLONE_RETRIES, _CLONE_DELAY, _CLONE_BACKOFF)
def _clone(self, repo_url):
"""Clones repo URL."""
self._git('clone', repo_url, '.')
Expand Down

0 comments on commit 212aac2

Please sign in to comment.