{"action":"created","comment":{"url":"https://api.github.com/repos/treasure-data/digdag/pulls/comments/77324942","id":77324942,"diff_hunk":"@@ -46,4 +70,30 @@ public void scheduleStartTime()\n             assertThat(enqueueCount, is(0L));\n         }\n     }\n+\n+    @Test\n+    public void verifyUncaughtErrorCount()\n+            throws Exception\n+    {\n+        assumeThat(server.isRemoteDatabase(), is(true));\n+\n+        try (JMXConnector con = connectJmx(server)) {\n+            MBeanServerConnection beans = con.getMBeanServerConnection();\n+\n+            Object uncaughtErrorCount = beans.getAttribute(ObjectName.getInstance(\"io.digdag.core\", \"name\", \"ErrorReporter\"), \"UncaughtErrorCount\");\n+            assertThat(uncaughtErrorCount, is(0));\n+\n+            // oops, tasks table is broken!?\n+            try (DataSourceProvider dsp = new DataSourceProvider(server.getRemoteTestDatabaseConfig())) {\n+                Statement stmt = dsp.get().getConnection().createStatement();\n+                stmt.execute(\"drop table tasks cascade\");","path":"digdag-tests/src/test/java/acceptance/ServerJmxIT.java","position":85,"original_position":85,"commit_id":"471f3ee7055c763c0d6e21e006a630d49f8b2485","original_commit_id":"471f3ee7055c763c0d6e21e006a630d49f8b2485","user":{"login":"komamitsu","id":59043,"avatar_url":"https://avatars.githubusercontent.com/u/59043?v=3","gravatar_id":"","url":"https://api.github.com/users/komamitsu","html_url":"https://github.com/komamitsu","followers_url":"https://api.github.com/users/komamitsu/followers","following_url":"https://api.github.com/users/komamitsu/following{/other_user}","gists_url":"https://api.github.com/users/komamitsu/gists{/gist_id}","starred_url":"https://api.github.com/users/komamitsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/komamitsu/subscriptions","organizations_url":"https://api.github.com/users/komamitsu/orgs","repos_url":"https://api.github.com/users/komamitsu/repos","events_url":"https://api.github.com/users/komamitsu/events{/privacy}","received_events_url":"https://api.github.com/users/komamitsu/received_events","type":"User","site_admin":false},"body":"👍 ","created_at":"2016-09-02T10:20:58Z","updated_at":"2016-09-02T10:20:58Z","html_url":"https://github.com/treasure-data/digdag/pull/258#discussion_r77324942","pull_request_url":"https://api.github.com/repos/treasure-data/digdag/pulls/258","_links":{"self":{"href":"https://api.github.com/repos/treasure-data/digdag/pulls/comments/77324942"},"html":{"href":"https://github.com/treasure-data/digdag/pull/258#discussion_r77324942"},"pull_request":{"href":"https://api.github.com/repos/treasure-data/digdag/pulls/258"}}},"pull_request":{"url":"https://api.github.com/repos/treasure-data/digdag/pulls/258","id":83710186,"html_url":"https://github.com/treasure-data/digdag/pull/258","diff_url":"https://github.com/treasure-data/digdag/pull/258.diff","patch_url":"https://github.com/treasure-data/digdag/pull/258.patch","issue_url":"https://api.github.com/repos/treasure-data/digdag/issues/258","number":258,"state":"open","locked":false,"title":"Report uncaught errors through JMX ","user":{"login":"frsyuki","id":40720,"avatar_url":"https://avatars.githubusercontent.com/u/40720?v=3","gravatar_id":"","url":"https://api.github.com/users/frsyuki","html_url":"https://github.com/frsyuki","followers_url":"https://api.github.com/users/frsyuki/followers","following_url":"https://api.github.com/users/frsyuki/following{/other_user}","gists_url":"https://api.github.com/users/frsyuki/gists{/gist_id}","starred_url":"https://api.github.com/users/frsyuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frsyuki/subscriptions","organizations_url":"https://api.github.com/users/frsyuki/orgs","repos_url":"https://api.github.com/users/frsyuki/repos","events_url":"https://api.github.com/users/frsyuki/events{/privacy}","received_events_url":"https://api.github.com/users/frsyuki/received_events","type":"User","site_admin":false},"body":"Background executor threads try to recover from uncaught errors as much\r\nas possible. However, because those errors are unexpected, system\r\nadministrators should be notified. This change introduces new\r\nErrorReporter interface so that administrators can customize the behavior\r\nwhen uncaught errors are thrown. Default implementation reports counts\r\nusing JMX.\r\n\r\n#257 is an example that should be notified.\r\n\r\nThis change assumes #257. Changes since #257 is https://github.com/treasure-data/digdag/compare/retry-workflow-executor-loop...report-unexpected-errors\r\n\r\n","created_at":"2016-09-01T21:27:46Z","updated_at":"2016-09-02T10:20:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f261b3dac9256030d41ceff4375b09f30c74042","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/treasure-data/digdag/pulls/258/commits","review_comments_url":"https://api.github.com/repos/treasure-data/digdag/pulls/258/comments","review_comment_url":"https://api.github.com/repos/treasure-data/digdag/pulls/comments{/number}","comments_url":"https://api.github.com/repos/treasure-data/digdag/issues/258/comments","statuses_url":"https://api.github.com/repos/treasure-data/digdag/statuses/471f3ee7055c763c0d6e21e006a630d49f8b2485","head":{"label":"treasure-data:report-unexpected-errors","ref":"report-unexpected-errors","sha":"471f3ee7055c763c0d6e21e006a630d49f8b2485","user":{"login":"treasure-data","id":747746,"avatar_url":"https://avatars.githubusercontent.com/u/747746?v=3","gravatar_id":"","url":"https://api.github.com/users/treasure-data","html_url":"https://github.com/treasure-data","followers_url":"https://api.github.com/users/treasure-data/followers","following_url":"https://api.github.com/users/treasure-data/following{/other_user}","gists_url":"https://api.github.com/users/treasure-data/gists{/gist_id}","starred_url":"https://api.github.com/users/treasure-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treasure-data/subscriptions","organizations_url":"https://api.github.com/users/treasure-data/orgs","repos_url":"https://api.github.com/users/treasure-data/repos","events_url":"https://api.github.com/users/treasure-data/events{/privacy}","received_events_url":"https://api.github.com/users/treasure-data/received_events","type":"Organization","site_admin":false},"repo":{"id":42751387,"name":"digdag","full_name":"treasure-data/digdag","owner":{"login":"treasure-data","id":747746,"avatar_url":"https://avatars.githubusercontent.com/u/747746?v=3","gravatar_id":"","url":"https://api.github.com/users/treasure-data","html_url":"https://github.com/treasure-data","followers_url":"https://api.github.com/users/treasure-data/followers","following_url":"https://api.github.com/users/treasure-data/following{/other_user}","gists_url":"https://api.github.com/users/treasure-data/gists{/gist_id}","starred_url":"https://api.github.com/users/treasure-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treasure-data/subscriptions","organizations_url":"https://api.github.com/users/treasure-data/orgs","repos_url":"https://api.github.com/users/treasure-data/repos","events_url":"https://api.github.com/users/treasure-data/events{/privacy}","received_events_url":"https://api.github.com/users/treasure-data/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/treasure-data/digdag","description":"Workload Automation System","fork":false,"url":"https://api.github.com/repos/treasure-data/digdag","forks_url":"https://api.github.com/repos/treasure-data/digdag/forks","keys_url":"https://api.github.com/repos/treasure-data/digdag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/treasure-data/digdag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/treasure-data/digdag/teams","hooks_url":"https://api.github.com/repos/treasure-data/digdag/hooks","issue_events_url":"https://api.github.com/repos/treasure-data/digdag/issues/events{/number}","events_url":"https://api.github.com/repos/treasure-data/digdag/events","assignees_url":"https://api.github.com/repos/treasure-data/digdag/assignees{/user}","branches_url":"https://api.github.com/repos/treasure-data/digdag/branches{/branch}","tags_url":"https://api.github.com/repos/treasure-data/digdag/tags","blobs_url":"https://api.github.com/repos/treasure-data/digdag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/treasure-data/digdag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/treasure-data/digdag/git/refs{/sha}","trees_url":"https://api.github.com/repos/treasure-data/digdag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/treasure-data/digdag/statuses/{sha}","languages_url":"https://api.github.com/repos/treasure-data/digdag/languages","stargazers_url":"https://api.github.com/repos/treasure-data/digdag/stargazers","contributors_url":"https://api.github.com/repos/treasure-data/digdag/contributors","subscribers_url":"https://api.github.com/repos/treasure-data/digdag/subscribers","subscription_url":"https://api.github.com/repos/treasure-data/digdag/subscription","commits_url":"https://api.github.com/repos/treasure-data/digdag/commits{/sha}","git_commits_url":"https://api.github.com/repos/treasure-data/digdag/git/commits{/sha}","comments_url":"https://api.github.com/repos/treasure-data/digdag/comments{/number}","issue_comment_url":"https://api.github.com/repos/treasure-data/digdag/issues/comments{/number}","contents_url":"https://api.github.com/repos/treasure-data/digdag/contents/{+path}","compare_url":"https://api.github.com/repos/treasure-data/digdag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/treasure-data/digdag/merges","archive_url":"https://api.github.com/repos/treasure-data/digdag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/treasure-data/digdag/downloads","issues_url":"https://api.github.com/repos/treasure-data/digdag/issues{/number}","pulls_url":"https://api.github.com/repos/treasure-data/digdag/pulls{/number}","milestones_url":"https://api.github.com/repos/treasure-data/digdag/milestones{/number}","notifications_url":"https://api.github.com/repos/treasure-data/digdag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/treasure-data/digdag/labels{/name}","releases_url":"https://api.github.com/repos/treasure-data/digdag/releases{/id}","deployments_url":"https://api.github.com/repos/treasure-data/digdag/deployments","created_at":"2015-09-18T23:18:08Z","updated_at":"2016-09-02T00:59:45Z","pushed_at":"2016-09-02T04:00:22Z","git_url":"git://github.com/treasure-data/digdag.git","ssh_url":"git@github.com:treasure-data/digdag.git","clone_url":"https://github.com/treasure-data/digdag.git","svn_url":"https://github.com/treasure-data/digdag","homepage":"http://www.digdag.io/","size":3788,"stargazers_count":203,"watchers_count":203,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":37,"forks":27,"open_issues":37,"watchers":203,"default_branch":"master"}},"base":{"label":"treasure-data:master","ref":"master","sha":"bfc1b641057ffdc8415e14fb194f4e2b4a4235ba","user":{"login":"treasure-data","id":747746,"avatar_url":"https://avatars.githubusercontent.com/u/747746?v=3","gravatar_id":"","url":"https://api.github.com/users/treasure-data","html_url":"https://github.com/treasure-data","followers_url":"https://api.github.com/users/treasure-data/followers","following_url":"https://api.github.com/users/treasure-data/following{/other_user}","gists_url":"https://api.github.com/users/treasure-data/gists{/gist_id}","starred_url":"https://api.github.com/users/treasure-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treasure-data/subscriptions","organizations_url":"https://api.github.com/users/treasure-data/orgs","repos_url":"https://api.github.com/users/treasure-data/repos","events_url":"https://api.github.com/users/treasure-data/events{/privacy}","received_events_url":"https://api.github.com/users/treasure-data/received_events","type":"Organization","site_admin":false},"repo":{"id":42751387,"name":"digdag","full_name":"treasure-data/digdag","owner":{"login":"treasure-data","id":747746,"avatar_url":"https://avatars.githubusercontent.com/u/747746?v=3","gravatar_id":"","url":"https://api.github.com/users/treasure-data","html_url":"https://github.com/treasure-data","followers_url":"https://api.github.com/users/treasure-data/followers","following_url":"https://api.github.com/users/treasure-data/following{/other_user}","gists_url":"https://api.github.com/users/treasure-data/gists{/gist_id}","starred_url":"https://api.github.com/users/treasure-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treasure-data/subscriptions","organizations_url":"https://api.github.com/users/treasure-data/orgs","repos_url":"https://api.github.com/users/treasure-data/repos","events_url":"https://api.github.com/users/treasure-data/events{/privacy}","received_events_url":"https://api.github.com/users/treasure-data/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/treasure-data/digdag","description":"Workload Automation System","fork":false,"url":"https://api.github.com/repos/treasure-data/digdag","forks_url":"https://api.github.com/repos/treasure-data/digdag/forks","keys_url":"https://api.github.com/repos/treasure-data/digdag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/treasure-data/digdag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/treasure-data/digdag/teams","hooks_url":"https://api.github.com/repos/treasure-data/digdag/hooks","issue_events_url":"https://api.github.com/repos/treasure-data/digdag/issues/events{/number}","events_url":"https://api.github.com/repos/treasure-data/digdag/events","assignees_url":"https://api.github.com/repos/treasure-data/digdag/assignees{/user}","branches_url":"https://api.github.com/repos/treasure-data/digdag/branches{/branch}","tags_url":"https://api.github.com/repos/treasure-data/digdag/tags","blobs_url":"https://api.github.com/repos/treasure-data/digdag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/treasure-data/digdag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/treasure-data/digdag/git/refs{/sha}","trees_url":"https://api.github.com/repos/treasure-data/digdag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/treasure-data/digdag/statuses/{sha}","languages_url":"https://api.github.com/repos/treasure-data/digdag/languages","stargazers_url":"https://api.github.com/repos/treasure-data/digdag/stargazers","contributors_url":"https://api.github.com/repos/treasure-data/digdag/contributors","subscribers_url":"https://api.github.com/repos/treasure-data/digdag/subscribers","subscription_url":"https://api.github.com/repos/treasure-data/digdag/subscription","commits_url":"https://api.github.com/repos/treasure-data/digdag/commits{/sha}","git_commits_url":"https://api.github.com/repos/treasure-data/digdag/git/commits{/sha}","comments_url":"https://api.github.com/repos/treasure-data/digdag/comments{/number}","issue_comment_url":"https://api.github.com/repos/treasure-data/digdag/issues/comments{/number}","contents_url":"https://api.github.com/repos/treasure-data/digdag/contents/{+path}","compare_url":"https://api.github.com/repos/treasure-data/digdag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/treasure-data/digdag/merges","archive_url":"https://api.github.com/repos/treasure-data/digdag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/treasure-data/digdag/downloads","issues_url":"https://api.github.com/repos/treasure-data/digdag/issues{/number}","pulls_url":"https://api.github.com/repos/treasure-data/digdag/pulls{/number}","milestones_url":"https://api.github.com/repos/treasure-data/digdag/milestones{/number}","notifications_url":"https://api.github.com/repos/treasure-data/digdag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/treasure-data/digdag/labels{/name}","releases_url":"https://api.github.com/repos/treasure-data/digdag/releases{/id}","deployments_url":"https://api.github.com/repos/treasure-data/digdag/deployments","created_at":"2015-09-18T23:18:08Z","updated_at":"2016-09-02T00:59:45Z","pushed_at":"2016-09-02T04:00:22Z","git_url":"git://github.com/treasure-data/digdag.git","ssh_url":"git@github.com:treasure-data/digdag.git","clone_url":"https://github.com/treasure-data/digdag.git","svn_url":"https://github.com/treasure-data/digdag","homepage":"http://www.digdag.io/","size":3788,"stargazers_count":203,"watchers_count":203,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":37,"forks":27,"open_issues":37,"watchers":203,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/treasure-data/digdag/pulls/258"},"html":{"href":"https://github.com/treasure-data/digdag/pull/258"},"issue":{"href":"https://api.github.com/repos/treasure-data/digdag/issues/258"},"comments":{"href":"https://api.github.com/repos/treasure-data/digdag/issues/258/comments"},"review_comments":{"href":"https://api.github.com/repos/treasure-data/digdag/pulls/258/comments"},"review_comment":{"href":"https://api.github.com/repos/treasure-data/digdag/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/treasure-data/digdag/pulls/258/commits"},"statuses":{"href":"https://api.github.com/repos/treasure-data/digdag/statuses/471f3ee7055c763c0d6e21e006a630d49f8b2485"}}}}
{"actor":{"display_login":"komamitsu"}}