{"action":"created","comment":{"url":"https://api.github.com/repos/linux-system-roles/test-harness/pulls/comments/201701990","pull_request_review_id":136254428,"id":201701990,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTcwMTk5MA==","diff_hunk":"@@ -370,18 +387,47 @@ def choose_task(gh, repos, images):\n             for image in images:\n                 status = statuses.get(\"linux-system-roles-test/\" + image[\"name\"])\n \n-                # Add a task if there's no status for it yet or the status is\n-                # pending without a hostname in the description\n-                if not status or (\n-                    status[\"state\"] == \"pending\" and not status.get(\"description\")\n-                ):\n+                if check_commit_needs_testing(gh, status, owner, repo, number):\n                     task = Task(owner, repo, number, head, image)\n                     tasks.append(task)\n \n     if tasks:\n         return random.choice(tasks)\n \n \n+def check_commit_needs_testing(gh, status, owner, repo, pullnr):\n+    \"\"\" Check if commit needs to be checked \"\"\"\n+    # Check it, if there's no status for it yet\n+    if not status:\n+        return True\n+\n+    # or the status is pending without a hostname in the description\n+    if status[\"state\"] == \"pending\" and not status.get(\"description\"):\n+        return True\n+\n+    last_status_update = dateutil.parser.parse(status[\"updated_at\"])\n+    comments = reversed(get_comments(gh, owner, repo, pullnr, after=last_status_update))\n+","path":"test/run-tests","position":null,"original_position":81,"commit_id":"77481e80419dfdfc499aa5f51a30da5916634608","original_commit_id":"6988f95d7a1d48bac27abbc7f796a8d670b627b6","user":{"login":"tyll","id":197720,"node_id":"MDQ6VXNlcjE5NzcyMA==","avatar_url":"https://avatars2.githubusercontent.com/u/197720?v=4","gravatar_id":"","url":"https://api.github.com/users/tyll","html_url":"https://github.com/tyll","followers_url":"https://api.github.com/users/tyll/followers","following_url":"https://api.github.com/users/tyll/following{/other_user}","gists_url":"https://api.github.com/users/tyll/gists{/gist_id}","starred_url":"https://api.github.com/users/tyll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyll/subscriptions","organizations_url":"https://api.github.com/users/tyll/orgs","repos_url":"https://api.github.com/users/tyll/repos","events_url":"https://api.github.com/users/tyll/events{/privacy}","received_events_url":"https://api.github.com/users/tyll/received_events","type":"User","site_admin":false},"body":"you are right about the `closed` message, I only compared it to the last lines of successful runs, and there it does not appear https://larsu.fedorapeople.org/logs/linux-system-roles-network-pull-69-7c5dce7-fedora-28-20180711-104714/artifacts/ansible.log - but it seems to be related to the raw tasks. I changed it to use `-v` and removed `sudo`.","created_at":"2018-07-11T14:05:16Z","updated_at":"2018-07-11T14:05:16Z","html_url":"https://github.com/linux-system-roles/test-harness/pull/34#discussion_r201701990","pull_request_url":"https://api.github.com/repos/linux-system-roles/test-harness/pulls/34","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/linux-system-roles/test-harness/pulls/comments/201701990"},"html":{"href":"https://github.com/linux-system-roles/test-harness/pull/34#discussion_r201701990"},"pull_request":{"href":"https://api.github.com/repos/linux-system-roles/test-harness/pulls/34"}},"in_reply_to_id":201622859},"pull_request":{"url":"https://api.github.com/repos/linux-system-roles/test-harness/pulls/34","id":200474730,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwNDc0NzMw","html_url":"https://github.com/linux-system-roles/test-harness/pull/34","diff_url":"https://github.com/linux-system-roles/test-harness/pull/34.diff","patch_url":"https://github.com/linux-system-roles/test-harness/pull/34.patch","issue_url":"https://api.github.com/repos/linux-system-roles/test-harness/issues/34","number":34,"state":"open","locked":false,"title":"Add more commands to be able to re-trigger tests","user":{"login":"tyll","id":197720,"node_id":"MDQ6VXNlcjE5NzcyMA==","avatar_url":"https://avatars2.githubusercontent.com/u/197720?v=4","gravatar_id":"","url":"https://api.github.com/users/tyll","html_url":"https://github.com/tyll","followers_url":"https://api.github.com/users/tyll/followers","following_url":"https://api.github.com/users/tyll/following{/other_user}","gists_url":"https://api.github.com/users/tyll/gists{/gist_id}","starred_url":"https://api.github.com/users/tyll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyll/subscriptions","organizations_url":"https://api.github.com/users/tyll/orgs","repos_url":"https://api.github.com/users/tyll/repos","events_url":"https://api.github.com/users/tyll/events{/privacy}","received_events_url":"https://api.github.com/users/tyll/received_events","type":"User","site_admin":false},"body":"It also contains two other minor corrections","created_at":"2018-07-10T17:46:26Z","updated_at":"2018-07-11T14:05:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d38daa9eb7718728fb14337b31c88ecf93ab50d2","assignee":null,"assignees":[],"requested_reviewers":[{"login":"larskarlitski","id":1221707,"node_id":"MDQ6VXNlcjEyMjE3MDc=","avatar_url":"https://avatars0.githubusercontent.com/u/1221707?v=4","gravatar_id":"","url":"https://api.github.com/users/larskarlitski","html_url":"https://github.com/larskarlitski","followers_url":"https://api.github.com/users/larskarlitski/followers","following_url":"https://api.github.com/users/larskarlitski/following{/other_user}","gists_url":"https://api.github.com/users/larskarlitski/gists{/gist_id}","starred_url":"https://api.github.com/users/larskarlitski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larskarlitski/subscriptions","organizations_url":"https://api.github.com/users/larskarlitski/orgs","repos_url":"https://api.github.com/users/larskarlitski/repos","events_url":"https://api.github.com/users/larskarlitski/events{/privacy}","received_events_url":"https://api.github.com/users/larskarlitski/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/linux-system-roles/test-harness/pulls/34/commits","review_comments_url":"https://api.github.com/repos/linux-system-roles/test-harness/pulls/34/comments","review_comment_url":"https://api.github.com/repos/linux-system-roles/test-harness/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linux-system-roles/test-harness/issues/34/comments","statuses_url":"https://api.github.com/repos/linux-system-roles/test-harness/statuses/77481e80419dfdfc499aa5f51a30da5916634608","head":{"label":"tyll:restart_test","ref":"restart_test","sha":"77481e80419dfdfc499aa5f51a30da5916634608","user":{"login":"tyll","id":197720,"node_id":"MDQ6VXNlcjE5NzcyMA==","avatar_url":"https://avatars2.githubusercontent.com/u/197720?v=4","gravatar_id":"","url":"https://api.github.com/users/tyll","html_url":"https://github.com/tyll","followers_url":"https://api.github.com/users/tyll/followers","following_url":"https://api.github.com/users/tyll/following{/other_user}","gists_url":"https://api.github.com/users/tyll/gists{/gist_id}","starred_url":"https://api.github.com/users/tyll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyll/subscriptions","organizations_url":"https://api.github.com/users/tyll/orgs","repos_url":"https://api.github.com/users/tyll/repos","events_url":"https://api.github.com/users/tyll/events{/privacy}","received_events_url":"https://api.github.com/users/tyll/received_events","type":"User","site_admin":false},"repo":{"id":133407567,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM0MDc1Njc=","name":"test-harness","full_name":"tyll/test-harness","owner":{"login":"tyll","id":197720,"node_id":"MDQ6VXNlcjE5NzcyMA==","avatar_url":"https://avatars2.githubusercontent.com/u/197720?v=4","gravatar_id":"","url":"https://api.github.com/users/tyll","html_url":"https://github.com/tyll","followers_url":"https://api.github.com/users/tyll/followers","following_url":"https://api.github.com/users/tyll/following{/other_user}","gists_url":"https://api.github.com/users/tyll/gists{/gist_id}","starred_url":"https://api.github.com/users/tyll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyll/subscriptions","organizations_url":"https://api.github.com/users/tyll/orgs","repos_url":"https://api.github.com/users/tyll/repos","events_url":"https://api.github.com/users/tyll/events{/privacy}","received_events_url":"https://api.github.com/users/tyll/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tyll/test-harness","description":"Test harness for linux system roles","fork":true,"url":"https://api.github.com/repos/tyll/test-harness","forks_url":"https://api.github.com/repos/tyll/test-harness/forks","keys_url":"https://api.github.com/repos/tyll/test-harness/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tyll/test-harness/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tyll/test-harness/teams","hooks_url":"https://api.github.com/repos/tyll/test-harness/hooks","issue_events_url":"https://api.github.com/repos/tyll/test-harness/issues/events{/number}","events_url":"https://api.github.com/repos/tyll/test-harness/events","assignees_url":"https://api.github.com/repos/tyll/test-harness/assignees{/user}","branches_url":"https://api.github.com/repos/tyll/test-harness/branches{/branch}","tags_url":"https://api.github.com/repos/tyll/test-harness/tags","blobs_url":"https://api.github.com/repos/tyll/test-harness/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tyll/test-harness/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tyll/test-harness/git/refs{/sha}","trees_url":"https://api.github.com/repos/tyll/test-harness/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tyll/test-harness/statuses/{sha}","languages_url":"https://api.github.com/repos/tyll/test-harness/languages","stargazers_url":"https://api.github.com/repos/tyll/test-harness/stargazers","contributors_url":"https://api.github.com/repos/tyll/test-harness/contributors","subscribers_url":"https://api.github.com/repos/tyll/test-harness/subscribers","subscription_url":"https://api.github.com/repos/tyll/test-harness/subscription","commits_url":"https://api.github.com/repos/tyll/test-harness/commits{/sha}","git_commits_url":"https://api.github.com/repos/tyll/test-harness/git/commits{/sha}","comments_url":"https://api.github.com/repos/tyll/test-harness/comments{/number}","issue_comment_url":"https://api.github.com/repos/tyll/test-harness/issues/comments{/number}","contents_url":"https://api.github.com/repos/tyll/test-harness/contents/{+path}","compare_url":"https://api.github.com/repos/tyll/test-harness/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tyll/test-harness/merges","archive_url":"https://api.github.com/repos/tyll/test-harness/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tyll/test-harness/downloads","issues_url":"https://api.github.com/repos/tyll/test-harness/issues{/number}","pulls_url":"https://api.github.com/repos/tyll/test-harness/pulls{/number}","milestones_url":"https://api.github.com/repos/tyll/test-harness/milestones{/number}","notifications_url":"https://api.github.com/repos/tyll/test-harness/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tyll/test-harness/labels{/name}","releases_url":"https://api.github.com/repos/tyll/test-harness/releases{/id}","deployments_url":"https://api.github.com/repos/tyll/test-harness/deployments","created_at":"2018-05-14T18:52:43Z","updated_at":"2018-07-10T14:50:03Z","pushed_at":"2018-07-11T09:43:07Z","git_url":"git://github.com/tyll/test-harness.git","ssh_url":"git@github.com:tyll/test-harness.git","clone_url":"https://github.com/tyll/test-harness.git","svn_url":"https://github.com/tyll/test-harness","homepage":null,"size":58,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"linux-system-roles:master","ref":"master","sha":"7122a05c9d69bb7fc0a2c8392379b9a2a44cde35","user":{"login":"linux-system-roles","id":28014670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MDE0Njcw","avatar_url":"https://avatars1.githubusercontent.com/u/28014670?v=4","gravatar_id":"","url":"https://api.github.com/users/linux-system-roles","html_url":"https://github.com/linux-system-roles","followers_url":"https://api.github.com/users/linux-system-roles/followers","following_url":"https://api.github.com/users/linux-system-roles/following{/other_user}","gists_url":"https://api.github.com/users/linux-system-roles/gists{/gist_id}","starred_url":"https://api.github.com/users/linux-system-roles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linux-system-roles/subscriptions","organizations_url":"https://api.github.com/users/linux-system-roles/orgs","repos_url":"https://api.github.com/users/linux-system-roles/repos","events_url":"https://api.github.com/users/linux-system-roles/events{/privacy}","received_events_url":"https://api.github.com/users/linux-system-roles/received_events","type":"Organization","site_admin":false},"repo":{"id":89464947,"node_id":"MDEwOlJlcG9zaXRvcnk4OTQ2NDk0Nw==","name":"test-harness","full_name":"linux-system-roles/test-harness","owner":{"login":"linux-system-roles","id":28014670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MDE0Njcw","avatar_url":"https://avatars1.githubusercontent.com/u/28014670?v=4","gravatar_id":"","url":"https://api.github.com/users/linux-system-roles","html_url":"https://github.com/linux-system-roles","followers_url":"https://api.github.com/users/linux-system-roles/followers","following_url":"https://api.github.com/users/linux-system-roles/following{/other_user}","gists_url":"https://api.github.com/users/linux-system-roles/gists{/gist_id}","starred_url":"https://api.github.com/users/linux-system-roles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linux-system-roles/subscriptions","organizations_url":"https://api.github.com/users/linux-system-roles/orgs","repos_url":"https://api.github.com/users/linux-system-roles/repos","events_url":"https://api.github.com/users/linux-system-roles/events{/privacy}","received_events_url":"https://api.github.com/users/linux-system-roles/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linux-system-roles/test-harness","description":"Test harness for linux system roles","fork":false,"url":"https://api.github.com/repos/linux-system-roles/test-harness","forks_url":"https://api.github.com/repos/linux-system-roles/test-harness/forks","keys_url":"https://api.github.com/repos/linux-system-roles/test-harness/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linux-system-roles/test-harness/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linux-system-roles/test-harness/teams","hooks_url":"https://api.github.com/repos/linux-system-roles/test-harness/hooks","issue_events_url":"https://api.github.com/repos/linux-system-roles/test-harness/issues/events{/number}","events_url":"https://api.github.com/repos/linux-system-roles/test-harness/events","assignees_url":"https://api.github.com/repos/linux-system-roles/test-harness/assignees{/user}","branches_url":"https://api.github.com/repos/linux-system-roles/test-harness/branches{/branch}","tags_url":"https://api.github.com/repos/linux-system-roles/test-harness/tags","blobs_url":"https://api.github.com/repos/linux-system-roles/test-harness/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linux-system-roles/test-harness/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linux-system-roles/test-harness/git/refs{/sha}","trees_url":"https://api.github.com/repos/linux-system-roles/test-harness/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linux-system-roles/test-harness/statuses/{sha}","languages_url":"https://api.github.com/repos/linux-system-roles/test-harness/languages","stargazers_url":"https://api.github.com/repos/linux-system-roles/test-harness/stargazers","contributors_url":"https://api.github.com/repos/linux-system-roles/test-harness/contributors","subscribers_url":"https://api.github.com/repos/linux-system-roles/test-harness/subscribers","subscription_url":"https://api.github.com/repos/linux-system-roles/test-harness/subscription","commits_url":"https://api.github.com/repos/linux-system-roles/test-harness/commits{/sha}","git_commits_url":"https://api.github.com/repos/linux-system-roles/test-harness/git/commits{/sha}","comments_url":"https://api.github.com/repos/linux-system-roles/test-harness/comments{/number}","issue_comment_url":"https://api.github.com/repos/linux-system-roles/test-harness/issues/comments{/number}","contents_url":"https://api.github.com/repos/linux-system-roles/test-harness/contents/{+path}","compare_url":"https://api.github.com/repos/linux-system-roles/test-harness/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linux-system-roles/test-harness/merges","archive_url":"https://api.github.com/repos/linux-system-roles/test-harness/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linux-system-roles/test-harness/downloads","issues_url":"https://api.github.com/repos/linux-system-roles/test-harness/issues{/number}","pulls_url":"https://api.github.com/repos/linux-system-roles/test-harness/pulls{/number}","milestones_url":"https://api.github.com/repos/linux-system-roles/test-harness/milestones{/number}","notifications_url":"https://api.github.com/repos/linux-system-roles/test-harness/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linux-system-roles/test-harness/labels{/name}","releases_url":"https://api.github.com/repos/linux-system-roles/test-harness/releases{/id}","deployments_url":"https://api.github.com/repos/linux-system-roles/test-harness/deployments","created_at":"2017-04-26T09:47:36Z","updated_at":"2018-07-10T14:47:47Z","pushed_at":"2018-07-11T09:43:08Z","git_url":"git://github.com/linux-system-roles/test-harness.git","ssh_url":"git@github.com:linux-system-roles/test-harness.git","clone_url":"https://github.com/linux-system-roles/test-harness.git","svn_url":"https://github.com/linux-system-roles/test-harness","homepage":null,"size":61,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":4,"open_issues":12,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linux-system-roles/test-harness/pulls/34"},"html":{"href":"https://github.com/linux-system-roles/test-harness/pull/34"},"issue":{"href":"https://api.github.com/repos/linux-system-roles/test-harness/issues/34"},"comments":{"href":"https://api.github.com/repos/linux-system-roles/test-harness/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/linux-system-roles/test-harness/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/linux-system-roles/test-harness/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linux-system-roles/test-harness/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/linux-system-roles/test-harness/statuses/77481e80419dfdfc499aa5f51a30da5916634608"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"tyll"}}