{"action":"created","comment":{"url":"https://api.github.com/repos/fission/fission/pulls/comments/135615514","pull_request_review_id":59040782,"id":135615514,"diff_hunk":"@@ -0,0 +1,28 @@\n+package client\n+\n+import (\n+\t\"bytes\"\n+\t\"encoding/json\"\n+\t\"net/http\"\n+\n+\t\"github.com/fission/fission\"\n+)\n+\n+func DoBuildRequest(builderUrl string, br *fission.PackageBuildRequest) error {","path":"environments/builder/client/client.go","position":11,"original_position":11,"commit_id":"536921dcc7be97efde1cc9068fe69aa103fbac34","original_commit_id":"536921dcc7be97efde1cc9068fe69aa103fbac34","user":{"login":"soamvasani","id":16418446,"avatar_url":"https://avatars1.githubusercontent.com/u/16418446?v=4","gravatar_id":"","url":"https://api.github.com/users/soamvasani","html_url":"https://github.com/soamvasani","followers_url":"https://api.github.com/users/soamvasani/followers","following_url":"https://api.github.com/users/soamvasani/following{/other_user}","gists_url":"https://api.github.com/users/soamvasani/gists{/gist_id}","starred_url":"https://api.github.com/users/soamvasani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soamvasani/subscriptions","organizations_url":"https://api.github.com/users/soamvasani/orgs","repos_url":"https://api.github.com/users/soamvasani/repos","events_url":"https://api.github.com/users/soamvasani/events{/privacy}","received_events_url":"https://api.github.com/users/soamvasani/received_events","type":"User","site_admin":false},"body":"I know it's just one function, but can you structure this like the other clients? (We may need to add other methods in the future, as we add stuff like progress reporting etc.)\r\n\r\ni.e. a BuilderClient struct with a URL inside it, and a `build(br *fission.PackageBuildRequest)` method.","created_at":"2017-08-28T19:46:39Z","updated_at":"2017-08-28T19:59:51Z","html_url":"https://github.com/fission/fission/pull/298#discussion_r135615514","pull_request_url":"https://api.github.com/repos/fission/fission/pulls/298","_links":{"self":{"href":"https://api.github.com/repos/fission/fission/pulls/comments/135615514"},"html":{"href":"https://github.com/fission/fission/pull/298#discussion_r135615514"},"pull_request":{"href":"https://api.github.com/repos/fission/fission/pulls/298"}}},"pull_request":{"url":"https://api.github.com/repos/fission/fission/pulls/298","id":137838085,"html_url":"https://github.com/fission/fission/pull/298","diff_url":"https://github.com/fission/fission/pull/298.diff","patch_url":"https://github.com/fission/fission/pull/298.patch","issue_url":"https://api.github.com/repos/fission/fission/issues/298","number":298,"state":"open","locked":false,"title":"(WIP) Add Environment v2 Builder","user":{"login":"life1347","id":202578,"avatar_url":"https://avatars1.githubusercontent.com/u/202578?v=4","gravatar_id":"","url":"https://api.github.com/users/life1347","html_url":"https://github.com/life1347","followers_url":"https://api.github.com/users/life1347/followers","following_url":"https://api.github.com/users/life1347/following{/other_user}","gists_url":"https://api.github.com/users/life1347/gists{/gist_id}","starred_url":"https://api.github.com/users/life1347/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/life1347/subscriptions","organizations_url":"https://api.github.com/users/life1347/orgs","repos_url":"https://api.github.com/users/life1347/repos","events_url":"https://api.github.com/users/life1347/events{/privacy}","received_events_url":"https://api.github.com/users/life1347/received_events","type":"User","site_admin":false},"body":"This PR introduces environment v2 builder into fission. \r\n\r\nEnvironment builder is consist of `builder` binary and language-specific container.\r\n\r\nA env builder starts a build when receiving a build request from build manager(not existed yet) with the following example payload.\r\n\r\n```\r\n{\r\n\t\"srcPkgFilename\": \"test.zip\",\r\n\t\"command\": \"pip3 install -r ${SRC_PKG}/requirements.txt -t ${SRC_PKG} && cp -r ${SRC_PKG} ${DEPLOY_PKG}\"\r\n}\r\n```\r\n\r\nOnce the build is finished, builder replies builder manager with the following example payload\r\n```\r\n{\r\n    \"archiveFilename\": \"archive.zip\",\r\n    \"buildLogs\": \"Collecting pyyaml (from -r /tmp/fission/srcPkg/requirements.txt (line 1))\\n  Downloading PyYAML-3.12.tar.gz (253kB)\\nInstalling collected packages: pyyaml\\n  Running setup.py install for pyyaml: started\\n    Running setup.py install for pyyaml: finished with status 'done'\\nSuccessfully installed pyyaml-3.12\\n\"\r\n}\r\n```\r\n\r\nThen builder manager will create a deployment package and update the `FunctionSpec.Deployment` reference.\r\n\r\nFor those who are interesting in this PR, here is the build tutorial \r\n```\r\n$ cd ${GOPATH}/src/github.com/fission/fission/environments/python3/builder\r\n$ ./build.sh\r\n```\r\nFor further demonstration, please visit demo video [here](https://youtu.be/v-LEwq-oIQc).","created_at":"2017-08-27T15:50:04Z","updated_at":"2017-08-28T19:59:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7d486f4de2d1cce389649ea8abd409354286ca0","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/fission/fission/pulls/298/commits","review_comments_url":"https://api.github.com/repos/fission/fission/pulls/298/comments","review_comment_url":"https://api.github.com/repos/fission/fission/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fission/fission/issues/298/comments","statuses_url":"https://api.github.com/repos/fission/fission/statuses/536921dcc7be97efde1cc9068fe69aa103fbac34","head":{"label":"life1347:add-env-builder","ref":"add-env-builder","sha":"536921dcc7be97efde1cc9068fe69aa103fbac34","user":{"login":"life1347","id":202578,"avatar_url":"https://avatars1.githubusercontent.com/u/202578?v=4","gravatar_id":"","url":"https://api.github.com/users/life1347","html_url":"https://github.com/life1347","followers_url":"https://api.github.com/users/life1347/followers","following_url":"https://api.github.com/users/life1347/following{/other_user}","gists_url":"https://api.github.com/users/life1347/gists{/gist_id}","starred_url":"https://api.github.com/users/life1347/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/life1347/subscriptions","organizations_url":"https://api.github.com/users/life1347/orgs","repos_url":"https://api.github.com/users/life1347/repos","events_url":"https://api.github.com/users/life1347/events{/privacy}","received_events_url":"https://api.github.com/users/life1347/received_events","type":"User","site_admin":false},"repo":{"id":81588221,"name":"fission","full_name":"life1347/fission","owner":{"login":"life1347","id":202578,"avatar_url":"https://avatars1.githubusercontent.com/u/202578?v=4","gravatar_id":"","url":"https://api.github.com/users/life1347","html_url":"https://github.com/life1347","followers_url":"https://api.github.com/users/life1347/followers","following_url":"https://api.github.com/users/life1347/following{/other_user}","gists_url":"https://api.github.com/users/life1347/gists{/gist_id}","starred_url":"https://api.github.com/users/life1347/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/life1347/subscriptions","organizations_url":"https://api.github.com/users/life1347/orgs","repos_url":"https://api.github.com/users/life1347/repos","events_url":"https://api.github.com/users/life1347/events{/privacy}","received_events_url":"https://api.github.com/users/life1347/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/life1347/fission","description":"Fast Serverless Functions for Kubernetes","fork":true,"url":"https://api.github.com/repos/life1347/fission","forks_url":"https://api.github.com/repos/life1347/fission/forks","keys_url":"https://api.github.com/repos/life1347/fission/keys{/key_id}","collaborators_url":"https://api.github.com/repos/life1347/fission/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/life1347/fission/teams","hooks_url":"https://api.github.com/repos/life1347/fission/hooks","issue_events_url":"https://api.github.com/repos/life1347/fission/issues/events{/number}","events_url":"https://api.github.com/repos/life1347/fission/events","assignees_url":"https://api.github.com/repos/life1347/fission/assignees{/user}","branches_url":"https://api.github.com/repos/life1347/fission/branches{/branch}","tags_url":"https://api.github.com/repos/life1347/fission/tags","blobs_url":"https://api.github.com/repos/life1347/fission/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/life1347/fission/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/life1347/fission/git/refs{/sha}","trees_url":"https://api.github.com/repos/life1347/fission/git/trees{/sha}","statuses_url":"https://api.github.com/repos/life1347/fission/statuses/{sha}","languages_url":"https://api.github.com/repos/life1347/fission/languages","stargazers_url":"https://api.github.com/repos/life1347/fission/stargazers","contributors_url":"https://api.github.com/repos/life1347/fission/contributors","subscribers_url":"https://api.github.com/repos/life1347/fission/subscribers","subscription_url":"https://api.github.com/repos/life1347/fission/subscription","commits_url":"https://api.github.com/repos/life1347/fission/commits{/sha}","git_commits_url":"https://api.github.com/repos/life1347/fission/git/commits{/sha}","comments_url":"https://api.github.com/repos/life1347/fission/comments{/number}","issue_comment_url":"https://api.github.com/repos/life1347/fission/issues/comments{/number}","contents_url":"https://api.github.com/repos/life1347/fission/contents/{+path}","compare_url":"https://api.github.com/repos/life1347/fission/compare/{base}...{head}","merges_url":"https://api.github.com/repos/life1347/fission/merges","archive_url":"https://api.github.com/repos/life1347/fission/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/life1347/fission/downloads","issues_url":"https://api.github.com/repos/life1347/fission/issues{/number}","pulls_url":"https://api.github.com/repos/life1347/fission/pulls{/number}","milestones_url":"https://api.github.com/repos/life1347/fission/milestones{/number}","notifications_url":"https://api.github.com/repos/life1347/fission/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/life1347/fission/labels{/name}","releases_url":"https://api.github.com/repos/life1347/fission/releases{/id}","deployments_url":"https://api.github.com/repos/life1347/fission/deployments","created_at":"2017-02-10T17:17:58Z","updated_at":"2017-02-10T17:18:00Z","pushed_at":"2017-08-27T15:42:58Z","git_url":"git://github.com/life1347/fission.git","ssh_url":"git@github.com:life1347/fission.git","clone_url":"https://github.com/life1347/fission.git","svn_url":"https://github.com/life1347/fission","homepage":"http://fission.io","size":668,"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":"fission:master","ref":"master","sha":"6f017cf40029d55fa2d84d1e5306c42a326a4843","user":{"login":"fission","id":24659215,"avatar_url":"https://avatars2.githubusercontent.com/u/24659215?v=4","gravatar_id":"","url":"https://api.github.com/users/fission","html_url":"https://github.com/fission","followers_url":"https://api.github.com/users/fission/followers","following_url":"https://api.github.com/users/fission/following{/other_user}","gists_url":"https://api.github.com/users/fission/gists{/gist_id}","starred_url":"https://api.github.com/users/fission/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fission/subscriptions","organizations_url":"https://api.github.com/users/fission/orgs","repos_url":"https://api.github.com/users/fission/repos","events_url":"https://api.github.com/users/fission/events{/privacy}","received_events_url":"https://api.github.com/users/fission/received_events","type":"Organization","site_admin":false},"repo":{"id":66050533,"name":"fission","full_name":"fission/fission","owner":{"login":"fission","id":24659215,"avatar_url":"https://avatars2.githubusercontent.com/u/24659215?v=4","gravatar_id":"","url":"https://api.github.com/users/fission","html_url":"https://github.com/fission","followers_url":"https://api.github.com/users/fission/followers","following_url":"https://api.github.com/users/fission/following{/other_user}","gists_url":"https://api.github.com/users/fission/gists{/gist_id}","starred_url":"https://api.github.com/users/fission/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fission/subscriptions","organizations_url":"https://api.github.com/users/fission/orgs","repos_url":"https://api.github.com/users/fission/repos","events_url":"https://api.github.com/users/fission/events{/privacy}","received_events_url":"https://api.github.com/users/fission/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fission/fission","description":"Fast Serverless Functions for Kubernetes","fork":false,"url":"https://api.github.com/repos/fission/fission","forks_url":"https://api.github.com/repos/fission/fission/forks","keys_url":"https://api.github.com/repos/fission/fission/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fission/fission/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fission/fission/teams","hooks_url":"https://api.github.com/repos/fission/fission/hooks","issue_events_url":"https://api.github.com/repos/fission/fission/issues/events{/number}","events_url":"https://api.github.com/repos/fission/fission/events","assignees_url":"https://api.github.com/repos/fission/fission/assignees{/user}","branches_url":"https://api.github.com/repos/fission/fission/branches{/branch}","tags_url":"https://api.github.com/repos/fission/fission/tags","blobs_url":"https://api.github.com/repos/fission/fission/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fission/fission/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fission/fission/git/refs{/sha}","trees_url":"https://api.github.com/repos/fission/fission/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fission/fission/statuses/{sha}","languages_url":"https://api.github.com/repos/fission/fission/languages","stargazers_url":"https://api.github.com/repos/fission/fission/stargazers","contributors_url":"https://api.github.com/repos/fission/fission/contributors","subscribers_url":"https://api.github.com/repos/fission/fission/subscribers","subscription_url":"https://api.github.com/repos/fission/fission/subscription","commits_url":"https://api.github.com/repos/fission/fission/commits{/sha}","git_commits_url":"https://api.github.com/repos/fission/fission/git/commits{/sha}","comments_url":"https://api.github.com/repos/fission/fission/comments{/number}","issue_comment_url":"https://api.github.com/repos/fission/fission/issues/comments{/number}","contents_url":"https://api.github.com/repos/fission/fission/contents/{+path}","compare_url":"https://api.github.com/repos/fission/fission/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fission/fission/merges","archive_url":"https://api.github.com/repos/fission/fission/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fission/fission/downloads","issues_url":"https://api.github.com/repos/fission/fission/issues{/number}","pulls_url":"https://api.github.com/repos/fission/fission/pulls{/number}","milestones_url":"https://api.github.com/repos/fission/fission/milestones{/number}","notifications_url":"https://api.github.com/repos/fission/fission/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fission/fission/labels{/name}","releases_url":"https://api.github.com/repos/fission/fission/releases{/id}","deployments_url":"https://api.github.com/repos/fission/fission/deployments","created_at":"2016-08-19T03:43:56Z","updated_at":"2017-08-28T19:54:52Z","pushed_at":"2017-08-28T17:44:32Z","git_url":"git://github.com/fission/fission.git","ssh_url":"git@github.com:fission/fission.git","clone_url":"https://github.com/fission/fission.git","svn_url":"https://github.com/fission/fission","homepage":"http://fission.io","size":685,"stargazers_count":2364,"watchers_count":2364,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":160,"mirror_url":null,"open_issues_count":95,"forks":160,"open_issues":95,"watchers":2364,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fission/fission/pulls/298"},"html":{"href":"https://github.com/fission/fission/pull/298"},"issue":{"href":"https://api.github.com/repos/fission/fission/issues/298"},"comments":{"href":"https://api.github.com/repos/fission/fission/issues/298/comments"},"review_comments":{"href":"https://api.github.com/repos/fission/fission/pulls/298/comments"},"review_comment":{"href":"https://api.github.com/repos/fission/fission/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fission/fission/pulls/298/commits"},"statuses":{"href":"https://api.github.com/repos/fission/fission/statuses/536921dcc7be97efde1cc9068fe69aa103fbac34"}}}}
{"actor":{"display_login":"soamvasani"}}