Skip to content

Commit

Permalink
run.util.find_git_parents: Drop refresh()
Browse files Browse the repository at this point in the history
This takes a long time, and can time out. The mirror is updated every ten
minutes automatically.

Signed-off-by: Zack Cerza <[email protected]>
  • Loading branch information
zmc committed Nov 29, 2023
1 parent 4df115c commit 595fad1
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions teuthology/suite/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand All @@ -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)
Expand Down

0 comments on commit 595fad1

Please sign in to comment.