{"action":"created","comment":{"url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/comments/34202604","id":34202604,"diff_hunk":"@@ -607,7 +577,7 @@ AwsManager.prototype.instancesInRegion = function (region) {\n   if (typeof region === 'string') {\n     region = [region];\n   }\n-  return this.__apiState.instances.filter(function (instance) {\n+  return this.__apiState.instances.filter(instance => {\n     return region.includes(instance.Region);\n   });","path":"provisioner/aws-manager.js","position":538,"original_position":538,"commit_id":"d66ad0e8244d96771cdb857939f92f1c25970085","original_commit_id":"d66ad0e8244d96771cdb857939f92f1c25970085","user":{"login":"jonasfj","id":149732,"avatar_url":"https://avatars.githubusercontent.com/u/149732?v=3","gravatar_id":"","url":"https://api.github.com/users/jonasfj","html_url":"https://github.com/jonasfj","followers_url":"https://api.github.com/users/jonasfj/followers","following_url":"https://api.github.com/users/jonasfj/following{/other_user}","gists_url":"https://api.github.com/users/jonasfj/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasfj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasfj/subscriptions","organizations_url":"https://api.github.com/users/jonasfj/orgs","repos_url":"https://api.github.com/users/jonasfj/repos","events_url":"https://api.github.com/users/jonasfj/events{/privacy}","received_events_url":"https://api.github.com/users/jonasfj/received_events","type":"User","site_admin":false},"body":"If aggressive could be written as:\r\n`return this.__apiState.instances.filter(i => region.includes(i.Region));` and still fit below 80 chars :)","created_at":"2015-07-08T21:45:41Z","updated_at":"2015-07-08T21:45:41Z","html_url":"https://github.com/taskcluster/aws-provisioner/pull/31#discussion_r34202604","pull_request_url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/comments/34202604"},"html":{"href":"https://github.com/taskcluster/aws-provisioner/pull/31#discussion_r34202604"},"pull_request":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/31","id":39481881,"html_url":"https://github.com/taskcluster/aws-provisioner/pull/31","diff_url":"https://github.com/taskcluster/aws-provisioner/pull/31.diff","patch_url":"https://github.com/taskcluster/aws-provisioner/pull/31.patch","issue_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/31","number":31,"state":"open","locked":false,"title":"ES6/7 fixes and roundrobin","user":{"login":"jhford","id":607353,"avatar_url":"https://avatars.githubusercontent.com/u/607353?v=3","gravatar_id":"","url":"https://api.github.com/users/jhford","html_url":"https://github.com/jhford","followers_url":"https://api.github.com/users/jhford/followers","following_url":"https://api.github.com/users/jhford/following{/other_user}","gists_url":"https://api.github.com/users/jhford/gists{/gist_id}","starred_url":"https://api.github.com/users/jhford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhford/subscriptions","organizations_url":"https://api.github.com/users/jhford/orgs","repos_url":"https://api.github.com/users/jhford/repos","events_url":"https://api.github.com/users/jhford/events{/privacy}","received_events_url":"https://api.github.com/users/jhford/received_events","type":"User","site_admin":false},"body":"Rather than trying to trace through all the random issues, I decided to finish moving the important things over to es6/7so that I could be sure related to `that.` weren't causing trouble as I've seen before.  I also implemented the round robin stuff that @jonasfj has wanted for a while.\r\n\r\nThe biggest outstanding question I have is whether I should be doing:\r\n```javascript\r\n// assume x is a list of promises\r\nasync function () {\r\n  return await Promise.all(x)\r\n}\r\n\r\n// or\r\n\r\nasync function () {\r\n  return Promise.all(x)\r\n}\r\n\r\n// or\r\n\r\nfunction () {\r\n  return Promise.all(x)\r\n}\r\n```","created_at":"2015-07-08T14:19:36Z","updated_at":"2015-07-08T21:45:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5fa7e84534116a224f1b6451852ee1c28c6d4a97","assignee":{"login":"jonasfj","id":149732,"avatar_url":"https://avatars.githubusercontent.com/u/149732?v=3","gravatar_id":"","url":"https://api.github.com/users/jonasfj","html_url":"https://github.com/jonasfj","followers_url":"https://api.github.com/users/jonasfj/followers","following_url":"https://api.github.com/users/jonasfj/following{/other_user}","gists_url":"https://api.github.com/users/jonasfj/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasfj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasfj/subscriptions","organizations_url":"https://api.github.com/users/jonasfj/orgs","repos_url":"https://api.github.com/users/jonasfj/repos","events_url":"https://api.github.com/users/jonasfj/events{/privacy}","received_events_url":"https://api.github.com/users/jonasfj/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/31/commits","review_comments_url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/31/comments","review_comment_url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/31/comments","statuses_url":"https://api.github.com/repos/taskcluster/aws-provisioner/statuses/d66ad0e8244d96771cdb857939f92f1c25970085","head":{"label":"taskcluster:round-robin","ref":"round-robin","sha":"d66ad0e8244d96771cdb857939f92f1c25970085","user":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars.githubusercontent.com/u/6257436?v=3","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"repo":{"id":16123958,"name":"aws-provisioner","full_name":"taskcluster/aws-provisioner","owner":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars.githubusercontent.com/u/6257436?v=3","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/taskcluster/aws-provisioner","description":"AWS Provisioner for the TaskCluster","fork":false,"url":"https://api.github.com/repos/taskcluster/aws-provisioner","forks_url":"https://api.github.com/repos/taskcluster/aws-provisioner/forks","keys_url":"https://api.github.com/repos/taskcluster/aws-provisioner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taskcluster/aws-provisioner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taskcluster/aws-provisioner/teams","hooks_url":"https://api.github.com/repos/taskcluster/aws-provisioner/hooks","issue_events_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/events{/number}","events_url":"https://api.github.com/repos/taskcluster/aws-provisioner/events","assignees_url":"https://api.github.com/repos/taskcluster/aws-provisioner/assignees{/user}","branches_url":"https://api.github.com/repos/taskcluster/aws-provisioner/branches{/branch}","tags_url":"https://api.github.com/repos/taskcluster/aws-provisioner/tags","blobs_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/refs{/sha}","trees_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taskcluster/aws-provisioner/statuses/{sha}","languages_url":"https://api.github.com/repos/taskcluster/aws-provisioner/languages","stargazers_url":"https://api.github.com/repos/taskcluster/aws-provisioner/stargazers","contributors_url":"https://api.github.com/repos/taskcluster/aws-provisioner/contributors","subscribers_url":"https://api.github.com/repos/taskcluster/aws-provisioner/subscribers","subscription_url":"https://api.github.com/repos/taskcluster/aws-provisioner/subscription","commits_url":"https://api.github.com/repos/taskcluster/aws-provisioner/commits{/sha}","git_commits_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/commits{/sha}","comments_url":"https://api.github.com/repos/taskcluster/aws-provisioner/comments{/number}","issue_comment_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/comments{/number}","contents_url":"https://api.github.com/repos/taskcluster/aws-provisioner/contents/{+path}","compare_url":"https://api.github.com/repos/taskcluster/aws-provisioner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taskcluster/aws-provisioner/merges","archive_url":"https://api.github.com/repos/taskcluster/aws-provisioner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taskcluster/aws-provisioner/downloads","issues_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues{/number}","pulls_url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls{/number}","milestones_url":"https://api.github.com/repos/taskcluster/aws-provisioner/milestones{/number}","notifications_url":"https://api.github.com/repos/taskcluster/aws-provisioner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taskcluster/aws-provisioner/labels{/name}","releases_url":"https://api.github.com/repos/taskcluster/aws-provisioner/releases{/id}","created_at":"2014-01-22T00:44:52Z","updated_at":"2015-05-20T05:19:58Z","pushed_at":"2015-07-08T14:19:36Z","git_url":"git://github.com/taskcluster/aws-provisioner.git","ssh_url":"git@github.com:taskcluster/aws-provisioner.git","clone_url":"https://github.com/taskcluster/aws-provisioner.git","svn_url":"https://github.com/taskcluster/aws-provisioner","homepage":null,"size":11886,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"taskcluster:master","ref":"master","sha":"660e9ec4a169d93aabe5441adc860642d5fb4b14","user":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars.githubusercontent.com/u/6257436?v=3","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"repo":{"id":16123958,"name":"aws-provisioner","full_name":"taskcluster/aws-provisioner","owner":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars.githubusercontent.com/u/6257436?v=3","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/taskcluster/aws-provisioner","description":"AWS Provisioner for the TaskCluster","fork":false,"url":"https://api.github.com/repos/taskcluster/aws-provisioner","forks_url":"https://api.github.com/repos/taskcluster/aws-provisioner/forks","keys_url":"https://api.github.com/repos/taskcluster/aws-provisioner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taskcluster/aws-provisioner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taskcluster/aws-provisioner/teams","hooks_url":"https://api.github.com/repos/taskcluster/aws-provisioner/hooks","issue_events_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/events{/number}","events_url":"https://api.github.com/repos/taskcluster/aws-provisioner/events","assignees_url":"https://api.github.com/repos/taskcluster/aws-provisioner/assignees{/user}","branches_url":"https://api.github.com/repos/taskcluster/aws-provisioner/branches{/branch}","tags_url":"https://api.github.com/repos/taskcluster/aws-provisioner/tags","blobs_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/refs{/sha}","trees_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taskcluster/aws-provisioner/statuses/{sha}","languages_url":"https://api.github.com/repos/taskcluster/aws-provisioner/languages","stargazers_url":"https://api.github.com/repos/taskcluster/aws-provisioner/stargazers","contributors_url":"https://api.github.com/repos/taskcluster/aws-provisioner/contributors","subscribers_url":"https://api.github.com/repos/taskcluster/aws-provisioner/subscribers","subscription_url":"https://api.github.com/repos/taskcluster/aws-provisioner/subscription","commits_url":"https://api.github.com/repos/taskcluster/aws-provisioner/commits{/sha}","git_commits_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/commits{/sha}","comments_url":"https://api.github.com/repos/taskcluster/aws-provisioner/comments{/number}","issue_comment_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/comments{/number}","contents_url":"https://api.github.com/repos/taskcluster/aws-provisioner/contents/{+path}","compare_url":"https://api.github.com/repos/taskcluster/aws-provisioner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taskcluster/aws-provisioner/merges","archive_url":"https://api.github.com/repos/taskcluster/aws-provisioner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taskcluster/aws-provisioner/downloads","issues_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues{/number}","pulls_url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls{/number}","milestones_url":"https://api.github.com/repos/taskcluster/aws-provisioner/milestones{/number}","notifications_url":"https://api.github.com/repos/taskcluster/aws-provisioner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taskcluster/aws-provisioner/labels{/name}","releases_url":"https://api.github.com/repos/taskcluster/aws-provisioner/releases{/id}","created_at":"2014-01-22T00:44:52Z","updated_at":"2015-05-20T05:19:58Z","pushed_at":"2015-07-08T14:19:36Z","git_url":"git://github.com/taskcluster/aws-provisioner.git","ssh_url":"git@github.com:taskcluster/aws-provisioner.git","clone_url":"https://github.com/taskcluster/aws-provisioner.git","svn_url":"https://github.com/taskcluster/aws-provisioner","homepage":null,"size":11886,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/31"},"html":{"href":"https://github.com/taskcluster/aws-provisioner/pull/31"},"issue":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/31"},"comments":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/statuses/d66ad0e8244d96771cdb857939f92f1c25970085"}}}}