GitHub PullRequestReviewCommentEvent at 2014-12-27 13:45:54
Repository: pool
Actor: mookjp
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mookjp/pool/pulls/comments/22292623","id":22292623,"diff_hunk":"@@ -19,7 +19,7 @@\n   before(:all) do\n     @logger = Logger.new(STDOUT)\n     @build_handler_addr = \"0.0.0.0\"\n-    @build_handler_port = 9002\n+    @build_handler_port = 10010","path":"docker/pool/builder/spec/features/build_server_spec.rb","position":5,"original_position":5,"commit_id":"94364fdd041547dd930faa93376450bbdda57d56","original_commit_id":"94364fdd041547dd930faa93376450bbdda57d56","user":{"login":"mookjp","id":1519309,"avatar_url":"https://avatars.githubusercontent.com/u/1519309?v=3","gravatar_id":"","url":"https://api.github.com/users/mookjp","html_url":"https://github.com/mookjp","followers_url":"https://api.github.com/users/mookjp/followers","following_url":"https://api.github.com/users/mookjp/following{/other_user}","gists_url":"https://api.github.com/users/mookjp/gists{/gist_id}","starred_url":"https://api.github.com/users/mookjp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mookjp/subscriptions","organizations_url":"https://api.github.com/users/mookjp/orgs","repos_url":"https://api.github.com/users/mookjp/repos","events_url":"https://api.github.com/users/mookjp/events{/privacy}","received_events_url":"https://api.github.com/users/mookjp/received_events","type":"User","site_admin":false},"body":"@ainoya Why did you change the port? It seems that `BuildHandler` is up at port 9001 https://github.com/mookjp/pool/blob/stop-defunct-process/docker/pool/builder/bin/build_server#L12","created_at":"2014-12-27T13:45:54Z","updated_at":"2014-12-27T13:45:54Z","html_url":"https://github.com/mookjp/pool/pull/111#discussion_r22292623","pull_request_url":"https://api.github.com/repos/mookjp/pool/pulls/111","_links":{"self":{"href":"https://api.github.com/repos/mookjp/pool/pulls/comments/22292623"},"html":{"href":"https://github.com/mookjp/pool/pull/111#discussion_r22292623"},"pull_request":{"href":"https://api.github.com/repos/mookjp/pool/pulls/111"}}},"pull_request":{"url":"https://api.github.com/repos/mookjp/pool/pulls/111","id":26584415,"html_url":"https://github.com/mookjp/pool/pull/111","diff_url":"https://github.com/mookjp/pool/pull/111.diff","patch_url":"https://github.com/mookjp/pool/pull/111.patch","issue_url":"https://api.github.com/repos/mookjp/pool/issues/111","number":111,"state":"open","locked":false,"title":"Stop raising defunct processes","user":{"login":"ainoya","id":2300438,"avatar_url":"https://avatars.githubusercontent.com/u/2300438?v=3","gravatar_id":"","url":"https://api.github.com/users/ainoya","html_url":"https://github.com/ainoya","followers_url":"https://api.github.com/users/ainoya/followers","following_url":"https://api.github.com/users/ainoya/following{/other_user}","gists_url":"https://api.github.com/users/ainoya/gists{/gist_id}","starred_url":"https://api.github.com/users/ainoya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ainoya/subscriptions","organizations_url":"https://api.github.com/users/ainoya/orgs","repos_url":"https://api.github.com/users/ainoya/repos","events_url":"https://api.github.com/users/ainoya/events{/privacy}","received_events_url":"https://api.github.com/users/ainoya/received_events","type":"User","site_admin":false},"body":"Try to fix #53 .\r\n\r\n- [x] Add API to access docker like docker/pool/builder/lib/builder/git_handler.rb\r\n- [x] Add API server for docker to EM\r\n- [x] Change hook.rb to get values via these API then remove \"`\"\r\n\r\nI fixed the points below;\r\n\r\n**docker/pool/Dockerfile**\r\n\r\n- Replaced `FROM` image to [prevsio/poolbase](https://github.com/prevs-io/docker-pool-base).\r\n- Moved depended package installation process to `docker-pool-base`\r\n- `curl` with `-s` option to suppress output\r\n\r\n**docker/pool/builder/bin/build_server**\r\n\r\n- Add `DockerHandler` http api server to eventmachine\r\n\r\n**docker/pool/builder/lib/builder/config.rb**\r\n\r\n- Add `read_ids` method for reading commit-id/image-id pair from `/app/images/ids`. this method is moved from `hook.rb`\r\n\r\n**docker/pool/builder/lib/builder/constants.rb**\r\n\r\n- Add the constant of `/app/images/ids`\r\n\r\n**docker/pool/builder/lib/builder/docker.rb**\r\n\r\n- Utility module for accessing preview containers in pool environment\r\n- `find_container_by_commit_id` method takes git commit id, returns address (with port number) of matched container\r\n- the port number of container to preview is fixed; `CONTAINER_PORT=80`\r\n\r\n**docker/pool/builder/lib/builder/docker_handler.rb**\r\n\r\n- DockerHandler is http server to communicate the container infomation with `hook.rb` in mod_mruby\r\n- http server has the endpoint `/containers/<git-commit-id>`, and for example, `hook.rb` calls `http://0.0.0.0:9002/containers/a12314zbvd` by `GET` request, then the server returns response `{:status => 'success', :addr => 'xxx.xxx.xxx.xxx:80'}`with json format. If the container corresponding to git commit id doesn't exists, the server returns `{:status => 'error'}`\r\n\r\n**docker/pool/handlers/hook.rb**\r\n\r\n- Shrinked the codes.\r\n- moved procedure resolving container address by git commit id to `DockerHandler` server.\r\n- Stop to executing external command with \"`\" syntax.\r\n- Instead using `curl` command to communicate with http server, use mruby module [mruby-webapi](https://github.com/iij/mruby-webapi)\r\n\r\n**scripts/init_host_server**\r\n\r\n- replace cache file","created_at":"2014-12-25T16:18:42Z","updated_at":"2014-12-27T13:45:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60092f1ef22297a08f52169bb2ae7a93b760f08c","assignee":{"login":"mookjp","id":1519309,"avatar_url":"https://avatars.githubusercontent.com/u/1519309?v=3","gravatar_id":"","url":"https://api.github.com/users/mookjp","html_url":"https://github.com/mookjp","followers_url":"https://api.github.com/users/mookjp/followers","following_url":"https://api.github.com/users/mookjp/following{/other_user}","gists_url":"https://api.github.com/users/mookjp/gists{/gist_id}","starred_url":"https://api.github.com/users/mookjp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mookjp/subscriptions","organizations_url":"https://api.github.com/users/mookjp/orgs","repos_url":"https://api.github.com/users/mookjp/repos","events_url":"https://api.github.com/users/mookjp/events{/privacy}","received_events_url":"https://api.github.com/users/mookjp/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mookjp/pool/pulls/111/commits","review_comments_url":"https://api.github.com/repos/mookjp/pool/pulls/111/comments","review_comment_url":"https://api.github.com/repos/mookjp/pool/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mookjp/pool/issues/111/comments","statuses_url":"https://api.github.com/repos/mookjp/pool/statuses/94364fdd041547dd930faa93376450bbdda57d56","head":{"label":"mookjp:stop-defunct-process","ref":"stop-defunct-process","sha":"94364fdd041547dd930faa93376450bbdda57d56","user":{"login":"mookjp","id":1519309,"avatar_url":"https://avatars.githubusercontent.com/u/1519309?v=3","gravatar_id":"","url":"https://api.github.com/users/mookjp","html_url":"https://github.com/mookjp","followers_url":"https://api.github.com/users/mookjp/followers","following_url":"https://api.github.com/users/mookjp/following{/other_user}","gists_url":"https://api.github.com/users/mookjp/gists{/gist_id}","starred_url":"https://api.github.com/users/mookjp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mookjp/subscriptions","organizations_url":"https://api.github.com/users/mookjp/orgs","repos_url":"https://api.github.com/users/mookjp/repos","events_url":"https://api.github.com/users/mookjp/events{/privacy}","received_events_url":"https://api.github.com/users/mookjp/received_events","type":"User","site_admin":false},"repo":{"id":22808750,"name":"pool","full_name":"mookjp/pool","owner":{"login":"mookjp","id":1519309,"avatar_url":"https://avatars.githubusercontent.com/u/1519309?v=3","gravatar_id":"","url":"https://api.github.com/users/mookjp","html_url":"https://github.com/mookjp","followers_url":"https://api.github.com/users/mookjp/followers","following_url":"https://api.github.com/users/mookjp/following{/other_user}","gists_url":"https://api.github.com/users/mookjp/gists{/gist_id}","starred_url":"https://api.github.com/users/mookjp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mookjp/subscriptions","organizations_url":"https://api.github.com/users/mookjp/orgs","repos_url":"https://api.github.com/users/mookjp/repos","events_url":"https://api.github.com/users/mookjp/events{/privacy}","received_events_url":"https://api.github.com/users/mookjp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mookjp/pool","description":"The simplest proxy service to access your Dockerized webapps by Git commit-id.","fork":false,"url":"https://api.github.com/repos/mookjp/pool","forks_url":"https://api.github.com/repos/mookjp/pool/forks","keys_url":"https://api.github.com/repos/mookjp/pool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mookjp/pool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mookjp/pool/teams","hooks_url":"https://api.github.com/repos/mookjp/pool/hooks","issue_events_url":"https://api.github.com/repos/mookjp/pool/issues/events{/number}","events_url":"https://api.github.com/repos/mookjp/pool/events","assignees_url":"https://api.github.com/repos/mookjp/pool/assignees{/user}","branches_url":"https://api.github.com/repos/mookjp/pool/branches{/branch}","tags_url":"https://api.github.com/repos/mookjp/pool/tags","blobs_url":"https://api.github.com/repos/mookjp/pool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mookjp/pool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mookjp/pool/git/refs{/sha}","trees_url":"https://api.github.com/repos/mookjp/pool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mookjp/pool/statuses/{sha}","languages_url":"https://api.github.com/repos/mookjp/pool/languages","stargazers_url":"https://api.github.com/repos/mookjp/pool/stargazers","contributors_url":"https://api.github.com/repos/mookjp/pool/contributors","subscribers_url":"https://api.github.com/repos/mookjp/pool/subscribers","subscription_url":"https://api.github.com/repos/mookjp/pool/subscription","commits_url":"https://api.github.com/repos/mookjp/pool/commits{/sha}","git_commits_url":"https://api.github.com/repos/mookjp/pool/git/commits{/sha}","comments_url":"https://api.github.com/repos/mookjp/pool/comments{/number}","issue_comment_url":"https://api.github.com/repos/mookjp/pool/issues/comments/{number}","contents_url":"https://api.github.com/repos/mookjp/pool/contents/{+path}","compare_url":"https://api.github.com/repos/mookjp/pool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mookjp/pool/merges","archive_url":"https://api.github.com/repos/mookjp/pool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mookjp/pool/downloads","issues_url":"https://api.github.com/repos/mookjp/pool/issues{/number}","pulls_url":"https://api.github.com/repos/mookjp/pool/pulls{/number}","milestones_url":"https://api.github.com/repos/mookjp/pool/milestones{/number}","notifications_url":"https://api.github.com/repos/mookjp/pool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mookjp/pool/labels{/name}","releases_url":"https://api.github.com/repos/mookjp/pool/releases{/id}","created_at":"2014-08-10T12:49:14Z","updated_at":"2014-12-25T13:59:26Z","pushed_at":"2014-12-27T08:45:55Z","git_url":"git://github.com/mookjp/pool.git","ssh_url":"git@github.com:mookjp/pool.git","clone_url":"https://github.com/mookjp/pool.git","svn_url":"https://github.com/mookjp/pool","homepage":"","size":2005,"stargazers_count":47,"watchers_count":47,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":24,"forks":3,"open_issues":24,"watchers":47,"default_branch":"master"}},"base":{"label":"mookjp:master","ref":"master","sha":"3fc5a3cb0a541823334ada213986d97369102637","user":{"login":"mookjp","id":1519309,"avatar_url":"https://avatars.githubusercontent.com/u/1519309?v=3","gravatar_id":"","url":"https://api.github.com/users/mookjp","html_url":"https://github.com/mookjp","followers_url":"https://api.github.com/users/mookjp/followers","following_url":"https://api.github.com/users/mookjp/following{/other_user}","gists_url":"https://api.github.com/users/mookjp/gists{/gist_id}","starred_url":"https://api.github.com/users/mookjp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mookjp/subscriptions","organizations_url":"https://api.github.com/users/mookjp/orgs","repos_url":"https://api.github.com/users/mookjp/repos","events_url":"https://api.github.com/users/mookjp/events{/privacy}","received_events_url":"https://api.github.com/users/mookjp/received_events","type":"User","site_admin":false},"repo":{"id":22808750,"name":"pool","full_name":"mookjp/pool","owner":{"login":"mookjp","id":1519309,"avatar_url":"https://avatars.githubusercontent.com/u/1519309?v=3","gravatar_id":"","url":"https://api.github.com/users/mookjp","html_url":"https://github.com/mookjp","followers_url":"https://api.github.com/users/mookjp/followers","following_url":"https://api.github.com/users/mookjp/following{/other_user}","gists_url":"https://api.github.com/users/mookjp/gists{/gist_id}","starred_url":"https://api.github.com/users/mookjp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mookjp/subscriptions","organizations_url":"https://api.github.com/users/mookjp/orgs","repos_url":"https://api.github.com/users/mookjp/repos","events_url":"https://api.github.com/users/mookjp/events{/privacy}","received_events_url":"https://api.github.com/users/mookjp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mookjp/pool","description":"The simplest proxy service to access your Dockerized webapps by Git commit-id.","fork":false,"url":"https://api.github.com/repos/mookjp/pool","forks_url":"https://api.github.com/repos/mookjp/pool/forks","keys_url":"https://api.github.com/repos/mookjp/pool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mookjp/pool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mookjp/pool/teams","hooks_url":"https://api.github.com/repos/mookjp/pool/hooks","issue_events_url":"https://api.github.com/repos/mookjp/pool/issues/events{/number}","events_url":"https://api.github.com/repos/mookjp/pool/events","assignees_url":"https://api.github.com/repos/mookjp/pool/assignees{/user}","branches_url":"https://api.github.com/repos/mookjp/pool/branches{/branch}","tags_url":"https://api.github.com/repos/mookjp/pool/tags","blobs_url":"https://api.github.com/repos/mookjp/pool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mookjp/pool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mookjp/pool/git/refs{/sha}","trees_url":"https://api.github.com/repos/mookjp/pool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mookjp/pool/statuses/{sha}","languages_url":"https://api.github.com/repos/mookjp/pool/languages","stargazers_url":"https://api.github.com/repos/mookjp/pool/stargazers","contributors_url":"https://api.github.com/repos/mookjp/pool/contributors","subscribers_url":"https://api.github.com/repos/mookjp/pool/subscribers","subscription_url":"https://api.github.com/repos/mookjp/pool/subscription","commits_url":"https://api.github.com/repos/mookjp/pool/commits{/sha}","git_commits_url":"https://api.github.com/repos/mookjp/pool/git/commits{/sha}","comments_url":"https://api.github.com/repos/mookjp/pool/comments{/number}","issue_comment_url":"https://api.github.com/repos/mookjp/pool/issues/comments/{number}","contents_url":"https://api.github.com/repos/mookjp/pool/contents/{+path}","compare_url":"https://api.github.com/repos/mookjp/pool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mookjp/pool/merges","archive_url":"https://api.github.com/repos/mookjp/pool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mookjp/pool/downloads","issues_url":"https://api.github.com/repos/mookjp/pool/issues{/number}","pulls_url":"https://api.github.com/repos/mookjp/pool/pulls{/number}","milestones_url":"https://api.github.com/repos/mookjp/pool/milestones{/number}","notifications_url":"https://api.github.com/repos/mookjp/pool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mookjp/pool/labels{/name}","releases_url":"https://api.github.com/repos/mookjp/pool/releases{/id}","created_at":"2014-08-10T12:49:14Z","updated_at":"2014-12-25T13:59:26Z","pushed_at":"2014-12-27T08:45:55Z","git_url":"git://github.com/mookjp/pool.git","ssh_url":"git@github.com:mookjp/pool.git","clone_url":"https://github.com/mookjp/pool.git","svn_url":"https://github.com/mookjp/pool","homepage":"","size":2005,"stargazers_count":47,"watchers_count":47,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":24,"forks":3,"open_issues":24,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mookjp/pool/pulls/111"},"html":{"href":"https://github.com/mookjp/pool/pull/111"},"issue":{"href":"https://api.github.com/repos/mookjp/pool/issues/111"},"comments":{"href":"https://api.github.com/repos/mookjp/pool/issues/111/comments"},"review_comments":{"href":"https://api.github.com/repos/mookjp/pool/pulls/111/comments"},"review_comment":{"href":"https://api.github.com/repos/mookjp/pool/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mookjp/pool/pulls/111/commits"},"statuses":{"href":"https://api.github.com/repos/mookjp/pool/statuses/94364fdd041547dd930faa93376450bbdda57d56"}}}}