{"action":"created","comment":{"url":"https://api.github.com/repos/m-lab/bigsanity/pulls/comments/49799203","id":49799203,"diff_hunk":"@@ -119,6 +120,48 @@ def test_check_fails_when_extra_ids_are_in_per_project_table_only(self):\n              '  mock_id_3\\n'\n              'BigQuery SQL:\\n' + formatting.indent(MOCK_QUERY)))\n \n+    def test_check_trims_list_of_extra_ids_when_the_list_is_large(self):\n+        \"\"\"When the check finds many extra test_ids, we should trim the list.\n+\n+        If the list of extra test_id values is very long, we should trim it\n+        down, remove duplicates, and sort it.\n+        \"\"\"\n+        mock_query_result = 'per_month_test_id,per_project_test_id\\n'\n+\n+        # Add the first 5 values out of order.\n+        mock_query_result += ',mock_id_03\\n'\n+        mock_query_result += ',mock_id_00\\n'\n+        mock_query_result += ',mock_id_02\\n'\n+        mock_query_result += ',mock_id_04\\n'\n+        mock_query_result += ',mock_id_01\\n'\n+\n+        # Add 100 more rows with duplicates.\n+        for i in range(0, 100):\n+            mock_query_result += ',mock_id_%02d\\n' % i\n+\n+        self.query_executor.execute_query.return_value = mock_query_result\n+\n+        check_result = self.checker.check(constants.PROJECT_ID_NDT, START_TIME,\n+                                          END_TIME)\n+        self.assertFalse(check_result.success)\n+        self.assertMultiLineEqual(\n+            check_result.message,\n+            ('Check failed: TABLE EQUIVALENCE\\n'\n+             'test_id values present in per-project table, but NOT present in '\n+             'per-month table:\\n'\n+             '  mock_id_00\\n'","path":"tests/test_check_table_equivalence.py","position":41,"original_position":41,"commit_id":"bf2999357bca623deadf031419dd2862999c0353","original_commit_id":"bf2999357bca623deadf031419dd2862999c0353","user":{"login":"nkinkade","id":1392825,"avatar_url":"https://avatars.githubusercontent.com/u/1392825?v=3","gravatar_id":"","url":"https://api.github.com/users/nkinkade","html_url":"https://github.com/nkinkade","followers_url":"https://api.github.com/users/nkinkade/followers","following_url":"https://api.github.com/users/nkinkade/following{/other_user}","gists_url":"https://api.github.com/users/nkinkade/gists{/gist_id}","starred_url":"https://api.github.com/users/nkinkade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkinkade/subscriptions","organizations_url":"https://api.github.com/users/nkinkade/orgs","repos_url":"https://api.github.com/users/nkinkade/repos","events_url":"https://api.github.com/users/nkinkade/events{/privacy}","received_events_url":"https://api.github.com/users/nkinkade/received_events","type":"User","site_admin":false},"body":"Will this check fail if someone decides that the [default spaces for indenting](https://github.com/mtlynch/bigsanity/blob/collapse-output/bigsanity/formatting.py#L16) is something other than 2? ","created_at":"2016-01-14T23:01:38Z","updated_at":"2016-01-14T23:01:38Z","html_url":"https://github.com/m-lab/bigsanity/pull/24#discussion_r49799203","pull_request_url":"https://api.github.com/repos/m-lab/bigsanity/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/m-lab/bigsanity/pulls/comments/49799203"},"html":{"href":"https://github.com/m-lab/bigsanity/pull/24#discussion_r49799203"},"pull_request":{"href":"https://api.github.com/repos/m-lab/bigsanity/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/m-lab/bigsanity/pulls/24","id":56072769,"html_url":"https://github.com/m-lab/bigsanity/pull/24","diff_url":"https://github.com/m-lab/bigsanity/pull/24.diff","patch_url":"https://github.com/m-lab/bigsanity/pull/24.patch","issue_url":"https://api.github.com/repos/m-lab/bigsanity/issues/24","number":24,"state":"open","locked":false,"title":"Trims the size of check failure messages when there are many test_ids","user":{"login":"mtlynch","id":7783288,"avatar_url":"https://avatars.githubusercontent.com/u/7783288?v=3","gravatar_id":"","url":"https://api.github.com/users/mtlynch","html_url":"https://github.com/mtlynch","followers_url":"https://api.github.com/users/mtlynch/followers","following_url":"https://api.github.com/users/mtlynch/following{/other_user}","gists_url":"https://api.github.com/users/mtlynch/gists{/gist_id}","starred_url":"https://api.github.com/users/mtlynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtlynch/subscriptions","organizations_url":"https://api.github.com/users/mtlynch/orgs","repos_url":"https://api.github.com/users/mtlynch/repos","events_url":"https://api.github.com/users/mtlynch/events{/privacy}","received_events_url":"https://api.github.com/users/mtlynch/received_events","type":"User","site_admin":false},"body":"The list of mismatched test_id values can get very long (like thousands\r\nof entries long for a single check). It's not useful to print the full\r\nlist to the console, so this adds intelligence to trim down the list\r\ninto a manageable size of no more than 10 items, with duplicates\r\nremoved.","created_at":"2016-01-14T18:16:10Z","updated_at":"2016-01-14T23:01:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad6fbe77ebc0d369d2ec64cd73b91cc5b79e0c72","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/m-lab/bigsanity/pulls/24/commits","review_comments_url":"https://api.github.com/repos/m-lab/bigsanity/pulls/24/comments","review_comment_url":"https://api.github.com/repos/m-lab/bigsanity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/m-lab/bigsanity/issues/24/comments","statuses_url":"https://api.github.com/repos/m-lab/bigsanity/statuses/bf2999357bca623deadf031419dd2862999c0353","head":{"label":"mtlynch:collapse-output","ref":"collapse-output","sha":"bf2999357bca623deadf031419dd2862999c0353","user":{"login":"mtlynch","id":7783288,"avatar_url":"https://avatars.githubusercontent.com/u/7783288?v=3","gravatar_id":"","url":"https://api.github.com/users/mtlynch","html_url":"https://github.com/mtlynch","followers_url":"https://api.github.com/users/mtlynch/followers","following_url":"https://api.github.com/users/mtlynch/following{/other_user}","gists_url":"https://api.github.com/users/mtlynch/gists{/gist_id}","starred_url":"https://api.github.com/users/mtlynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtlynch/subscriptions","organizations_url":"https://api.github.com/users/mtlynch/orgs","repos_url":"https://api.github.com/users/mtlynch/repos","events_url":"https://api.github.com/users/mtlynch/events{/privacy}","received_events_url":"https://api.github.com/users/mtlynch/received_events","type":"User","site_admin":false},"repo":{"id":47427372,"name":"bigsanity","full_name":"mtlynch/bigsanity","owner":{"login":"mtlynch","id":7783288,"avatar_url":"https://avatars.githubusercontent.com/u/7783288?v=3","gravatar_id":"","url":"https://api.github.com/users/mtlynch","html_url":"https://github.com/mtlynch","followers_url":"https://api.github.com/users/mtlynch/followers","following_url":"https://api.github.com/users/mtlynch/following{/other_user}","gists_url":"https://api.github.com/users/mtlynch/gists{/gist_id}","starred_url":"https://api.github.com/users/mtlynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtlynch/subscriptions","organizations_url":"https://api.github.com/users/mtlynch/orgs","repos_url":"https://api.github.com/users/mtlynch/repos","events_url":"https://api.github.com/users/mtlynch/events{/privacy}","received_events_url":"https://api.github.com/users/mtlynch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mtlynch/bigsanity","description":"M-Lab’s Big Data Sanity Checker","fork":true,"url":"https://api.github.com/repos/mtlynch/bigsanity","forks_url":"https://api.github.com/repos/mtlynch/bigsanity/forks","keys_url":"https://api.github.com/repos/mtlynch/bigsanity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mtlynch/bigsanity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mtlynch/bigsanity/teams","hooks_url":"https://api.github.com/repos/mtlynch/bigsanity/hooks","issue_events_url":"https://api.github.com/repos/mtlynch/bigsanity/issues/events{/number}","events_url":"https://api.github.com/repos/mtlynch/bigsanity/events","assignees_url":"https://api.github.com/repos/mtlynch/bigsanity/assignees{/user}","branches_url":"https://api.github.com/repos/mtlynch/bigsanity/branches{/branch}","tags_url":"https://api.github.com/repos/mtlynch/bigsanity/tags","blobs_url":"https://api.github.com/repos/mtlynch/bigsanity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mtlynch/bigsanity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mtlynch/bigsanity/git/refs{/sha}","trees_url":"https://api.github.com/repos/mtlynch/bigsanity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mtlynch/bigsanity/statuses/{sha}","languages_url":"https://api.github.com/repos/mtlynch/bigsanity/languages","stargazers_url":"https://api.github.com/repos/mtlynch/bigsanity/stargazers","contributors_url":"https://api.github.com/repos/mtlynch/bigsanity/contributors","subscribers_url":"https://api.github.com/repos/mtlynch/bigsanity/subscribers","subscription_url":"https://api.github.com/repos/mtlynch/bigsanity/subscription","commits_url":"https://api.github.com/repos/mtlynch/bigsanity/commits{/sha}","git_commits_url":"https://api.github.com/repos/mtlynch/bigsanity/git/commits{/sha}","comments_url":"https://api.github.com/repos/mtlynch/bigsanity/comments{/number}","issue_comment_url":"https://api.github.com/repos/mtlynch/bigsanity/issues/comments{/number}","contents_url":"https://api.github.com/repos/mtlynch/bigsanity/contents/{+path}","compare_url":"https://api.github.com/repos/mtlynch/bigsanity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mtlynch/bigsanity/merges","archive_url":"https://api.github.com/repos/mtlynch/bigsanity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mtlynch/bigsanity/downloads","issues_url":"https://api.github.com/repos/mtlynch/bigsanity/issues{/number}","pulls_url":"https://api.github.com/repos/mtlynch/bigsanity/pulls{/number}","milestones_url":"https://api.github.com/repos/mtlynch/bigsanity/milestones{/number}","notifications_url":"https://api.github.com/repos/mtlynch/bigsanity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mtlynch/bigsanity/labels{/name}","releases_url":"https://api.github.com/repos/mtlynch/bigsanity/releases{/id}","created_at":"2015-12-04T20:32:24Z","updated_at":"2016-01-14T16:40:00Z","pushed_at":"2016-01-14T18:28:44Z","git_url":"git://github.com/mtlynch/bigsanity.git","ssh_url":"git@github.com:mtlynch/bigsanity.git","clone_url":"https://github.com/mtlynch/bigsanity.git","svn_url":"https://github.com/mtlynch/bigsanity","homepage":null,"size":49,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"m-lab:master","ref":"master","sha":"034ef1c5da012108c65c5005709c2128a9909dd7","user":{"login":"m-lab","id":3496264,"avatar_url":"https://avatars.githubusercontent.com/u/3496264?v=3","gravatar_id":"","url":"https://api.github.com/users/m-lab","html_url":"https://github.com/m-lab","followers_url":"https://api.github.com/users/m-lab/followers","following_url":"https://api.github.com/users/m-lab/following{/other_user}","gists_url":"https://api.github.com/users/m-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/m-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-lab/subscriptions","organizations_url":"https://api.github.com/users/m-lab/orgs","repos_url":"https://api.github.com/users/m-lab/repos","events_url":"https://api.github.com/users/m-lab/events{/privacy}","received_events_url":"https://api.github.com/users/m-lab/received_events","type":"Organization","site_admin":false},"repo":{"id":47427362,"name":"bigsanity","full_name":"m-lab/bigsanity","owner":{"login":"m-lab","id":3496264,"avatar_url":"https://avatars.githubusercontent.com/u/3496264?v=3","gravatar_id":"","url":"https://api.github.com/users/m-lab","html_url":"https://github.com/m-lab","followers_url":"https://api.github.com/users/m-lab/followers","following_url":"https://api.github.com/users/m-lab/following{/other_user}","gists_url":"https://api.github.com/users/m-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/m-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-lab/subscriptions","organizations_url":"https://api.github.com/users/m-lab/orgs","repos_url":"https://api.github.com/users/m-lab/repos","events_url":"https://api.github.com/users/m-lab/events{/privacy}","received_events_url":"https://api.github.com/users/m-lab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/m-lab/bigsanity","description":"M-Lab’s Big Data Sanity Checker","fork":false,"url":"https://api.github.com/repos/m-lab/bigsanity","forks_url":"https://api.github.com/repos/m-lab/bigsanity/forks","keys_url":"https://api.github.com/repos/m-lab/bigsanity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m-lab/bigsanity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m-lab/bigsanity/teams","hooks_url":"https://api.github.com/repos/m-lab/bigsanity/hooks","issue_events_url":"https://api.github.com/repos/m-lab/bigsanity/issues/events{/number}","events_url":"https://api.github.com/repos/m-lab/bigsanity/events","assignees_url":"https://api.github.com/repos/m-lab/bigsanity/assignees{/user}","branches_url":"https://api.github.com/repos/m-lab/bigsanity/branches{/branch}","tags_url":"https://api.github.com/repos/m-lab/bigsanity/tags","blobs_url":"https://api.github.com/repos/m-lab/bigsanity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m-lab/bigsanity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m-lab/bigsanity/git/refs{/sha}","trees_url":"https://api.github.com/repos/m-lab/bigsanity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m-lab/bigsanity/statuses/{sha}","languages_url":"https://api.github.com/repos/m-lab/bigsanity/languages","stargazers_url":"https://api.github.com/repos/m-lab/bigsanity/stargazers","contributors_url":"https://api.github.com/repos/m-lab/bigsanity/contributors","subscribers_url":"https://api.github.com/repos/m-lab/bigsanity/subscribers","subscription_url":"https://api.github.com/repos/m-lab/bigsanity/subscription","commits_url":"https://api.github.com/repos/m-lab/bigsanity/commits{/sha}","git_commits_url":"https://api.github.com/repos/m-lab/bigsanity/git/commits{/sha}","comments_url":"https://api.github.com/repos/m-lab/bigsanity/comments{/number}","issue_comment_url":"https://api.github.com/repos/m-lab/bigsanity/issues/comments{/number}","contents_url":"https://api.github.com/repos/m-lab/bigsanity/contents/{+path}","compare_url":"https://api.github.com/repos/m-lab/bigsanity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m-lab/bigsanity/merges","archive_url":"https://api.github.com/repos/m-lab/bigsanity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m-lab/bigsanity/downloads","issues_url":"https://api.github.com/repos/m-lab/bigsanity/issues{/number}","pulls_url":"https://api.github.com/repos/m-lab/bigsanity/pulls{/number}","milestones_url":"https://api.github.com/repos/m-lab/bigsanity/milestones{/number}","notifications_url":"https://api.github.com/repos/m-lab/bigsanity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m-lab/bigsanity/labels{/name}","releases_url":"https://api.github.com/repos/m-lab/bigsanity/releases{/id}","created_at":"2015-12-04T20:32:13Z","updated_at":"2016-01-11T15:24:41Z","pushed_at":"2016-01-14T18:28:45Z","git_url":"git://github.com/m-lab/bigsanity.git","ssh_url":"git@github.com:m-lab/bigsanity.git","clone_url":"https://github.com/m-lab/bigsanity.git","svn_url":"https://github.com/m-lab/bigsanity","homepage":null,"size":45,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":8,"forks":1,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/m-lab/bigsanity/pulls/24"},"html":{"href":"https://github.com/m-lab/bigsanity/pull/24"},"issue":{"href":"https://api.github.com/repos/m-lab/bigsanity/issues/24"},"comments":{"href":"https://api.github.com/repos/m-lab/bigsanity/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/m-lab/bigsanity/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/m-lab/bigsanity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/m-lab/bigsanity/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/m-lab/bigsanity/statuses/bf2999357bca623deadf031419dd2862999c0353"}}}}