-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Conversation
@kou the fix I initially proposed yesterday was good, I was just too sleepy and I had to test it. Let me know what you think. Thanks |
Thanks! def task_url(self, task):
# Only wait if the link to the actual build is not present.
if not task.status().build_links and self._wait_for_task:
time.sleep(self._wait_for_task)
task.status(force_query=True) FYI: I tested #14412 by the followings: $ cat /tmp/a.json
{
"sender": {
"login": "kou"
},
"action": "created",
"repository": {
"id": "apache/arrow"
},
"issue": {
"number": 14409
},
"comment": {
"id": 1278350487,
"body": "@github-actions crossbow submit r-binary-packages",
"author_association": "OWNER"
}
}
$ ARROW_GITHUB_TOKEN='...' CROSSBOW_GITHUB_TOKEN='...' GITHUB_SERVER_URL=https://github.com GITHUB_REPOSITORY=apache/arrow GITHUB_RUN_ID=3246777470 archery trigger-bot --event-name issue_comment --event-payload /tmp/a.json The result will be commented to #14409 . |
Revision: a7a9c98 Submitted crossbow builds: ursacomputing/crossbow @ actions-42c1da27e0
|
…ld use the branch URL
Thanks @kou the snippet to test was super useful I was testing adding a commit to my master branch fork: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Thanks!
This has been tested on my own fork. Previous to the PR if the comment for the bot contained multiple tasks we were waiting multiple times, see log for the comment bot and the new log I added here https://github.com/raulcd/arrow/actions/runs/3260111092/jobs/5353427827#step:6:99 , output:
Comment triggered on this PR on my own fork:
raulcd#10
Once the fix is applied the same comment bot only waits once (the first one because the task url is not available) log here https://github.com/raulcd/arrow/actions/runs/3260112211/jobs/5353429747#step:6:99, output:
Comment bot triggered on this PR on my own fork:
raulcd#12