You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/17 00:21:57 UTC
[GitHub] [arrow] kou commented on pull request #14429: ARROW-18068: [Dev][Archery][Crossbow] Comment bot only waits for task if link is not available
kou commented on PR #14429:
URL: https://github.com/apache/arrow/pull/14429#issuecomment-1280106679
Thanks!
But this may not work because `Task.status()` caches its `TaskStatus()`: https://github.com/apache/arrow/blob/master/dev/archery/archery/crossbow/core.py#L866-L871
We may need to call `task.status(force_query=True)` after `time.sleep()`:
```python
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:
```console
$ 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 .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org