From 595fad1080bd379e3c0231a8e02595924c59a9da Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Wed, 29 Nov 2023 16:34:51 -0700 Subject: [PATCH] run.util.find_git_parents: Drop refresh() This takes a long time, and can time out. The mirror is updated every ten minutes automatically. Signed-off-by: Zack Cerza --- teuthology/suite/util.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/teuthology/suite/util.py b/teuthology/suite/util.py index a4f0efa60..7e1ae35cc 100644 --- a/teuthology/suite/util.py +++ b/teuthology/suite/util.py @@ -347,13 +347,6 @@ def find_git_parents(project: str, sha1: str, count=1): log.warning('githelper_base_url not set, --newest disabled') return [] - def refresh(project): - url = '%s/%s.git/refresh/' % (base_url, project) - resp = requests.get(url) - if not resp.ok: - log.error('git refresh failed for %s: %s', - project, resp.content.decode()) - def get_sha1s(project, committish, count): url = '/'.join((base_url, '%s.git' % project, 'history/?committish=%s&count=%d' % (committish, count))) @@ -366,7 +359,6 @@ def get_sha1s(project, committish, count): int(count), sha1, project, resp.json()['error']) return sha1s - refresh(project) # index 0 will be the commit whose parents we want to find. # So we will query for count+1, and strip index 0 from the result. sha1s = get_sha1s(project, sha1, count + 1)