Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-18068: [Dev][Archery][Crossbow] Comment bot only waits for task if link is not available #14429

Merged
merged 3 commits into from
Oct 17, 2022
Merged
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
10 changes: 7 additions & 3 deletions dev/archery/archery/crossbow/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,16 @@ def branch_url(self, branch):
return '{}/tree/{}'.format(self.repo_url, branch)

def task_url(self, task):
if self._wait_for_task:
build_links = task.status().build_links
# Only wait if the link to the actual build is not present
# and refresh task status.
if not build_links and self._wait_for_task:
time.sleep(self._wait_for_task)
if task.status().build_links:
build_links = task.status(force_query=True).build_links
if build_links:
# show link to the actual build, some CI providers implement
# the statuses API others implement the checks API, retrieve any.
return task.status().build_links[0]
return build_links[0]
else:
# show link to the branch if no status build link was found.
return self.branch_url(task.branch)
Expand Down