Skip to content

Commit 655d59b

Browse files
committed
Add the retry tag to a couple functions that accumulate intermittent errors
1 parent 7f359e7 commit 655d59b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

apis/bugzilla_api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import json
99
import requests
1010

11+
from components.utilities import retry
12+
1113

1214
def sq(s):
1315
return '[' + s + ']'
@@ -148,6 +150,7 @@ def closeBug(url, apikey, bugID, resolution, comment, dup_id=None):
148150
raise Exception(j)
149151

150152

153+
@retry
151154
def openBugsMetadata(url, bugIDs):
152155
r = requests.get(url + "bug?resolution=---&id=%s&include_fields=id,assigned_to" % ",".join([str(b) for b in bugIDs]))
153156

components/mach_vendor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import subprocess
66

7-
from components.utilities import string_date_to_uniform_string_date
7+
from components.utilities import string_date_to_uniform_string_date, retry
88
from components.logging import logEntryExit
99
from components.providerbase import BaseProvider, INeedsCommandProvider, INeedsLoggingProvider
1010

@@ -20,6 +20,7 @@ class VendorProvider(BaseProvider, INeedsCommandProvider, INeedsLoggingProvider)
2020
def __init__(self, config):
2121
pass
2222

23+
@retry
2324
@logEntryExit
2425
def check_for_update(self, library):
2526
result = self.run(["./mach", "vendor", "--check-for-update", library.yaml_path]).stdout.decode().strip()

0 commit comments

Comments
 (0)