{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/1122","repository_url":"https://api.github.com/repos/GoogleChrome/lighthouse","labels_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/1122/labels{/name}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/1122/comments","events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/1122/events","html_url":"https://github.com/GoogleChrome/lighthouse/pull/1122","id":194237012,"number":1122,"title":"refactor: get artifacts directly from running gatherer methods","user":{"login":"brendankenny","id":316891,"avatar_url":"https://avatars.githubusercontent.com/u/316891?v=3","gravatar_id":"","url":"https://api.github.com/users/brendankenny","html_url":"https://github.com/brendankenny","followers_url":"https://api.github.com/users/brendankenny/followers","following_url":"https://api.github.com/users/brendankenny/following{/other_user}","gists_url":"https://api.github.com/users/brendankenny/gists{/gist_id}","starred_url":"https://api.github.com/users/brendankenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendankenny/subscriptions","organizations_url":"https://api.github.com/users/brendankenny/orgs","repos_url":"https://api.github.com/users/brendankenny/repos","events_url":"https://api.github.com/users/brendankenny/events{/privacy}","received_events_url":"https://api.github.com/users/brendankenny/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-08T03:18:10Z","updated_at":"2016-12-13T07:01:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/1122","html_url":"https://github.com/GoogleChrome/lighthouse/pull/1122","diff_url":"https://github.com/GoogleChrome/lighthouse/pull/1122.diff","patch_url":"https://github.com/GoogleChrome/lighthouse/pull/1122.patch"},"body":"R: @paulirish @patrickhulce \r\n\r\nnext part of #941\r\n\r\n- Removes `this.artifact` from gatherers and instead have gatherers return the artifact directly in whatever value is returned last from `beforePass()`, `pass()`, or `afterPass()`.\r\n- When gatherers reject on an error, we have a new opt-in property `recoverable` on the error that gather-runner checks. If set to `true`, it will turn that into an \"error artifact\", equivalent to the many versions of -1 artifacts we have today.\r\n- If `recoverable` isn't present, it throws the error and lighthouse exits on the error. By making it explicit when a gatherer expects an error, this should help catch more errors than our current system (which absorbs all errors in the gatherer stage)\r\n- gatherer's methods can return (or throw) synchronously or asynchronously\r\n\r\nThis PR doesn't actually take advantage of recoverable errors yet, as it was already getting really big. Merely implements support for them, adds unit tests for them, and gets rid of `gatherer.artifact` on all the current artifacts. So most work here is in `gather-runner.js` and `gather-runner-test.js`.\r\n\r\nFeel free to bikeshed/propose other control flows.\r\n\r\nNext PR will delete all the -1 nonsense from gatherers and replace with this system when we're certain this is the direction we want to go."},"comment":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/comments/266662514","html_url":"https://github.com/GoogleChrome/lighthouse/pull/1122#issuecomment-266662514","issue_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/1122","id":266662514,"user":{"login":"brendankenny","id":316891,"avatar_url":"https://avatars.githubusercontent.com/u/316891?v=3","gravatar_id":"","url":"https://api.github.com/users/brendankenny","html_url":"https://github.com/brendankenny","followers_url":"https://api.github.com/users/brendankenny/followers","following_url":"https://api.github.com/users/brendankenny/following{/other_user}","gists_url":"https://api.github.com/users/brendankenny/gists{/gist_id}","starred_url":"https://api.github.com/users/brendankenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendankenny/subscriptions","organizations_url":"https://api.github.com/users/brendankenny/orgs","repos_url":"https://api.github.com/users/brendankenny/repos","events_url":"https://api.github.com/users/brendankenny/events{/privacy}","received_events_url":"https://api.github.com/users/brendankenny/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T07:01:29Z","updated_at":"2016-12-13T07:01:29Z","body":"removed redundant `.then()` calls"}}
{"actor":{"display_login":"brendankenny"}}