GitHub PullRequestReviewCommentEvent at 2014-10-28 13:24:25
Repository: harpoon
Actor: peterbourgon
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/soundcloud/harpoon/pulls/comments/19469345","id":19469345,"diff_hunk":"@@ -56,9 +68,23 @@ func RandomFit(\n \tmapped = map[string]map[string]agent.ContainerConfig{}\n \tfailed = map[string]agent.ContainerConfig{}\n \n+\tvar resources = map[string]agent.HostResources{}\n+\tfor id, state := range have {\n+\t\tresources[id] = state.Resources\n+\t}\n+\n+\tfor _, task := range pending {\n+\t\tif task.Schedule {\n+\t\t\tresource := resources[task.Endpoint]\n+\t\t\tresource.CPUs.Reserved += task.Config.CPUs\n+\t\t\tresource.Memory.Reserved += task.Config.Memory\n+\t\t\tresources[task.Endpoint] = resource\n+\t\t}","path":"harpoon-scheduler/algo/algo.go","position":50,"original_position":50,"commit_id":"b46c13541c0f970097e3239b44a7c83f4774d3a3","original_commit_id":"b46c13541c0f970097e3239b44a7c83f4774d3a3","user":{"login":"peterbourgon","id":114509,"avatar_url":"https://avatars.githubusercontent.com/u/114509?v=2","gravatar_id":"","url":"https://api.github.com/users/peterbourgon","html_url":"https://github.com/peterbourgon","followers_url":"https://api.github.com/users/peterbourgon/followers","following_url":"https://api.github.com/users/peterbourgon/following{/other_user}","gists_url":"https://api.github.com/users/peterbourgon/gists{/gist_id}","starred_url":"https://api.github.com/users/peterbourgon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterbourgon/subscriptions","organizations_url":"https://api.github.com/users/peterbourgon/orgs","repos_url":"https://api.github.com/users/peterbourgon/repos","events_url":"https://api.github.com/users/peterbourgon/events{/privacy}","received_events_url":"https://api.github.com/users/peterbourgon/received_events","type":"User","site_admin":false},"body":"s/resource/r/g","created_at":"2014-10-28T13:24:25Z","updated_at":"2014-10-28T13:24:25Z","html_url":"https://github.com/soundcloud/harpoon/pull/102#discussion_r19469345","pull_request_url":"https://api.github.com/repos/soundcloud/harpoon/pulls/102","_links":{"self":{"href":"https://api.github.com/repos/soundcloud/harpoon/pulls/comments/19469345"},"html":{"href":"https://github.com/soundcloud/harpoon/pull/102#discussion_r19469345"},"pull_request":{"href":"https://api.github.com/repos/soundcloud/harpoon/pulls/102"}}},"pull_request":{"url":"https://api.github.com/repos/soundcloud/harpoon/pulls/102","id":23448892,"html_url":"https://github.com/soundcloud/harpoon/pull/102","diff_url":"https://github.com/soundcloud/harpoon/pull/102.diff","patch_url":"https://github.com/soundcloud/harpoon/pull/102.patch","issue_url":"https://api.github.com/repos/soundcloud/harpoon/issues/102","number":102,"state":"open","locked":false,"title":"Fix calculating host resources","user":{"login":"elenadeneva92","id":2733013,"avatar_url":"https://avatars.githubusercontent.com/u/2733013?v=2","gravatar_id":"","url":"https://api.github.com/users/elenadeneva92","html_url":"https://github.com/elenadeneva92","followers_url":"https://api.github.com/users/elenadeneva92/followers","following_url":"https://api.github.com/users/elenadeneva92/following{/other_user}","gists_url":"https://api.github.com/users/elenadeneva92/gists{/gist_id}","starred_url":"https://api.github.com/users/elenadeneva92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elenadeneva92/subscriptions","organizations_url":"https://api.github.com/users/elenadeneva92/orgs","repos_url":"https://api.github.com/users/elenadeneva92/repos","events_url":"https://api.github.com/users/elenadeneva92/events{/privacy}","received_events_url":"https://api.github.com/users/elenadeneva92/received_events","type":"User","site_admin":false},"body":"- Stop changing of host resources.\r\n- Add the pending tasks as parameter in the scheduling algorithm, in order to respect the resources reserved for the scheduled pending tasks.\r\n\r\n@peterbourgon @jmyounker @stuartnelson3 ","created_at":"2014-10-28T11:17:32Z","updated_at":"2014-10-28T13:24:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2751a2defe56b4e483943d112c17f095fc75b11d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/soundcloud/harpoon/pulls/102/commits","review_comments_url":"https://api.github.com/repos/soundcloud/harpoon/pulls/102/comments","review_comment_url":"https://api.github.com/repos/soundcloud/harpoon/pulls/comments/{number}","comments_url":"https://api.github.com/repos/soundcloud/harpoon/issues/102/comments","statuses_url":"https://api.github.com/repos/soundcloud/harpoon/statuses/b46c13541c0f970097e3239b44a7c83f4774d3a3","head":{"label":"soundcloud:pending-task","ref":"pending-task","sha":"b46c13541c0f970097e3239b44a7c83f4774d3a3","user":{"login":"soundcloud","id":21021,"avatar_url":"https://avatars.githubusercontent.com/u/21021?v=2","gravatar_id":"","url":"https://api.github.com/users/soundcloud","html_url":"https://github.com/soundcloud","followers_url":"https://api.github.com/users/soundcloud/followers","following_url":"https://api.github.com/users/soundcloud/following{/other_user}","gists_url":"https://api.github.com/users/soundcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/soundcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soundcloud/subscriptions","organizations_url":"https://api.github.com/users/soundcloud/orgs","repos_url":"https://api.github.com/users/soundcloud/repos","events_url":"https://api.github.com/users/soundcloud/events{/privacy}","received_events_url":"https://api.github.com/users/soundcloud/received_events","type":"Organization","site_admin":false},"repo":{"id":21981956,"name":"harpoon","full_name":"soundcloud/harpoon","owner":{"login":"soundcloud","id":21021,"avatar_url":"https://avatars.githubusercontent.com/u/21021?v=2","gravatar_id":"","url":"https://api.github.com/users/soundcloud","html_url":"https://github.com/soundcloud","followers_url":"https://api.github.com/users/soundcloud/followers","following_url":"https://api.github.com/users/soundcloud/following{/other_user}","gists_url":"https://api.github.com/users/soundcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/soundcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soundcloud/subscriptions","organizations_url":"https://api.github.com/users/soundcloud/orgs","repos_url":"https://api.github.com/users/soundcloud/repos","events_url":"https://api.github.com/users/soundcloud/events{/privacy}","received_events_url":"https://api.github.com/users/soundcloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/soundcloud/harpoon","description":"A comprehensive application platform.","fork":false,"url":"https://api.github.com/repos/soundcloud/harpoon","forks_url":"https://api.github.com/repos/soundcloud/harpoon/forks","keys_url":"https://api.github.com/repos/soundcloud/harpoon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/soundcloud/harpoon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/soundcloud/harpoon/teams","hooks_url":"https://api.github.com/repos/soundcloud/harpoon/hooks","issue_events_url":"https://api.github.com/repos/soundcloud/harpoon/issues/events{/number}","events_url":"https://api.github.com/repos/soundcloud/harpoon/events","assignees_url":"https://api.github.com/repos/soundcloud/harpoon/assignees{/user}","branches_url":"https://api.github.com/repos/soundcloud/harpoon/branches{/branch}","tags_url":"https://api.github.com/repos/soundcloud/harpoon/tags","blobs_url":"https://api.github.com/repos/soundcloud/harpoon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/soundcloud/harpoon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/soundcloud/harpoon/git/refs{/sha}","trees_url":"https://api.github.com/repos/soundcloud/harpoon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/soundcloud/harpoon/statuses/{sha}","languages_url":"https://api.github.com/repos/soundcloud/harpoon/languages","stargazers_url":"https://api.github.com/repos/soundcloud/harpoon/stargazers","contributors_url":"https://api.github.com/repos/soundcloud/harpoon/contributors","subscribers_url":"https://api.github.com/repos/soundcloud/harpoon/subscribers","subscription_url":"https://api.github.com/repos/soundcloud/harpoon/subscription","commits_url":"https://api.github.com/repos/soundcloud/harpoon/commits{/sha}","git_commits_url":"https://api.github.com/repos/soundcloud/harpoon/git/commits{/sha}","comments_url":"https://api.github.com/repos/soundcloud/harpoon/comments{/number}","issue_comment_url":"https://api.github.com/repos/soundcloud/harpoon/issues/comments/{number}","contents_url":"https://api.github.com/repos/soundcloud/harpoon/contents/{+path}","compare_url":"https://api.github.com/repos/soundcloud/harpoon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/soundcloud/harpoon/merges","archive_url":"https://api.github.com/repos/soundcloud/harpoon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/soundcloud/harpoon/downloads","issues_url":"https://api.github.com/repos/soundcloud/harpoon/issues{/number}","pulls_url":"https://api.github.com/repos/soundcloud/harpoon/pulls{/number}","milestones_url":"https://api.github.com/repos/soundcloud/harpoon/milestones{/number}","notifications_url":"https://api.github.com/repos/soundcloud/harpoon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/soundcloud/harpoon/labels{/name}","releases_url":"https://api.github.com/repos/soundcloud/harpoon/releases{/id}","created_at":"2014-07-18T13:54:47Z","updated_at":"2014-10-15T02:16:09Z","pushed_at":"2014-10-28T11:18:06Z","git_url":"git://github.com/soundcloud/harpoon.git","ssh_url":"git@github.com:soundcloud/harpoon.git","clone_url":"https://github.com/soundcloud/harpoon.git","svn_url":"https://github.com/soundcloud/harpoon","homepage":null,"size":5122,"stargazers_count":46,"watchers_count":46,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":46,"default_branch":"master"}},"base":{"label":"soundcloud:master","ref":"master","sha":"2fd2ff99e83b064907639ce96bd4cfb55fdbbf0c","user":{"login":"soundcloud","id":21021,"avatar_url":"https://avatars.githubusercontent.com/u/21021?v=2","gravatar_id":"","url":"https://api.github.com/users/soundcloud","html_url":"https://github.com/soundcloud","followers_url":"https://api.github.com/users/soundcloud/followers","following_url":"https://api.github.com/users/soundcloud/following{/other_user}","gists_url":"https://api.github.com/users/soundcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/soundcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soundcloud/subscriptions","organizations_url":"https://api.github.com/users/soundcloud/orgs","repos_url":"https://api.github.com/users/soundcloud/repos","events_url":"https://api.github.com/users/soundcloud/events{/privacy}","received_events_url":"https://api.github.com/users/soundcloud/received_events","type":"Organization","site_admin":false},"repo":{"id":21981956,"name":"harpoon","full_name":"soundcloud/harpoon","owner":{"login":"soundcloud","id":21021,"avatar_url":"https://avatars.githubusercontent.com/u/21021?v=2","gravatar_id":"","url":"https://api.github.com/users/soundcloud","html_url":"https://github.com/soundcloud","followers_url":"https://api.github.com/users/soundcloud/followers","following_url":"https://api.github.com/users/soundcloud/following{/other_user}","gists_url":"https://api.github.com/users/soundcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/soundcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soundcloud/subscriptions","organizations_url":"https://api.github.com/users/soundcloud/orgs","repos_url":"https://api.github.com/users/soundcloud/repos","events_url":"https://api.github.com/users/soundcloud/events{/privacy}","received_events_url":"https://api.github.com/users/soundcloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/soundcloud/harpoon","description":"A comprehensive application platform.","fork":false,"url":"https://api.github.com/repos/soundcloud/harpoon","forks_url":"https://api.github.com/repos/soundcloud/harpoon/forks","keys_url":"https://api.github.com/repos/soundcloud/harpoon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/soundcloud/harpoon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/soundcloud/harpoon/teams","hooks_url":"https://api.github.com/repos/soundcloud/harpoon/hooks","issue_events_url":"https://api.github.com/repos/soundcloud/harpoon/issues/events{/number}","events_url":"https://api.github.com/repos/soundcloud/harpoon/events","assignees_url":"https://api.github.com/repos/soundcloud/harpoon/assignees{/user}","branches_url":"https://api.github.com/repos/soundcloud/harpoon/branches{/branch}","tags_url":"https://api.github.com/repos/soundcloud/harpoon/tags","blobs_url":"https://api.github.com/repos/soundcloud/harpoon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/soundcloud/harpoon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/soundcloud/harpoon/git/refs{/sha}","trees_url":"https://api.github.com/repos/soundcloud/harpoon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/soundcloud/harpoon/statuses/{sha}","languages_url":"https://api.github.com/repos/soundcloud/harpoon/languages","stargazers_url":"https://api.github.com/repos/soundcloud/harpoon/stargazers","contributors_url":"https://api.github.com/repos/soundcloud/harpoon/contributors","subscribers_url":"https://api.github.com/repos/soundcloud/harpoon/subscribers","subscription_url":"https://api.github.com/repos/soundcloud/harpoon/subscription","commits_url":"https://api.github.com/repos/soundcloud/harpoon/commits{/sha}","git_commits_url":"https://api.github.com/repos/soundcloud/harpoon/git/commits{/sha}","comments_url":"https://api.github.com/repos/soundcloud/harpoon/comments{/number}","issue_comment_url":"https://api.github.com/repos/soundcloud/harpoon/issues/comments/{number}","contents_url":"https://api.github.com/repos/soundcloud/harpoon/contents/{+path}","compare_url":"https://api.github.com/repos/soundcloud/harpoon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/soundcloud/harpoon/merges","archive_url":"https://api.github.com/repos/soundcloud/harpoon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/soundcloud/harpoon/downloads","issues_url":"https://api.github.com/repos/soundcloud/harpoon/issues{/number}","pulls_url":"https://api.github.com/repos/soundcloud/harpoon/pulls{/number}","milestones_url":"https://api.github.com/repos/soundcloud/harpoon/milestones{/number}","notifications_url":"https://api.github.com/repos/soundcloud/harpoon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/soundcloud/harpoon/labels{/name}","releases_url":"https://api.github.com/repos/soundcloud/harpoon/releases{/id}","created_at":"2014-07-18T13:54:47Z","updated_at":"2014-10-15T02:16:09Z","pushed_at":"2014-10-28T11:18:06Z","git_url":"git://github.com/soundcloud/harpoon.git","ssh_url":"git@github.com:soundcloud/harpoon.git","clone_url":"https://github.com/soundcloud/harpoon.git","svn_url":"https://github.com/soundcloud/harpoon","homepage":null,"size":5122,"stargazers_count":46,"watchers_count":46,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/soundcloud/harpoon/pulls/102"},"html":{"href":"https://github.com/soundcloud/harpoon/pull/102"},"issue":{"href":"https://api.github.com/repos/soundcloud/harpoon/issues/102"},"comments":{"href":"https://api.github.com/repos/soundcloud/harpoon/issues/102/comments"},"review_comments":{"href":"https://api.github.com/repos/soundcloud/harpoon/pulls/102/comments"},"review_comment":{"href":"https://api.github.com/repos/soundcloud/harpoon/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/soundcloud/harpoon/pulls/102/commits"},"statuses":{"href":"https://api.github.com/repos/soundcloud/harpoon/statuses/b46c13541c0f970097e3239b44a7c83f4774d3a3"}}}}