Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apis/taskcluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ def _get_job_details_url(self, push_id):
return self.url_treeherder + "api/jobs/?push_id=%s" % push_id

@logEntryExit
@retry
def get_job_details(self, revision):
push_list_url = self._get_push_list_url(revision)
self.logger.log("Requesting revision %s from %s" % (revision, push_list_url), level=LogLevel.Info)
Expand Down Expand Up @@ -379,6 +380,7 @@ def _get_push_health_url(self, revision):
return self.url_treeherder + "api/%spush/health/?revision=%s" % (self.url_project_path, revision)

@logEntryExit
@retry
def get_push_health(self, revision):
push_health_url = self._get_push_health_url(revision)
self.logger.log("Requesting push health for revision %s from %s" % (revision, push_health_url), level=LogLevel.Info)
Expand Down
2 changes: 1 addition & 1 deletion components/mach_vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class VendorProvider(BaseProvider, INeedsCommandProvider, INeedsLoggingProvider)
def __init__(self, config):
pass

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

Expand Down
17 changes: 17 additions & 0 deletions format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,20 @@

poetry run autopep8 .
poetry run flake8 .

output=$(find . -type f -name '*.py' -exec awk '
/^[ \t]*@retry[ \t]*$/ {
getline a
if (a ~ /^[ \t]*@logEntryExit[ \t]*$/) {
getline b
print FILENAME ":"
print $0 "\n" a "\n" b "\n"
}
}
' {} +)

# Check if there was any output
if [[ -n "$output" ]]; then
echo "@retry must always be the decorator right before a function. Please fix these:"
echo "$output"
fi