{"action":"created","issue":{"url":"https://api.github.com/repos/weaveworks/scope/issues/1554","repository_url":"https://api.github.com/repos/weaveworks/scope","labels_url":"https://api.github.com/repos/weaveworks/scope/issues/1554/labels{/name}","comments_url":"https://api.github.com/repos/weaveworks/scope/issues/1554/comments","events_url":"https://api.github.com/repos/weaveworks/scope/issues/1554/events","html_url":"https://github.com/weaveworks/scope/pull/1554","id":158994095,"number":1554,"title":"Fetch non-cached reports in parallel","user":{"login":"jml","id":125674,"avatar_url":"https://avatars.githubusercontent.com/u/125674?v=3","gravatar_id":"","url":"https://api.github.com/users/jml","html_url":"https://github.com/jml","followers_url":"https://api.github.com/users/jml/followers","following_url":"https://api.github.com/users/jml/following{/other_user}","gists_url":"https://api.github.com/users/jml/gists{/gist_id}","starred_url":"https://api.github.com/users/jml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jml/subscriptions","organizations_url":"https://api.github.com/users/jml/orgs","repos_url":"https://api.github.com/users/jml/repos","events_url":"https://api.github.com/users/jml/events{/privacy}","received_events_url":"https://api.github.com/users/jml/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-07T18:38:00Z","updated_at":"2016-06-07T19:01:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/weaveworks/scope/pulls/1554","html_url":"https://github.com/weaveworks/scope/pull/1554","diff_url":"https://github.com/weaveworks/scope/pull/1554.diff","patch_url":"https://github.com/weaveworks/scope/pull/1554.patch"},"body":"Currently, if a bunch of requested reports aren't in the cache, we fetch them one at a time inline with the request. This patch updates the code to fetch reports in parallel instead.\r\n\r\nWhile making the change, I noticed that we handled S3 errors differently from gzip & decoder errors. I've updated the code to handle all errors in the same way (i.e. no special logging, just return).\r\n\r\nCurrently, `getNonCached` returns only the first error it finds. It should probably aggregate all of the errors somehow so we aren't silently ignoring important conditions. I don't know how best to do that.\r\n\r\nAlong the way, I extracted the logic for fetching a single report (to make the actual parallelism logic more clear).\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/weaveworks/scope/1554)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/weaveworks/scope/issues/comments/224380974","html_url":"https://github.com/weaveworks/scope/pull/1554#issuecomment-224380974","issue_url":"https://api.github.com/repos/weaveworks/scope/issues/1554","id":224380974,"user":{"login":"jml","id":125674,"avatar_url":"https://avatars.githubusercontent.com/u/125674?v=3","gravatar_id":"","url":"https://api.github.com/users/jml","html_url":"https://github.com/jml","followers_url":"https://api.github.com/users/jml/followers","following_url":"https://api.github.com/users/jml/following{/other_user}","gists_url":"https://api.github.com/users/jml/gists{/gist_id}","starred_url":"https://api.github.com/users/jml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jml/subscriptions","organizations_url":"https://api.github.com/users/jml/orgs","repos_url":"https://api.github.com/users/jml/repos","events_url":"https://api.github.com/users/jml/events{/privacy}","received_events_url":"https://api.github.com/users/jml/received_events","type":"User","site_admin":false},"created_at":"2016-06-07T19:01:19Z","updated_at":"2016-06-07T19:01:19Z","body":"Haven't actually run it on my laptop, so will at least do that before landing.\r\n\r\nI'll also at least attempt to write unit tests (but might end up deciding they're too hard). "}}
{"actor":{"display_login":"jml"}}