{"action":"created","comment":{"url":"https://api.github.com/repos/tmm1/test-queue/pulls/comments/69677913","id":69677913,"diff_hunk":"@@ -13,13 +13,22 @@ def initialize(sock, suites, filter=nil)\n         @tcp_address = $1\n         @tcp_port = $2.to_i\n       end\n+      @failures = 0\n     end\n \n     def each\n       fail \"already used this iterator. previous caller: #@done\" if @done\n \n       while true\n-        client = connect_to_master('POP')\n+        # If we've hit too many failures in one worker, assume the entire\n+        # test suite is broken, and notify master so the run\n+        # can be immediately halted.\n+        if ENV[\"TEST_QUEUE_EARLY_FAILURE_LIMIT\"] && @failures >= ENV[\"TEST_QUEUE_EARLY_FAILURE_LIMIT\"].to_i","path":"lib/test_queue/iterator.rb","position":null,"original_position":15,"commit_id":"2750032d4e9603894dbf8893862e8752f8c3cb90","original_commit_id":"5d5cca4e04f6391990416b6401db93f22064a969","user":{"login":"mistydemeo","id":780485,"avatar_url":"https://avatars.githubusercontent.com/u/780485?v=3","gravatar_id":"","url":"https://api.github.com/users/mistydemeo","html_url":"https://github.com/mistydemeo","followers_url":"https://api.github.com/users/mistydemeo/followers","following_url":"https://api.github.com/users/mistydemeo/following{/other_user}","gists_url":"https://api.github.com/users/mistydemeo/gists{/gist_id}","starred_url":"https://api.github.com/users/mistydemeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mistydemeo/subscriptions","organizations_url":"https://api.github.com/users/mistydemeo/orgs","repos_url":"https://api.github.com/users/mistydemeo/repos","events_url":"https://api.github.com/users/mistydemeo/events{/privacy}","received_events_url":"https://api.github.com/users/mistydemeo/received_events","type":"User","site_admin":true},"body":"Good idea; switched to using `Integer()`, and moved the parsing into `Runner`'s initialization, with an informative message if parsing fails.","created_at":"2016-07-06T05:44:07Z","updated_at":"2016-07-06T05:44:07Z","html_url":"https://github.com/tmm1/test-queue/pull/38#discussion_r69677913","pull_request_url":"https://api.github.com/repos/tmm1/test-queue/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/tmm1/test-queue/pulls/comments/69677913"},"html":{"href":"https://github.com/tmm1/test-queue/pull/38#discussion_r69677913"},"pull_request":{"href":"https://api.github.com/repos/tmm1/test-queue/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/tmm1/test-queue/pulls/38","id":72399505,"html_url":"https://github.com/tmm1/test-queue/pull/38","diff_url":"https://github.com/tmm1/test-queue/pull/38.diff","patch_url":"https://github.com/tmm1/test-queue/pull/38.patch","issue_url":"https://api.github.com/repos/tmm1/test-queue/issues/38","number":38,"state":"open","locked":false,"title":"Enable fast failures","user":{"login":"mistydemeo","id":780485,"avatar_url":"https://avatars.githubusercontent.com/u/780485?v=3","gravatar_id":"","url":"https://api.github.com/users/mistydemeo","html_url":"https://github.com/mistydemeo","followers_url":"https://api.github.com/users/mistydemeo/followers","following_url":"https://api.github.com/users/mistydemeo/following{/other_user}","gists_url":"https://api.github.com/users/mistydemeo/gists{/gist_id}","starred_url":"https://api.github.com/users/mistydemeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mistydemeo/subscriptions","organizations_url":"https://api.github.com/users/mistydemeo/orgs","repos_url":"https://api.github.com/users/mistydemeo/repos","events_url":"https://api.github.com/users/mistydemeo/events{/privacy}","received_events_url":"https://api.github.com/users/mistydemeo/received_events","type":"User","site_admin":true},"body":"This allows builds to optionally be halted early if any worker encounters abnormal numbers of test failures.\r\n\r\nThe number of failures to halt at is defined in the `TEST_QUEUE_EARLY_FAILURE_LIMIT` environment variable; if defined, at the end of each suite, the worker will compare the number of failures it's encountered to date via that number. If it hits the limit, the worker immediately halts itself and notifies master with the new `KABOOM` command; if master encounters `KABOOM`, it stops distributing jobs and reaps all of the workers immediately without waiting for completion, then prints the results.\r\n\r\nThis can be useful for very large test suites; for example, if a CI system is regularly testing branches which can take multiple minutes to complete, it can be helpful for it to be able to abort early if it looks like every test is going to fail due to environment issues (bad test database, etc.)\r\n\r\nI added support for measuring test failures per-suite for minitest, rspec, and Test::Unit, but not cucumber and puppet_lint.\r\n\r\nThis needs some more testing, but appears to be working fine in `test.sh` calls.\r\n\r\ncc @bhuga ","created_at":"2016-06-02T19:00:55Z","updated_at":"2016-07-06T05:44:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7537bc45a9b17d47f8e3b1f28cfe7514241cf446","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tmm1/test-queue/pulls/38/commits","review_comments_url":"https://api.github.com/repos/tmm1/test-queue/pulls/38/comments","review_comment_url":"https://api.github.com/repos/tmm1/test-queue/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tmm1/test-queue/issues/38/comments","statuses_url":"https://api.github.com/repos/tmm1/test-queue/statuses/2750032d4e9603894dbf8893862e8752f8c3cb90","head":{"label":"mistydemeo:fast_failure","ref":"fast_failure","sha":"2750032d4e9603894dbf8893862e8752f8c3cb90","user":{"login":"mistydemeo","id":780485,"avatar_url":"https://avatars.githubusercontent.com/u/780485?v=3","gravatar_id":"","url":"https://api.github.com/users/mistydemeo","html_url":"https://github.com/mistydemeo","followers_url":"https://api.github.com/users/mistydemeo/followers","following_url":"https://api.github.com/users/mistydemeo/following{/other_user}","gists_url":"https://api.github.com/users/mistydemeo/gists{/gist_id}","starred_url":"https://api.github.com/users/mistydemeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mistydemeo/subscriptions","organizations_url":"https://api.github.com/users/mistydemeo/orgs","repos_url":"https://api.github.com/users/mistydemeo/repos","events_url":"https://api.github.com/users/mistydemeo/events{/privacy}","received_events_url":"https://api.github.com/users/mistydemeo/received_events","type":"User","site_admin":true},"repo":{"id":60288529,"name":"test-queue","full_name":"mistydemeo/test-queue","owner":{"login":"mistydemeo","id":780485,"avatar_url":"https://avatars.githubusercontent.com/u/780485?v=3","gravatar_id":"","url":"https://api.github.com/users/mistydemeo","html_url":"https://github.com/mistydemeo","followers_url":"https://api.github.com/users/mistydemeo/followers","following_url":"https://api.github.com/users/mistydemeo/following{/other_user}","gists_url":"https://api.github.com/users/mistydemeo/gists{/gist_id}","starred_url":"https://api.github.com/users/mistydemeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mistydemeo/subscriptions","organizations_url":"https://api.github.com/users/mistydemeo/orgs","repos_url":"https://api.github.com/users/mistydemeo/repos","events_url":"https://api.github.com/users/mistydemeo/events{/privacy}","received_events_url":"https://api.github.com/users/mistydemeo/received_events","type":"User","site_admin":true},"private":false,"html_url":"https://github.com/mistydemeo/test-queue","description":"parallel test runner for CI environments","fork":true,"url":"https://api.github.com/repos/mistydemeo/test-queue","forks_url":"https://api.github.com/repos/mistydemeo/test-queue/forks","keys_url":"https://api.github.com/repos/mistydemeo/test-queue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mistydemeo/test-queue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mistydemeo/test-queue/teams","hooks_url":"https://api.github.com/repos/mistydemeo/test-queue/hooks","issue_events_url":"https://api.github.com/repos/mistydemeo/test-queue/issues/events{/number}","events_url":"https://api.github.com/repos/mistydemeo/test-queue/events","assignees_url":"https://api.github.com/repos/mistydemeo/test-queue/assignees{/user}","branches_url":"https://api.github.com/repos/mistydemeo/test-queue/branches{/branch}","tags_url":"https://api.github.com/repos/mistydemeo/test-queue/tags","blobs_url":"https://api.github.com/repos/mistydemeo/test-queue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mistydemeo/test-queue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mistydemeo/test-queue/git/refs{/sha}","trees_url":"https://api.github.com/repos/mistydemeo/test-queue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mistydemeo/test-queue/statuses/{sha}","languages_url":"https://api.github.com/repos/mistydemeo/test-queue/languages","stargazers_url":"https://api.github.com/repos/mistydemeo/test-queue/stargazers","contributors_url":"https://api.github.com/repos/mistydemeo/test-queue/contributors","subscribers_url":"https://api.github.com/repos/mistydemeo/test-queue/subscribers","subscription_url":"https://api.github.com/repos/mistydemeo/test-queue/subscription","commits_url":"https://api.github.com/repos/mistydemeo/test-queue/commits{/sha}","git_commits_url":"https://api.github.com/repos/mistydemeo/test-queue/git/commits{/sha}","comments_url":"https://api.github.com/repos/mistydemeo/test-queue/comments{/number}","issue_comment_url":"https://api.github.com/repos/mistydemeo/test-queue/issues/comments{/number}","contents_url":"https://api.github.com/repos/mistydemeo/test-queue/contents/{+path}","compare_url":"https://api.github.com/repos/mistydemeo/test-queue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mistydemeo/test-queue/merges","archive_url":"https://api.github.com/repos/mistydemeo/test-queue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mistydemeo/test-queue/downloads","issues_url":"https://api.github.com/repos/mistydemeo/test-queue/issues{/number}","pulls_url":"https://api.github.com/repos/mistydemeo/test-queue/pulls{/number}","milestones_url":"https://api.github.com/repos/mistydemeo/test-queue/milestones{/number}","notifications_url":"https://api.github.com/repos/mistydemeo/test-queue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mistydemeo/test-queue/labels{/name}","releases_url":"https://api.github.com/repos/mistydemeo/test-queue/releases{/id}","deployments_url":"https://api.github.com/repos/mistydemeo/test-queue/deployments","created_at":"2016-06-02T18:39:58Z","updated_at":"2016-06-02T18:39:59Z","pushed_at":"2016-07-06T05:43:42Z","git_url":"git://github.com/mistydemeo/test-queue.git","ssh_url":"git@github.com:mistydemeo/test-queue.git","clone_url":"https://github.com/mistydemeo/test-queue.git","svn_url":"https://github.com/mistydemeo/test-queue","homepage":null,"size":106,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tmm1:master","ref":"master","sha":"9e4bf92ccb4ad6fd84a088c9245a90164f6427b3","user":{"login":"tmm1","id":2567,"avatar_url":"https://avatars.githubusercontent.com/u/2567?v=3","gravatar_id":"","url":"https://api.github.com/users/tmm1","html_url":"https://github.com/tmm1","followers_url":"https://api.github.com/users/tmm1/followers","following_url":"https://api.github.com/users/tmm1/following{/other_user}","gists_url":"https://api.github.com/users/tmm1/gists{/gist_id}","starred_url":"https://api.github.com/users/tmm1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmm1/subscriptions","organizations_url":"https://api.github.com/users/tmm1/orgs","repos_url":"https://api.github.com/users/tmm1/repos","events_url":"https://api.github.com/users/tmm1/events{/privacy}","received_events_url":"https://api.github.com/users/tmm1/received_events","type":"User","site_admin":true},"repo":{"id":9632648,"name":"test-queue","full_name":"tmm1/test-queue","owner":{"login":"tmm1","id":2567,"avatar_url":"https://avatars.githubusercontent.com/u/2567?v=3","gravatar_id":"","url":"https://api.github.com/users/tmm1","html_url":"https://github.com/tmm1","followers_url":"https://api.github.com/users/tmm1/followers","following_url":"https://api.github.com/users/tmm1/following{/other_user}","gists_url":"https://api.github.com/users/tmm1/gists{/gist_id}","starred_url":"https://api.github.com/users/tmm1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmm1/subscriptions","organizations_url":"https://api.github.com/users/tmm1/orgs","repos_url":"https://api.github.com/users/tmm1/repos","events_url":"https://api.github.com/users/tmm1/events{/privacy}","received_events_url":"https://api.github.com/users/tmm1/received_events","type":"User","site_admin":true},"private":false,"html_url":"https://github.com/tmm1/test-queue","description":"parallel test runner for CI environments","fork":false,"url":"https://api.github.com/repos/tmm1/test-queue","forks_url":"https://api.github.com/repos/tmm1/test-queue/forks","keys_url":"https://api.github.com/repos/tmm1/test-queue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmm1/test-queue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmm1/test-queue/teams","hooks_url":"https://api.github.com/repos/tmm1/test-queue/hooks","issue_events_url":"https://api.github.com/repos/tmm1/test-queue/issues/events{/number}","events_url":"https://api.github.com/repos/tmm1/test-queue/events","assignees_url":"https://api.github.com/repos/tmm1/test-queue/assignees{/user}","branches_url":"https://api.github.com/repos/tmm1/test-queue/branches{/branch}","tags_url":"https://api.github.com/repos/tmm1/test-queue/tags","blobs_url":"https://api.github.com/repos/tmm1/test-queue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmm1/test-queue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmm1/test-queue/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmm1/test-queue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmm1/test-queue/statuses/{sha}","languages_url":"https://api.github.com/repos/tmm1/test-queue/languages","stargazers_url":"https://api.github.com/repos/tmm1/test-queue/stargazers","contributors_url":"https://api.github.com/repos/tmm1/test-queue/contributors","subscribers_url":"https://api.github.com/repos/tmm1/test-queue/subscribers","subscription_url":"https://api.github.com/repos/tmm1/test-queue/subscription","commits_url":"https://api.github.com/repos/tmm1/test-queue/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmm1/test-queue/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmm1/test-queue/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmm1/test-queue/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmm1/test-queue/contents/{+path}","compare_url":"https://api.github.com/repos/tmm1/test-queue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmm1/test-queue/merges","archive_url":"https://api.github.com/repos/tmm1/test-queue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmm1/test-queue/downloads","issues_url":"https://api.github.com/repos/tmm1/test-queue/issues{/number}","pulls_url":"https://api.github.com/repos/tmm1/test-queue/pulls{/number}","milestones_url":"https://api.github.com/repos/tmm1/test-queue/milestones{/number}","notifications_url":"https://api.github.com/repos/tmm1/test-queue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmm1/test-queue/labels{/name}","releases_url":"https://api.github.com/repos/tmm1/test-queue/releases{/id}","deployments_url":"https://api.github.com/repos/tmm1/test-queue/deployments","created_at":"2013-04-23T20:30:57Z","updated_at":"2016-07-03T00:40:05Z","pushed_at":"2016-07-06T05:43:42Z","git_url":"git://github.com/tmm1/test-queue.git","ssh_url":"git@github.com:tmm1/test-queue.git","clone_url":"https://github.com/tmm1/test-queue.git","svn_url":"https://github.com/tmm1/test-queue","homepage":null,"size":151,"stargazers_count":438,"watchers_count":438,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":12,"forks":36,"open_issues":12,"watchers":438,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tmm1/test-queue/pulls/38"},"html":{"href":"https://github.com/tmm1/test-queue/pull/38"},"issue":{"href":"https://api.github.com/repos/tmm1/test-queue/issues/38"},"comments":{"href":"https://api.github.com/repos/tmm1/test-queue/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/tmm1/test-queue/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/tmm1/test-queue/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tmm1/test-queue/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/tmm1/test-queue/statuses/2750032d4e9603894dbf8893862e8752f8c3cb90"}}}}
{"actor":{"display_login":"mistydemeo"}}