{"action":"created","comment":{"url":"https://api.github.com/repos/Yelp/paasta/pulls/comments/68571833","id":68571833,"diff_hunk":"@@ -37,18 +38,24 @@\n from paasta_tools.marathon_tools import MESOS_TASK_SPACER\n from paasta_tools.marathon_tools import set_instances_for_marathon_service\n from paasta_tools.mesos_tools import get_mesos_state_from_leader\n+from paasta_tools.mesos_tools import get_mesos_task_count_by_slave\n from paasta_tools.mesos_tools import get_running_tasks_from_active_frameworks\n+from paasta_tools.paasta_maintenance import drain","path":"paasta_tools/autoscaling_lib.py","position":14,"original_position":14,"commit_id":"f895a05837381f3c965462452392ff510f052503","original_commit_id":"f895a05837381f3c965462452392ff510f052503","user":{"login":"Rob-Johnson","id":1389671,"avatar_url":"https://avatars.githubusercontent.com/u/1389671?v=3","gravatar_id":"","url":"https://api.github.com/users/Rob-Johnson","html_url":"https://github.com/Rob-Johnson","followers_url":"https://api.github.com/users/Rob-Johnson/followers","following_url":"https://api.github.com/users/Rob-Johnson/following{/other_user}","gists_url":"https://api.github.com/users/Rob-Johnson/gists{/gist_id}","starred_url":"https://api.github.com/users/Rob-Johnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rob-Johnson/subscriptions","organizations_url":"https://api.github.com/users/Rob-Johnson/orgs","repos_url":"https://api.github.com/users/Rob-Johnson/repos","events_url":"https://api.github.com/users/Rob-Johnson/events{/privacy}","received_events_url":"https://api.github.com/users/Rob-Johnson/received_events","type":"User","site_admin":false},"body":"this needs moving out into a more generic 'maintenance' library. ``paasta_maintenance`` is a script, and we shouldn't be importing from it here.","created_at":"2016-06-27T13:02:25Z","updated_at":"2016-06-27T13:02:25Z","html_url":"https://github.com/Yelp/paasta/pull/598#discussion_r68571833","pull_request_url":"https://api.github.com/repos/Yelp/paasta/pulls/598","_links":{"self":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/comments/68571833"},"html":{"href":"https://github.com/Yelp/paasta/pull/598#discussion_r68571833"},"pull_request":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/598"}}},"pull_request":{"url":"https://api.github.com/repos/Yelp/paasta/pulls/598","id":75134288,"html_url":"https://github.com/Yelp/paasta/pull/598","diff_url":"https://github.com/Yelp/paasta/pull/598.diff","patch_url":"https://github.com/Yelp/paasta/pull/598.patch","issue_url":"https://api.github.com/repos/Yelp/paasta/issues/598","number":598,"state":"open","locked":false,"title":"(WIP) Changes to cluster autoscaling","user":{"login":"mattmb","id":2462243,"avatar_url":"https://avatars.githubusercontent.com/u/2462243?v=3","gravatar_id":"","url":"https://api.github.com/users/mattmb","html_url":"https://github.com/mattmb","followers_url":"https://api.github.com/users/mattmb/followers","following_url":"https://api.github.com/users/mattmb/following{/other_user}","gists_url":"https://api.github.com/users/mattmb/gists{/gist_id}","starred_url":"https://api.github.com/users/mattmb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattmb/subscriptions","organizations_url":"https://api.github.com/users/mattmb/orgs","repos_url":"https://api.github.com/users/mattmb/repos","events_url":"https://api.github.com/users/mattmb/events{/privacy}","received_events_url":"https://api.github.com/users/mattmb/received_events","type":"User","site_admin":false},"body":"This is a WIP (needs testing, tests and docs etc.)\r\n\r\nJust putting it up for early comments on the direction.\r\n\r\nAlso needs https://github.com/Yelp/paasta/pull/521/ to make the draining work and (I think) further changes to the maintenance scripts to prevent allocation of tasks to slaves in maintenance mode.","created_at":"2016-06-24T15:49:15Z","updated_at":"2016-06-27T13:02:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"650671a4519dbc8e823cd46474bf73d6cf172789","assignee":{"login":"mattmb","id":2462243,"avatar_url":"https://avatars.githubusercontent.com/u/2462243?v=3","gravatar_id":"","url":"https://api.github.com/users/mattmb","html_url":"https://github.com/mattmb","followers_url":"https://api.github.com/users/mattmb/followers","following_url":"https://api.github.com/users/mattmb/following{/other_user}","gists_url":"https://api.github.com/users/mattmb/gists{/gist_id}","starred_url":"https://api.github.com/users/mattmb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattmb/subscriptions","organizations_url":"https://api.github.com/users/mattmb/orgs","repos_url":"https://api.github.com/users/mattmb/repos","events_url":"https://api.github.com/users/mattmb/events{/privacy}","received_events_url":"https://api.github.com/users/mattmb/received_events","type":"User","site_admin":false},"assignees":[{"login":"mattmb","id":2462243,"avatar_url":"https://avatars.githubusercontent.com/u/2462243?v=3","gravatar_id":"","url":"https://api.github.com/users/mattmb","html_url":"https://github.com/mattmb","followers_url":"https://api.github.com/users/mattmb/followers","following_url":"https://api.github.com/users/mattmb/following{/other_user}","gists_url":"https://api.github.com/users/mattmb/gists{/gist_id}","starred_url":"https://api.github.com/users/mattmb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattmb/subscriptions","organizations_url":"https://api.github.com/users/mattmb/orgs","repos_url":"https://api.github.com/users/mattmb/repos","events_url":"https://api.github.com/users/mattmb/events{/privacy}","received_events_url":"https://api.github.com/users/mattmb/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Yelp/paasta/pulls/598/commits","review_comments_url":"https://api.github.com/repos/Yelp/paasta/pulls/598/comments","review_comment_url":"https://api.github.com/repos/Yelp/paasta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Yelp/paasta/issues/598/comments","statuses_url":"https://api.github.com/repos/Yelp/paasta/statuses/f895a05837381f3c965462452392ff510f052503","head":{"label":"Yelp:autoscale_cluster","ref":"autoscale_cluster","sha":"f895a05837381f3c965462452392ff510f052503","user":{"login":"Yelp","id":49071,"avatar_url":"https://avatars.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"repo":{"id":44998824,"name":"paasta","full_name":"Yelp/paasta","owner":{"login":"Yelp","id":49071,"avatar_url":"https://avatars.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Yelp/paasta","description":"An open, distributed platform as a service","fork":false,"url":"https://api.github.com/repos/Yelp/paasta","forks_url":"https://api.github.com/repos/Yelp/paasta/forks","keys_url":"https://api.github.com/repos/Yelp/paasta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yelp/paasta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yelp/paasta/teams","hooks_url":"https://api.github.com/repos/Yelp/paasta/hooks","issue_events_url":"https://api.github.com/repos/Yelp/paasta/issues/events{/number}","events_url":"https://api.github.com/repos/Yelp/paasta/events","assignees_url":"https://api.github.com/repos/Yelp/paasta/assignees{/user}","branches_url":"https://api.github.com/repos/Yelp/paasta/branches{/branch}","tags_url":"https://api.github.com/repos/Yelp/paasta/tags","blobs_url":"https://api.github.com/repos/Yelp/paasta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yelp/paasta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yelp/paasta/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yelp/paasta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yelp/paasta/statuses/{sha}","languages_url":"https://api.github.com/repos/Yelp/paasta/languages","stargazers_url":"https://api.github.com/repos/Yelp/paasta/stargazers","contributors_url":"https://api.github.com/repos/Yelp/paasta/contributors","subscribers_url":"https://api.github.com/repos/Yelp/paasta/subscribers","subscription_url":"https://api.github.com/repos/Yelp/paasta/subscription","commits_url":"https://api.github.com/repos/Yelp/paasta/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yelp/paasta/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yelp/paasta/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yelp/paasta/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yelp/paasta/contents/{+path}","compare_url":"https://api.github.com/repos/Yelp/paasta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yelp/paasta/merges","archive_url":"https://api.github.com/repos/Yelp/paasta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yelp/paasta/downloads","issues_url":"https://api.github.com/repos/Yelp/paasta/issues{/number}","pulls_url":"https://api.github.com/repos/Yelp/paasta/pulls{/number}","milestones_url":"https://api.github.com/repos/Yelp/paasta/milestones{/number}","notifications_url":"https://api.github.com/repos/Yelp/paasta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yelp/paasta/labels{/name}","releases_url":"https://api.github.com/repos/Yelp/paasta/releases{/id}","deployments_url":"https://api.github.com/repos/Yelp/paasta/deployments","created_at":"2015-10-26T21:35:53Z","updated_at":"2016-06-27T09:00:23Z","pushed_at":"2016-06-25T22:13:57Z","git_url":"git://github.com/Yelp/paasta.git","ssh_url":"git@github.com:Yelp/paasta.git","clone_url":"https://github.com/Yelp/paasta.git","svn_url":"https://github.com/Yelp/paasta","homepage":"","size":11061,"stargazers_count":844,"watchers_count":844,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":53,"forks":75,"open_issues":53,"watchers":844,"default_branch":"master"}},"base":{"label":"Yelp:master","ref":"master","sha":"146b25e028ea6a21412b0546ac610aad7b65a8f5","user":{"login":"Yelp","id":49071,"avatar_url":"https://avatars.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"repo":{"id":44998824,"name":"paasta","full_name":"Yelp/paasta","owner":{"login":"Yelp","id":49071,"avatar_url":"https://avatars.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Yelp/paasta","description":"An open, distributed platform as a service","fork":false,"url":"https://api.github.com/repos/Yelp/paasta","forks_url":"https://api.github.com/repos/Yelp/paasta/forks","keys_url":"https://api.github.com/repos/Yelp/paasta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yelp/paasta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yelp/paasta/teams","hooks_url":"https://api.github.com/repos/Yelp/paasta/hooks","issue_events_url":"https://api.github.com/repos/Yelp/paasta/issues/events{/number}","events_url":"https://api.github.com/repos/Yelp/paasta/events","assignees_url":"https://api.github.com/repos/Yelp/paasta/assignees{/user}","branches_url":"https://api.github.com/repos/Yelp/paasta/branches{/branch}","tags_url":"https://api.github.com/repos/Yelp/paasta/tags","blobs_url":"https://api.github.com/repos/Yelp/paasta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yelp/paasta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yelp/paasta/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yelp/paasta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yelp/paasta/statuses/{sha}","languages_url":"https://api.github.com/repos/Yelp/paasta/languages","stargazers_url":"https://api.github.com/repos/Yelp/paasta/stargazers","contributors_url":"https://api.github.com/repos/Yelp/paasta/contributors","subscribers_url":"https://api.github.com/repos/Yelp/paasta/subscribers","subscription_url":"https://api.github.com/repos/Yelp/paasta/subscription","commits_url":"https://api.github.com/repos/Yelp/paasta/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yelp/paasta/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yelp/paasta/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yelp/paasta/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yelp/paasta/contents/{+path}","compare_url":"https://api.github.com/repos/Yelp/paasta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yelp/paasta/merges","archive_url":"https://api.github.com/repos/Yelp/paasta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yelp/paasta/downloads","issues_url":"https://api.github.com/repos/Yelp/paasta/issues{/number}","pulls_url":"https://api.github.com/repos/Yelp/paasta/pulls{/number}","milestones_url":"https://api.github.com/repos/Yelp/paasta/milestones{/number}","notifications_url":"https://api.github.com/repos/Yelp/paasta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yelp/paasta/labels{/name}","releases_url":"https://api.github.com/repos/Yelp/paasta/releases{/id}","deployments_url":"https://api.github.com/repos/Yelp/paasta/deployments","created_at":"2015-10-26T21:35:53Z","updated_at":"2016-06-27T09:00:23Z","pushed_at":"2016-06-25T22:13:57Z","git_url":"git://github.com/Yelp/paasta.git","ssh_url":"git@github.com:Yelp/paasta.git","clone_url":"https://github.com/Yelp/paasta.git","svn_url":"https://github.com/Yelp/paasta","homepage":"","size":11061,"stargazers_count":844,"watchers_count":844,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":53,"forks":75,"open_issues":53,"watchers":844,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/598"},"html":{"href":"https://github.com/Yelp/paasta/pull/598"},"issue":{"href":"https://api.github.com/repos/Yelp/paasta/issues/598"},"comments":{"href":"https://api.github.com/repos/Yelp/paasta/issues/598/comments"},"review_comments":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/598/comments"},"review_comment":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/598/commits"},"statuses":{"href":"https://api.github.com/repos/Yelp/paasta/statuses/f895a05837381f3c965462452392ff510f052503"}}}}
{"actor":{"display_login":"Rob-Johnson"}}