Skip to content

Commit

Permalink
fix(commit-annotator): handle errors and retry (#824)
Browse files Browse the repository at this point in the history
Co-authored-by: CI Automation <[email protected]>
  • Loading branch information
LittleChimera and CI Automation authored Aug 29, 2024
1 parent a13cc89 commit 936a17b
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions release-controller/commit_annotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,22 @@ def main():
)
while True:
ic_repo.fetch()
annotate_branch(ic_repo, branch="master")
try:
annotate_branch(ic_repo, branch="master")
except Exception as e:
logging.error("failed to annotate master, retrying", exc_info=e)
continue
for b in ic_repo.branch_list("rc--*"):
branch_date = release_branch_date(b)
if not branch_date or (datetime.now() - branch_date).days > 20:
logging.info("skipping branch {}".format(b))
try:
branch_date = release_branch_date(b)
if not branch_date or (datetime.now() - branch_date).days > 20:
logging.info("skipping branch {}".format(b))
continue
logging.info("annotating branch {}".format(b))
annotate_branch(ic_repo, branch=b)
except Exception as e:
logging.error("failed to annotate branch {}, will retry later".format(b), exc_info=e)
continue
logging.info("annotating branch {}".format(b))
annotate_branch(ic_repo, branch=b)


if __name__ == "__main__":
Expand Down

0 comments on commit 936a17b

Please sign in to comment.