{"action":"created","comment":{"url":"https://api.github.com/repos/kelda/kelda/pulls/comments/144674780","pull_request_review_id":69370959,"id":144674780,"diff_hunk":"@@ -672,6 +683,92 @@ function getBoolean(argName, arg) {\n }\n \n /**\n+ * Sets the machine's size attribute to an instance size (e.g., m2.xlarge),\n+ * based on the Machine's specified provider, region, and hardware. Throw\n+ * an error if provider is not valid or given machine requirements cannot\n+ * be satisfied by any size.\n+ * @private\n+ * @returns {void}\n+ */\n+Machine.prototype.chooseSize = function machineChooseSize() {\n+  switch (this.provider) {\n+    case 'Amazon':\n+      this.chooseBestSize(amazonDescriptions.Descriptions);\n+      break;\n+    case 'DigitalOcean':\n+      this.chooseBestSize(digitalOceanDescriptions.Descriptions);\n+      break;\n+    case 'Google':\n+      this.chooseBestSize(googleDescriptions.Descriptions);\n+      break;\n+    case 'Vagrant':\n+      this.vagrantSize();\n+      break;\n+    default:\n+      throw new Error(`Unknown Cloud Provider: ${this.provider}`);\n+  }\n+  if (this.size === '') {\n+    throw new Error(`No valid size for Machine ${stringify(this)}`);\n+  }\n+};\n+\n+/**\n+ * Sets the machine's region using the default region of the specified provider\n+ * if region is not specified by the user. Throw an error if provider is not ","path":"blueprint/bindings.js","position":53,"original_position":53,"commit_id":"230d6dc7c6470ec39711a996a52271846479f79c","original_commit_id":"230d6dc7c6470ec39711a996a52271846479f79c","user":{"login":"kayousterhout","id":1108612,"avatar_url":"https://avatars3.githubusercontent.com/u/1108612?v=4","gravatar_id":"","url":"https://api.github.com/users/kayousterhout","html_url":"https://github.com/kayousterhout","followers_url":"https://api.github.com/users/kayousterhout/followers","following_url":"https://api.github.com/users/kayousterhout/following{/other_user}","gists_url":"https://api.github.com/users/kayousterhout/gists{/gist_id}","starred_url":"https://api.github.com/users/kayousterhout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kayousterhout/subscriptions","organizations_url":"https://api.github.com/users/kayousterhout/orgs","repos_url":"https://api.github.com/users/kayousterhout/repos","events_url":"https://api.github.com/users/kayousterhout/events{/privacy}","received_events_url":"https://api.github.com/users/kayousterhout/received_events","type":"User","site_admin":false},"body":"Can you delete \"if region is not specified by the user\" (since that's checked by the caller, not here)?","created_at":"2017-10-13T23:19:30Z","updated_at":"2017-10-13T23:34:53Z","html_url":"https://github.com/kelda/kelda/pull/1133#discussion_r144674780","pull_request_url":"https://api.github.com/repos/kelda/kelda/pulls/1133","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kelda/kelda/pulls/comments/144674780"},"html":{"href":"https://github.com/kelda/kelda/pull/1133#discussion_r144674780"},"pull_request":{"href":"https://api.github.com/repos/kelda/kelda/pulls/1133"}}},"pull_request":{"url":"https://api.github.com/repos/kelda/kelda/pulls/1133","id":144319680,"html_url":"https://github.com/kelda/kelda/pull/1133","diff_url":"https://github.com/kelda/kelda/pull/1133.diff","patch_url":"https://github.com/kelda/kelda/pull/1133.patch","issue_url":"https://api.github.com/repos/kelda/kelda/issues/1133","number":1133,"state":"open","locked":false,"title":"machine: Migrate chooseSize and chooseRegion from go to javascript","user":{"login":"HongjianZhang","id":6889543,"avatar_url":"https://avatars2.githubusercontent.com/u/6889543?v=4","gravatar_id":"","url":"https://api.github.com/users/HongjianZhang","html_url":"https://github.com/HongjianZhang","followers_url":"https://api.github.com/users/HongjianZhang/followers","following_url":"https://api.github.com/users/HongjianZhang/following{/other_user}","gists_url":"https://api.github.com/users/HongjianZhang/gists{/gist_id}","starred_url":"https://api.github.com/users/HongjianZhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HongjianZhang/subscriptions","organizations_url":"https://api.github.com/users/HongjianZhang/orgs","repos_url":"https://api.github.com/users/HongjianZhang/repos","events_url":"https://api.github.com/users/HongjianZhang/events{/privacy}","received_events_url":"https://api.github.com/users/HongjianZhang/received_events","type":"User","site_admin":false},"body":"Before this commit, chooseSize is implemented in go,\r\nand called in toDBMachine in engine.go. This commit\r\nmoves this functionality to bindings.js, so that if\r\nthe user's configuration has problems, quilt can throw an error\r\nearlier while creating the blueprint machine in js.","created_at":"2017-10-03T01:27:53Z","updated_at":"2017-10-13T23:34:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5897f8f9aa8424054b743ca1f3ea67994fd5bb96","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/kelda/kelda/pulls/1133/commits","review_comments_url":"https://api.github.com/repos/kelda/kelda/pulls/1133/comments","review_comment_url":"https://api.github.com/repos/kelda/kelda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kelda/kelda/issues/1133/comments","statuses_url":"https://api.github.com/repos/kelda/kelda/statuses/230d6dc7c6470ec39711a996a52271846479f79c","head":{"label":"HongjianZhang:migrate_choose_size","ref":"migrate_choose_size","sha":"230d6dc7c6470ec39711a996a52271846479f79c","user":{"login":"HongjianZhang","id":6889543,"avatar_url":"https://avatars2.githubusercontent.com/u/6889543?v=4","gravatar_id":"","url":"https://api.github.com/users/HongjianZhang","html_url":"https://github.com/HongjianZhang","followers_url":"https://api.github.com/users/HongjianZhang/followers","following_url":"https://api.github.com/users/HongjianZhang/following{/other_user}","gists_url":"https://api.github.com/users/HongjianZhang/gists{/gist_id}","starred_url":"https://api.github.com/users/HongjianZhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HongjianZhang/subscriptions","organizations_url":"https://api.github.com/users/HongjianZhang/orgs","repos_url":"https://api.github.com/users/HongjianZhang/repos","events_url":"https://api.github.com/users/HongjianZhang/events{/privacy}","received_events_url":"https://api.github.com/users/HongjianZhang/received_events","type":"User","site_admin":false},"repo":{"id":103716500,"name":"kelda","full_name":"HongjianZhang/kelda","owner":{"login":"HongjianZhang","id":6889543,"avatar_url":"https://avatars2.githubusercontent.com/u/6889543?v=4","gravatar_id":"","url":"https://api.github.com/users/HongjianZhang","html_url":"https://github.com/HongjianZhang","followers_url":"https://api.github.com/users/HongjianZhang/followers","following_url":"https://api.github.com/users/HongjianZhang/following{/other_user}","gists_url":"https://api.github.com/users/HongjianZhang/gists{/gist_id}","starred_url":"https://api.github.com/users/HongjianZhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HongjianZhang/subscriptions","organizations_url":"https://api.github.com/users/HongjianZhang/orgs","repos_url":"https://api.github.com/users/HongjianZhang/repos","events_url":"https://api.github.com/users/HongjianZhang/events{/privacy}","received_events_url":"https://api.github.com/users/HongjianZhang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HongjianZhang/kelda","description":"An approachable way to deploy to the cloud using Node.js","fork":true,"url":"https://api.github.com/repos/HongjianZhang/kelda","forks_url":"https://api.github.com/repos/HongjianZhang/kelda/forks","keys_url":"https://api.github.com/repos/HongjianZhang/kelda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HongjianZhang/kelda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HongjianZhang/kelda/teams","hooks_url":"https://api.github.com/repos/HongjianZhang/kelda/hooks","issue_events_url":"https://api.github.com/repos/HongjianZhang/kelda/issues/events{/number}","events_url":"https://api.github.com/repos/HongjianZhang/kelda/events","assignees_url":"https://api.github.com/repos/HongjianZhang/kelda/assignees{/user}","branches_url":"https://api.github.com/repos/HongjianZhang/kelda/branches{/branch}","tags_url":"https://api.github.com/repos/HongjianZhang/kelda/tags","blobs_url":"https://api.github.com/repos/HongjianZhang/kelda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HongjianZhang/kelda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HongjianZhang/kelda/git/refs{/sha}","trees_url":"https://api.github.com/repos/HongjianZhang/kelda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HongjianZhang/kelda/statuses/{sha}","languages_url":"https://api.github.com/repos/HongjianZhang/kelda/languages","stargazers_url":"https://api.github.com/repos/HongjianZhang/kelda/stargazers","contributors_url":"https://api.github.com/repos/HongjianZhang/kelda/contributors","subscribers_url":"https://api.github.com/repos/HongjianZhang/kelda/subscribers","subscription_url":"https://api.github.com/repos/HongjianZhang/kelda/subscription","commits_url":"https://api.github.com/repos/HongjianZhang/kelda/commits{/sha}","git_commits_url":"https://api.github.com/repos/HongjianZhang/kelda/git/commits{/sha}","comments_url":"https://api.github.com/repos/HongjianZhang/kelda/comments{/number}","issue_comment_url":"https://api.github.com/repos/HongjianZhang/kelda/issues/comments{/number}","contents_url":"https://api.github.com/repos/HongjianZhang/kelda/contents/{+path}","compare_url":"https://api.github.com/repos/HongjianZhang/kelda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HongjianZhang/kelda/merges","archive_url":"https://api.github.com/repos/HongjianZhang/kelda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HongjianZhang/kelda/downloads","issues_url":"https://api.github.com/repos/HongjianZhang/kelda/issues{/number}","pulls_url":"https://api.github.com/repos/HongjianZhang/kelda/pulls{/number}","milestones_url":"https://api.github.com/repos/HongjianZhang/kelda/milestones{/number}","notifications_url":"https://api.github.com/repos/HongjianZhang/kelda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HongjianZhang/kelda/labels{/name}","releases_url":"https://api.github.com/repos/HongjianZhang/kelda/releases{/id}","deployments_url":"https://api.github.com/repos/HongjianZhang/kelda/deployments","created_at":"2017-09-16T01:54:42Z","updated_at":"2017-10-13T18:19:22Z","pushed_at":"2017-10-13T19:23:02Z","git_url":"git://github.com/HongjianZhang/kelda.git","ssh_url":"git@github.com:HongjianZhang/kelda.git","clone_url":"https://github.com/HongjianZhang/kelda.git","svn_url":"https://github.com/HongjianZhang/kelda","homepage":"http://quilt.io","size":21750,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kelda:master","ref":"master","sha":"3e4229bf085ba7ce9af678382a8df2087e0e6c0d","user":{"login":"kelda","id":25753912,"avatar_url":"https://avatars2.githubusercontent.com/u/25753912?v=4","gravatar_id":"","url":"https://api.github.com/users/kelda","html_url":"https://github.com/kelda","followers_url":"https://api.github.com/users/kelda/followers","following_url":"https://api.github.com/users/kelda/following{/other_user}","gists_url":"https://api.github.com/users/kelda/gists{/gist_id}","starred_url":"https://api.github.com/users/kelda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kelda/subscriptions","organizations_url":"https://api.github.com/users/kelda/orgs","repos_url":"https://api.github.com/users/kelda/repos","events_url":"https://api.github.com/users/kelda/events{/privacy}","received_events_url":"https://api.github.com/users/kelda/received_events","type":"Organization","site_admin":false},"repo":{"id":43390663,"name":"kelda","full_name":"kelda/kelda","owner":{"login":"kelda","id":25753912,"avatar_url":"https://avatars2.githubusercontent.com/u/25753912?v=4","gravatar_id":"","url":"https://api.github.com/users/kelda","html_url":"https://github.com/kelda","followers_url":"https://api.github.com/users/kelda/followers","following_url":"https://api.github.com/users/kelda/following{/other_user}","gists_url":"https://api.github.com/users/kelda/gists{/gist_id}","starred_url":"https://api.github.com/users/kelda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kelda/subscriptions","organizations_url":"https://api.github.com/users/kelda/orgs","repos_url":"https://api.github.com/users/kelda/repos","events_url":"https://api.github.com/users/kelda/events{/privacy}","received_events_url":"https://api.github.com/users/kelda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kelda/kelda","description":"An approachable way to deploy to the cloud using Node.js","fork":false,"url":"https://api.github.com/repos/kelda/kelda","forks_url":"https://api.github.com/repos/kelda/kelda/forks","keys_url":"https://api.github.com/repos/kelda/kelda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kelda/kelda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kelda/kelda/teams","hooks_url":"https://api.github.com/repos/kelda/kelda/hooks","issue_events_url":"https://api.github.com/repos/kelda/kelda/issues/events{/number}","events_url":"https://api.github.com/repos/kelda/kelda/events","assignees_url":"https://api.github.com/repos/kelda/kelda/assignees{/user}","branches_url":"https://api.github.com/repos/kelda/kelda/branches{/branch}","tags_url":"https://api.github.com/repos/kelda/kelda/tags","blobs_url":"https://api.github.com/repos/kelda/kelda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kelda/kelda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kelda/kelda/git/refs{/sha}","trees_url":"https://api.github.com/repos/kelda/kelda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kelda/kelda/statuses/{sha}","languages_url":"https://api.github.com/repos/kelda/kelda/languages","stargazers_url":"https://api.github.com/repos/kelda/kelda/stargazers","contributors_url":"https://api.github.com/repos/kelda/kelda/contributors","subscribers_url":"https://api.github.com/repos/kelda/kelda/subscribers","subscription_url":"https://api.github.com/repos/kelda/kelda/subscription","commits_url":"https://api.github.com/repos/kelda/kelda/commits{/sha}","git_commits_url":"https://api.github.com/repos/kelda/kelda/git/commits{/sha}","comments_url":"https://api.github.com/repos/kelda/kelda/comments{/number}","issue_comment_url":"https://api.github.com/repos/kelda/kelda/issues/comments{/number}","contents_url":"https://api.github.com/repos/kelda/kelda/contents/{+path}","compare_url":"https://api.github.com/repos/kelda/kelda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kelda/kelda/merges","archive_url":"https://api.github.com/repos/kelda/kelda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kelda/kelda/downloads","issues_url":"https://api.github.com/repos/kelda/kelda/issues{/number}","pulls_url":"https://api.github.com/repos/kelda/kelda/pulls{/number}","milestones_url":"https://api.github.com/repos/kelda/kelda/milestones{/number}","notifications_url":"https://api.github.com/repos/kelda/kelda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kelda/kelda/labels{/name}","releases_url":"https://api.github.com/repos/kelda/kelda/releases{/id}","deployments_url":"https://api.github.com/repos/kelda/kelda/deployments","created_at":"2015-09-29T19:52:32Z","updated_at":"2017-10-13T17:46:21Z","pushed_at":"2017-10-13T22:37:05Z","git_url":"git://github.com/kelda/kelda.git","ssh_url":"git@github.com:kelda/kelda.git","clone_url":"https://github.com/kelda/kelda.git","svn_url":"https://github.com/kelda/kelda","homepage":"http://quilt.io","size":21742,"stargazers_count":422,"watchers_count":422,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":6,"forks":35,"open_issues":6,"watchers":422,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kelda/kelda/pulls/1133"},"html":{"href":"https://github.com/kelda/kelda/pull/1133"},"issue":{"href":"https://api.github.com/repos/kelda/kelda/issues/1133"},"comments":{"href":"https://api.github.com/repos/kelda/kelda/issues/1133/comments"},"review_comments":{"href":"https://api.github.com/repos/kelda/kelda/pulls/1133/comments"},"review_comment":{"href":"https://api.github.com/repos/kelda/kelda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kelda/kelda/pulls/1133/commits"},"statuses":{"href":"https://api.github.com/repos/kelda/kelda/statuses/230d6dc7c6470ec39711a996a52271846479f79c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kayousterhout"}}