From 0b2545b0361a07e0eb100e3df9d27654f1f285b1 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Mon, 11 Mar 2024 05:37:00 +0100 Subject: [PATCH] remove unused GitWithRetry --- buildbot_nix/__init__.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/buildbot_nix/__init__.py b/buildbot_nix/__init__.py index dc17dce..a858cd1 100644 --- a/buildbot_nix/__init__.py +++ b/buildbot_nix/__init__.py @@ -243,32 +243,6 @@ class UpdateBuildOutput(steps.BuildStep): return util.SUCCESS -# The builtin retry mechanism doesn't seem to work for github, -# since github is sometimes not delivering the pull request ref fast enough. -class GitWithRetry(steps.Git): - @defer.inlineCallbacks - def run_vc( - self, - branch: str, - revision: str, - patch: str, - ) -> Generator[Any, object, Any]: - retry_counter = 0 - while True: - try: - res = yield super().run_vc(branch, revision, patch) - except Exception as e: # noqa: BLE001 - retry_counter += 1 - if retry_counter == 3: - msg = "Failed to clone" - raise BuildbotNixError(msg) from e - log: Log = yield self.addLog("log") - yield log.addStderr(f"Retrying git clone (error: {e})\n") - yield asyncSleep(2 << retry_counter) # 2, 4, 8 - else: - return res - - def nix_eval_config( project: GerritProject, gerrit_private_key: str,