{"action":"created","comment":{"url":"https://api.github.com/repos/salesforce/refocus-collector/pulls/comments/209106693","pull_request_review_id":145053093,"id":209106693,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTEwNjY5Mw==","diff_hunk":"@@ -46,7 +41,8 @@ module.exports = () => {\n     collectorConfig: changed,\n   };\n \n-  return httpUtils.doPost(urlToPost, collectorToken, proxy, requestbody, cutoff)\n+  return httpUtils.doPost(urlToPost, cr.collectorToken, cr.proxy, requestbody,\n+    cutoff)\n   .then((res) => listener(null, res.body))\n   .catch((err) => listener(err, null));","path":"src/heartbeat/heartbeat.js","position":42,"original_position":42,"commit_id":"36d75d2a213280a48b1eb3e56b0f3c62b2a0db8a","original_commit_id":"36d75d2a213280a48b1eb3e56b0f3c62b2a0db8a","user":{"login":"jgraff2","id":22939895,"node_id":"MDQ6VXNlcjIyOTM5ODk1","avatar_url":"https://avatars1.githubusercontent.com/u/22939895?v=4","gravatar_id":"","url":"https://api.github.com/users/jgraff2","html_url":"https://github.com/jgraff2","followers_url":"https://api.github.com/users/jgraff2/followers","following_url":"https://api.github.com/users/jgraff2/following{/other_user}","gists_url":"https://api.github.com/users/jgraff2/gists{/gist_id}","starred_url":"https://api.github.com/users/jgraff2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgraff2/subscriptions","organizations_url":"https://api.github.com/users/jgraff2/orgs","repos_url":"https://api.github.com/users/jgraff2/repos","events_url":"https://api.github.com/users/jgraff2/events{/privacy}","received_events_url":"https://api.github.com/users/jgraff2/received_events","type":"User","site_admin":false},"body":"Since we have a separate onError function now, it might make this more clear to expose that and call it directly here.","created_at":"2018-08-09T23:16:56Z","updated_at":"2018-08-09T23:33:25Z","html_url":"https://github.com/salesforce/refocus-collector/pull/143#discussion_r209106693","pull_request_url":"https://api.github.com/repos/salesforce/refocus-collector/pulls/143","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/salesforce/refocus-collector/pulls/comments/209106693"},"html":{"href":"https://github.com/salesforce/refocus-collector/pull/143#discussion_r209106693"},"pull_request":{"href":"https://api.github.com/repos/salesforce/refocus-collector/pulls/143"}}},"pull_request":{"url":"https://api.github.com/repos/salesforce/refocus-collector/pulls/143","id":207455866,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3NDU1ODY2","html_url":"https://github.com/salesforce/refocus-collector/pull/143","diff_url":"https://github.com/salesforce/refocus-collector/pull/143.diff","patch_url":"https://github.com/salesforce/refocus-collector/pull/143.patch","issue_url":"https://api.github.com/repos/salesforce/refocus-collector/issues/143","number":143,"state":"open","locked":false,"title":"Handle heartbeat errors by pausing/resuming generator repeaters,…","user":{"login":"iamigo","id":4086227,"node_id":"MDQ6VXNlcjQwODYyMjc=","avatar_url":"https://avatars0.githubusercontent.com/u/4086227?v=4","gravatar_id":"","url":"https://api.github.com/users/iamigo","html_url":"https://github.com/iamigo","followers_url":"https://api.github.com/users/iamigo/followers","following_url":"https://api.github.com/users/iamigo/following{/other_user}","gists_url":"https://api.github.com/users/iamigo/gists{/gist_id}","starred_url":"https://api.github.com/users/iamigo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamigo/subscriptions","organizations_url":"https://api.github.com/users/iamigo/orgs","repos_url":"https://api.github.com/users/iamigo/repos","events_url":"https://api.github.com/users/iamigo/events{/privacy}","received_events_url":"https://api.github.com/users/iamigo/received_events","type":"User","site_admin":false},"body":"… remove subject from repeater validation\r\n\r\n- src/heartbeat/listener.js\r\n  - move error handling to separate fn for readability\r\n  - wrap all the code in the main listener fn and the onError fn in try/catch so that errors don't bubble up and get caught by heartbeat.js itself, which should only be catching errors from the heartbeat POST request\r\n  - if the heartbeat POST request returns an error, pause all the generator repeaters and set a new local var pausedAfterHeartbeatError to true; once we get a good heartbeat response, if pausedAfterHeartbeatError is true, resume the generator repeaters\r\n  - sanitize config debug using attributesToSanitize instead of hard-coded array of attribute names\r\n\r\n- src/repeater/repeater.js\r\n  - update validateDefinition - no longer needs to check the subjects attribute - just check for duplicate name being tracked\r\n  - update pauseGenerators/resumeGenerators - no return value needed (was only there for tests, no longer needed)\r\n  - track names of paused generators - make it easier to test\r\n  - add comments about errors being thrown\r\n  - minor style changes and cleanup\r\n\r\n- test/heartbeat/listener.js\r\n  - confirm that generator repeaters are paused after a heartbeat error and resumed after next good heartbeat\r\n\r\n- test/repeater/repeater.js\r\n  - update tests to check repeater.paused\r\n\r\nOther Changes\r\n\r\n- src/commands/start.js\r\n  - minor change to use the new simplified sanitize fn\r\n\r\n- src/config/config.js\r\n  - export the names of the attributes to sanitize when sanitizing config data (instead of hard-coding them everywhere we actually debug the config)\r\n\r\n- src/heartbeat/heartbeat.js\r\n  - minor style changes and cleanup\r\n  - sanitize config debug using attributesToSanitize instead of hard-coded array of attribute names\r\n\r\n- src/heartbeat/utils.js\r\n  - add comments about errors being thrown\r\n  - fix the setupRepeater function comments to reflect the \"bulk vs. bySubject\" work Samee did previously\r\n  - minor style changes and cleanup\r\n  - minor change to use the new simplified sanitize fn\r\n\r\n- src/utils/commonUtils.js\r\n  - simplify the way callers call the sanitize fn by setting a default value for the \"keys\" arg to [\"token\"]\r\n\r\n- src/utils/queue.js\r\n  - minor change to use the new simplified sanitize fn\r\n\r\n- test/heartbeat/heartbeat.js\r\n  - minor style changes\r\n\r\n- test/utils/commonUtils.js\r\n  - test sanitize fn using new keys default","created_at":"2018-08-09T21:58:46Z","updated_at":"2018-08-09T23:33:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d985212b9e6f7540fba7679fc3899bf3b089c7f0","assignee":null,"assignees":[],"requested_reviewers":[{"login":"cassiodias","id":1087469,"node_id":"MDQ6VXNlcjEwODc0Njk=","avatar_url":"https://avatars1.githubusercontent.com/u/1087469?v=4","gravatar_id":"","url":"https://api.github.com/users/cassiodias","html_url":"https://github.com/cassiodias","followers_url":"https://api.github.com/users/cassiodias/followers","following_url":"https://api.github.com/users/cassiodias/following{/other_user}","gists_url":"https://api.github.com/users/cassiodias/gists{/gist_id}","starred_url":"https://api.github.com/users/cassiodias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cassiodias/subscriptions","organizations_url":"https://api.github.com/users/cassiodias/orgs","repos_url":"https://api.github.com/users/cassiodias/repos","events_url":"https://api.github.com/users/cassiodias/events{/privacy}","received_events_url":"https://api.github.com/users/cassiodias/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/salesforce/refocus-collector/pulls/143/commits","review_comments_url":"https://api.github.com/repos/salesforce/refocus-collector/pulls/143/comments","review_comment_url":"https://api.github.com/repos/salesforce/refocus-collector/pulls/comments{/number}","comments_url":"https://api.github.com/repos/salesforce/refocus-collector/issues/143/comments","statuses_url":"https://api.github.com/repos/salesforce/refocus-collector/statuses/36d75d2a213280a48b1eb3e56b0f3c62b2a0db8a","head":{"label":"salesforce:hb-error-handling","ref":"hb-error-handling","sha":"36d75d2a213280a48b1eb3e56b0f3c62b2a0db8a","user":{"login":"salesforce","id":453694,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MzY5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"repo":{"id":91374910,"node_id":"MDEwOlJlcG9zaXRvcnk5MTM3NDkxMA==","name":"refocus-collector","full_name":"salesforce/refocus-collector","owner":{"login":"salesforce","id":453694,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MzY5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/salesforce/refocus-collector","description":null,"fork":false,"url":"https://api.github.com/repos/salesforce/refocus-collector","forks_url":"https://api.github.com/repos/salesforce/refocus-collector/forks","keys_url":"https://api.github.com/repos/salesforce/refocus-collector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salesforce/refocus-collector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salesforce/refocus-collector/teams","hooks_url":"https://api.github.com/repos/salesforce/refocus-collector/hooks","issue_events_url":"https://api.github.com/repos/salesforce/refocus-collector/issues/events{/number}","events_url":"https://api.github.com/repos/salesforce/refocus-collector/events","assignees_url":"https://api.github.com/repos/salesforce/refocus-collector/assignees{/user}","branches_url":"https://api.github.com/repos/salesforce/refocus-collector/branches{/branch}","tags_url":"https://api.github.com/repos/salesforce/refocus-collector/tags","blobs_url":"https://api.github.com/repos/salesforce/refocus-collector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salesforce/refocus-collector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salesforce/refocus-collector/git/refs{/sha}","trees_url":"https://api.github.com/repos/salesforce/refocus-collector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salesforce/refocus-collector/statuses/{sha}","languages_url":"https://api.github.com/repos/salesforce/refocus-collector/languages","stargazers_url":"https://api.github.com/repos/salesforce/refocus-collector/stargazers","contributors_url":"https://api.github.com/repos/salesforce/refocus-collector/contributors","subscribers_url":"https://api.github.com/repos/salesforce/refocus-collector/subscribers","subscription_url":"https://api.github.com/repos/salesforce/refocus-collector/subscription","commits_url":"https://api.github.com/repos/salesforce/refocus-collector/commits{/sha}","git_commits_url":"https://api.github.com/repos/salesforce/refocus-collector/git/commits{/sha}","comments_url":"https://api.github.com/repos/salesforce/refocus-collector/comments{/number}","issue_comment_url":"https://api.github.com/repos/salesforce/refocus-collector/issues/comments{/number}","contents_url":"https://api.github.com/repos/salesforce/refocus-collector/contents/{+path}","compare_url":"https://api.github.com/repos/salesforce/refocus-collector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salesforce/refocus-collector/merges","archive_url":"https://api.github.com/repos/salesforce/refocus-collector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salesforce/refocus-collector/downloads","issues_url":"https://api.github.com/repos/salesforce/refocus-collector/issues{/number}","pulls_url":"https://api.github.com/repos/salesforce/refocus-collector/pulls{/number}","milestones_url":"https://api.github.com/repos/salesforce/refocus-collector/milestones{/number}","notifications_url":"https://api.github.com/repos/salesforce/refocus-collector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salesforce/refocus-collector/labels{/name}","releases_url":"https://api.github.com/repos/salesforce/refocus-collector/releases{/id}","deployments_url":"https://api.github.com/repos/salesforce/refocus-collector/deployments","created_at":"2017-05-15T19:08:45Z","updated_at":"2018-08-06T23:44:19Z","pushed_at":"2018-08-09T21:58:47Z","git_url":"git://github.com/salesforce/refocus-collector.git","ssh_url":"git@github.com:salesforce/refocus-collector.git","clone_url":"https://github.com/salesforce/refocus-collector.git","svn_url":"https://github.com/salesforce/refocus-collector","homepage":null,"size":691,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":2,"open_issues":3,"watchers":5,"default_branch":"master"}},"base":{"label":"salesforce:master","ref":"master","sha":"fe653b3c30db7f16e1efc49394efbfff4f669a47","user":{"login":"salesforce","id":453694,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MzY5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"repo":{"id":91374910,"node_id":"MDEwOlJlcG9zaXRvcnk5MTM3NDkxMA==","name":"refocus-collector","full_name":"salesforce/refocus-collector","owner":{"login":"salesforce","id":453694,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MzY5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/salesforce/refocus-collector","description":null,"fork":false,"url":"https://api.github.com/repos/salesforce/refocus-collector","forks_url":"https://api.github.com/repos/salesforce/refocus-collector/forks","keys_url":"https://api.github.com/repos/salesforce/refocus-collector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salesforce/refocus-collector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salesforce/refocus-collector/teams","hooks_url":"https://api.github.com/repos/salesforce/refocus-collector/hooks","issue_events_url":"https://api.github.com/repos/salesforce/refocus-collector/issues/events{/number}","events_url":"https://api.github.com/repos/salesforce/refocus-collector/events","assignees_url":"https://api.github.com/repos/salesforce/refocus-collector/assignees{/user}","branches_url":"https://api.github.com/repos/salesforce/refocus-collector/branches{/branch}","tags_url":"https://api.github.com/repos/salesforce/refocus-collector/tags","blobs_url":"https://api.github.com/repos/salesforce/refocus-collector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salesforce/refocus-collector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salesforce/refocus-collector/git/refs{/sha}","trees_url":"https://api.github.com/repos/salesforce/refocus-collector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salesforce/refocus-collector/statuses/{sha}","languages_url":"https://api.github.com/repos/salesforce/refocus-collector/languages","stargazers_url":"https://api.github.com/repos/salesforce/refocus-collector/stargazers","contributors_url":"https://api.github.com/repos/salesforce/refocus-collector/contributors","subscribers_url":"https://api.github.com/repos/salesforce/refocus-collector/subscribers","subscription_url":"https://api.github.com/repos/salesforce/refocus-collector/subscription","commits_url":"https://api.github.com/repos/salesforce/refocus-collector/commits{/sha}","git_commits_url":"https://api.github.com/repos/salesforce/refocus-collector/git/commits{/sha}","comments_url":"https://api.github.com/repos/salesforce/refocus-collector/comments{/number}","issue_comment_url":"https://api.github.com/repos/salesforce/refocus-collector/issues/comments{/number}","contents_url":"https://api.github.com/repos/salesforce/refocus-collector/contents/{+path}","compare_url":"https://api.github.com/repos/salesforce/refocus-collector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salesforce/refocus-collector/merges","archive_url":"https://api.github.com/repos/salesforce/refocus-collector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salesforce/refocus-collector/downloads","issues_url":"https://api.github.com/repos/salesforce/refocus-collector/issues{/number}","pulls_url":"https://api.github.com/repos/salesforce/refocus-collector/pulls{/number}","milestones_url":"https://api.github.com/repos/salesforce/refocus-collector/milestones{/number}","notifications_url":"https://api.github.com/repos/salesforce/refocus-collector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salesforce/refocus-collector/labels{/name}","releases_url":"https://api.github.com/repos/salesforce/refocus-collector/releases{/id}","deployments_url":"https://api.github.com/repos/salesforce/refocus-collector/deployments","created_at":"2017-05-15T19:08:45Z","updated_at":"2018-08-06T23:44:19Z","pushed_at":"2018-08-09T21:58:47Z","git_url":"git://github.com/salesforce/refocus-collector.git","ssh_url":"git@github.com:salesforce/refocus-collector.git","clone_url":"https://github.com/salesforce/refocus-collector.git","svn_url":"https://github.com/salesforce/refocus-collector","homepage":null,"size":691,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":2,"open_issues":3,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/salesforce/refocus-collector/pulls/143"},"html":{"href":"https://github.com/salesforce/refocus-collector/pull/143"},"issue":{"href":"https://api.github.com/repos/salesforce/refocus-collector/issues/143"},"comments":{"href":"https://api.github.com/repos/salesforce/refocus-collector/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/salesforce/refocus-collector/pulls/143/comments"},"review_comment":{"href":"https://api.github.com/repos/salesforce/refocus-collector/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/salesforce/refocus-collector/pulls/143/commits"},"statuses":{"href":"https://api.github.com/repos/salesforce/refocus-collector/statuses/36d75d2a213280a48b1eb3e56b0f3c62b2a0db8a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jgraff2"}}