{"action":"opened","number":1980,"pull_request":{"url":"https://api.github.com/repos/Yelp/paasta/pulls/1980","id":215562345,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1NTYyMzQ1","html_url":"https://github.com/Yelp/paasta/pull/1980","diff_url":"https://github.com/Yelp/paasta/pull/1980.diff","patch_url":"https://github.com/Yelp/paasta/pull/1980.patch","issue_url":"https://api.github.com/repos/Yelp/paasta/issues/1980","number":1980,"state":"open","locked":false,"title":"`paasta metastatus` via HTTP API","user":{"login":"vkhromov","id":1240391,"node_id":"MDQ6VXNlcjEyNDAzOTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1240391?v=4","gravatar_id":"","url":"https://api.github.com/users/vkhromov","html_url":"https://github.com/vkhromov","followers_url":"https://api.github.com/users/vkhromov/followers","following_url":"https://api.github.com/users/vkhromov/following{/other_user}","gists_url":"https://api.github.com/users/vkhromov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkhromov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkhromov/subscriptions","organizations_url":"https://api.github.com/users/vkhromov/orgs","repos_url":"https://api.github.com/users/vkhromov/repos","events_url":"https://api.github.com/users/vkhromov/events{/privacy}","received_events_url":"https://api.github.com/users/vkhromov/received_events","type":"User","site_admin":false},"body":"Add HTTP API to executes the code used to generate output of `paasta metastatus` on the HTTP API server side, and returns the output and the exit code for that.\r\nUse that HTTP API to generate result for `paasta metastatus` instead of using `ssh ... /usr/bin/paasta_metastatus` if `USE_API_ENDPOINT` environment variable is `true`.\r\n```\r\n$ paasta metastatus -c norcal-stagef -vv -a >/tmp/paasta-metastatus-ORIG\r\n$ USE_API_ENDPOINT=1 paasta metastatus -c norcal-stagef -vv -a >/tmp/paasta-metastatus-NEW \r\n$ diff -u /tmp/paasta-metastatus-ORIG /tmp/paasta-metastatus-NEW\r\n--- /tmp/paasta-metastatus-ORIG 2018-09-14 04:15:49.874849796 -0700\r\n+++ /tmp/paasta-metastatus-NEW  2018-09-14 04:15:37.787245547 -0700\r\n@@ -27,8 +27,8 @@\r\n     Resource id                Pool      State   Current  Target  Min capacity  Max capacity  Instances\r\n     spam_paasta_stagef_xenial  spam      active  1        1       1             1             1\r\n     yr_paasta_stagef           yelp_res  active  5        5       3             20            5\r\n-    paasta_stagef              default   active  0        0       0             0             0\r\n     paasta_kew_stagef          kew       active  3        3       3             3             3\r\n+    paasta_stagef              default   active  0        0       0             0             0\r\n Marathon Status: OK\r\n   marathon apps:       1696\r\n   marathon tasks:      3580\r\n```","created_at":"2018-09-14T11:18:47Z","updated_at":"2018-09-14T11:18:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Yelp/paasta/pulls/1980/commits","review_comments_url":"https://api.github.com/repos/Yelp/paasta/pulls/1980/comments","review_comment_url":"https://api.github.com/repos/Yelp/paasta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Yelp/paasta/issues/1980/comments","statuses_url":"https://api.github.com/repos/Yelp/paasta/statuses/588105e3dbb62896df3b268579c438ccc6771113","head":{"label":"Yelp:paasta-metastatus-via-http","ref":"paasta-metastatus-via-http","sha":"588105e3dbb62896df3b268579c438ccc6771113","user":{"login":"Yelp","id":49071,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5MDcx","avatar_url":"https://avatars1.githubusercontent.com/u/49071?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk0NDk5ODgyNA==","name":"paasta","full_name":"Yelp/paasta","owner":{"login":"Yelp","id":49071,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5MDcx","avatar_url":"https://avatars1.githubusercontent.com/u/49071?v=4","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":"2018-09-13T18:28:04Z","pushed_at":"2018-09-14T11:16:59Z","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":61400,"stargazers_count":1274,"watchers_count":1274,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":153,"mirror_url":null,"archived":false,"open_issues_count":96,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":153,"open_issues":96,"watchers":1274,"default_branch":"master"}},"base":{"label":"Yelp:master","ref":"master","sha":"069042ae4903a79b88270588c52a2a9c697b2f78","user":{"login":"Yelp","id":49071,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5MDcx","avatar_url":"https://avatars1.githubusercontent.com/u/49071?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk0NDk5ODgyNA==","name":"paasta","full_name":"Yelp/paasta","owner":{"login":"Yelp","id":49071,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5MDcx","avatar_url":"https://avatars1.githubusercontent.com/u/49071?v=4","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":"2018-09-13T18:28:04Z","pushed_at":"2018-09-14T11:16:59Z","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":61400,"stargazers_count":1274,"watchers_count":1274,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":153,"mirror_url":null,"archived":false,"open_issues_count":96,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":153,"open_issues":96,"watchers":1274,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/1980"},"html":{"href":"https://github.com/Yelp/paasta/pull/1980"},"issue":{"href":"https://api.github.com/repos/Yelp/paasta/issues/1980"},"comments":{"href":"https://api.github.com/repos/Yelp/paasta/issues/1980/comments"},"review_comments":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/1980/comments"},"review_comment":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/1980/commits"},"statuses":{"href":"https://api.github.com/repos/Yelp/paasta/statuses/588105e3dbb62896df3b268579c438ccc6771113"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":4,"additions":228,"deletions":34,"changed_files":6}}
{"actor":{"display_login":"vkhromov"}}