{"action":"created","comment":{"url":"https://api.github.com/repos/square/p2/pulls/comments/29999350","id":29999350,"diff_hunk":"@@ -292,17 +239,7 @@ func (pod *Pod) Uninstall() error {\n \t\t}\n \t}\n \n-\t// remove runit services\n-\tsbTemplate := runit.NewSBTemplate(pod.Id)\n-\terr = pod.ServiceBuilder.Remove(sbTemplate)\n-\tif err != nil {\n-\t\treturn err\n-\t}\n-\n-\t_, err = pod.ServiceBuilder.Rebuild()\n-\tif err != nil {\n-\t\treturn err\n-\t}\n+\t// remove runit services here","path":"pkg/pods/pod.go","position":93,"original_position":93,"commit_id":"0896452f9a763ddcaa0f0e89838ce60d35506fff","original_commit_id":"0896452f9a763ddcaa0f0e89838ce60d35506fff","user":{"login":"tummychow","id":4285049,"avatar_url":"https://avatars.githubusercontent.com/u/4285049?v=3","gravatar_id":"","url":"https://api.github.com/users/tummychow","html_url":"https://github.com/tummychow","followers_url":"https://api.github.com/users/tummychow/followers","following_url":"https://api.github.com/users/tummychow/following{/other_user}","gists_url":"https://api.github.com/users/tummychow/gists{/gist_id}","starred_url":"https://api.github.com/users/tummychow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tummychow/subscriptions","organizations_url":"https://api.github.com/users/tummychow/orgs","repos_url":"https://api.github.com/users/tummychow/repos","events_url":"https://api.github.com/users/tummychow/events{/privacy}","received_events_url":"https://api.github.com/users/tummychow/received_events","type":"User","site_admin":false},"body":"good question... I removed the old code after eliminating those methods but it should probably delete the service and prune(). will fix","created_at":"2015-05-10T06:50:58Z","updated_at":"2015-05-10T06:50:58Z","html_url":"https://github.com/square/p2/pull/159#discussion_r29999350","pull_request_url":"https://api.github.com/repos/square/p2/pulls/159","_links":{"self":{"href":"https://api.github.com/repos/square/p2/pulls/comments/29999350"},"html":{"href":"https://github.com/square/p2/pull/159#discussion_r29999350"},"pull_request":{"href":"https://api.github.com/repos/square/p2/pulls/159"}}},"pull_request":{"url":"https://api.github.com/repos/square/p2/pulls/159","id":34096812,"html_url":"https://github.com/square/p2/pull/159","diff_url":"https://github.com/square/p2/pull/159.diff","patch_url":"https://github.com/square/p2/pull/159.patch","issue_url":"https://api.github.com/repos/square/p2/issues/159","number":159,"state":"open","locked":false,"title":"Move servicebuilder functionality into p2","user":{"login":"tummychow","id":4285049,"avatar_url":"https://avatars.githubusercontent.com/u/4285049?v=3","gravatar_id":"","url":"https://api.github.com/users/tummychow","html_url":"https://github.com/tummychow","followers_url":"https://api.github.com/users/tummychow/followers","following_url":"https://api.github.com/users/tummychow/following{/other_user}","gists_url":"https://api.github.com/users/tummychow/gists{/gist_id}","starred_url":"https://api.github.com/users/tummychow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tummychow/subscriptions","organizations_url":"https://api.github.com/users/tummychow/orgs","repos_url":"https://api.github.com/users/tummychow/repos","events_url":"https://api.github.com/users/tummychow/events{/privacy}","received_events_url":"https://api.github.com/users/tummychow/received_events","type":"User","site_admin":false},"body":"Managed to PR this before leaving the office for the last time! Summary:\r\n\r\n- no dependency on external servicebuilder script\r\n- the new servicebuilder does not explicitly stop and start services like the old one did. runsvdir does that already when new directories are added or removed.\r\n  - I was considering writing the down file to make all services downed-by-default, which would give p2 more control over the moment that the service starts, but I don't think the distinction is particularly significant here, because the next thing we do (right after creating the service directory) is starting the service.\r\n- servicebuilder functionality invoked as part of hoist launchable.Launch, removed from pod.Launch.\r\n  - To preserve the behavior of servicebuilder wrt cleaning up old services, pod invokes the new Prune method to remove nonexistent services. launchables also invoke prune during their halt, which preserves the other behavior we wanted (deploying a pod with no launchables will remove the services for that pod). The pod-invoked Prune might actually be redundant because of that, now that I think about it.\r\n- post-activate now kills deploys if it crashes. I know we used to make this a non-halting failure, but based on some of the services we've seen, I think bailing here makes more sense, especially since enable is also a killing script.\r\n- post-activate is unexported from launchable, since pod.Launch no longer needs to call it. this should shrink the shared API surface for docker launchables.","created_at":"2015-04-25T00:32:10Z","updated_at":"2015-05-10T06:50:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc4fd769940083bbefdc9a6e57c6d30348df1be6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/square/p2/pulls/159/commits","review_comments_url":"https://api.github.com/repos/square/p2/pulls/159/comments","review_comment_url":"https://api.github.com/repos/square/p2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/square/p2/issues/159/comments","statuses_url":"https://api.github.com/repos/square/p2/statuses/0896452f9a763ddcaa0f0e89838ce60d35506fff","head":{"label":"tummychow:sb","ref":"sb","sha":"0896452f9a763ddcaa0f0e89838ce60d35506fff","user":{"login":"tummychow","id":4285049,"avatar_url":"https://avatars.githubusercontent.com/u/4285049?v=3","gravatar_id":"","url":"https://api.github.com/users/tummychow","html_url":"https://github.com/tummychow","followers_url":"https://api.github.com/users/tummychow/followers","following_url":"https://api.github.com/users/tummychow/following{/other_user}","gists_url":"https://api.github.com/users/tummychow/gists{/gist_id}","starred_url":"https://api.github.com/users/tummychow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tummychow/subscriptions","organizations_url":"https://api.github.com/users/tummychow/orgs","repos_url":"https://api.github.com/users/tummychow/repos","events_url":"https://api.github.com/users/tummychow/events{/privacy}","received_events_url":"https://api.github.com/users/tummychow/received_events","type":"User","site_admin":false},"repo":{"id":29206040,"name":"p2","full_name":"tummychow/p2","owner":{"login":"tummychow","id":4285049,"avatar_url":"https://avatars.githubusercontent.com/u/4285049?v=3","gravatar_id":"","url":"https://api.github.com/users/tummychow","html_url":"https://github.com/tummychow","followers_url":"https://api.github.com/users/tummychow/followers","following_url":"https://api.github.com/users/tummychow/following{/other_user}","gists_url":"https://api.github.com/users/tummychow/gists{/gist_id}","starred_url":"https://api.github.com/users/tummychow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tummychow/subscriptions","organizations_url":"https://api.github.com/users/tummychow/orgs","repos_url":"https://api.github.com/users/tummychow/repos","events_url":"https://api.github.com/users/tummychow/events{/privacy}","received_events_url":"https://api.github.com/users/tummychow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tummychow/p2","description":"Platypus Platform: Tools for Scalable Deployment","fork":true,"url":"https://api.github.com/repos/tummychow/p2","forks_url":"https://api.github.com/repos/tummychow/p2/forks","keys_url":"https://api.github.com/repos/tummychow/p2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tummychow/p2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tummychow/p2/teams","hooks_url":"https://api.github.com/repos/tummychow/p2/hooks","issue_events_url":"https://api.github.com/repos/tummychow/p2/issues/events{/number}","events_url":"https://api.github.com/repos/tummychow/p2/events","assignees_url":"https://api.github.com/repos/tummychow/p2/assignees{/user}","branches_url":"https://api.github.com/repos/tummychow/p2/branches{/branch}","tags_url":"https://api.github.com/repos/tummychow/p2/tags","blobs_url":"https://api.github.com/repos/tummychow/p2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tummychow/p2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tummychow/p2/git/refs{/sha}","trees_url":"https://api.github.com/repos/tummychow/p2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tummychow/p2/statuses/{sha}","languages_url":"https://api.github.com/repos/tummychow/p2/languages","stargazers_url":"https://api.github.com/repos/tummychow/p2/stargazers","contributors_url":"https://api.github.com/repos/tummychow/p2/contributors","subscribers_url":"https://api.github.com/repos/tummychow/p2/subscribers","subscription_url":"https://api.github.com/repos/tummychow/p2/subscription","commits_url":"https://api.github.com/repos/tummychow/p2/commits{/sha}","git_commits_url":"https://api.github.com/repos/tummychow/p2/git/commits{/sha}","comments_url":"https://api.github.com/repos/tummychow/p2/comments{/number}","issue_comment_url":"https://api.github.com/repos/tummychow/p2/issues/comments{/number}","contents_url":"https://api.github.com/repos/tummychow/p2/contents/{+path}","compare_url":"https://api.github.com/repos/tummychow/p2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tummychow/p2/merges","archive_url":"https://api.github.com/repos/tummychow/p2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tummychow/p2/downloads","issues_url":"https://api.github.com/repos/tummychow/p2/issues{/number}","pulls_url":"https://api.github.com/repos/tummychow/p2/pulls{/number}","milestones_url":"https://api.github.com/repos/tummychow/p2/milestones{/number}","notifications_url":"https://api.github.com/repos/tummychow/p2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tummychow/p2/labels{/name}","releases_url":"https://api.github.com/repos/tummychow/p2/releases{/id}","created_at":"2015-01-13T19:07:54Z","updated_at":"2015-05-08T18:50:42Z","pushed_at":"2015-05-08T23:40:25Z","git_url":"git://github.com/tummychow/p2.git","ssh_url":"git@github.com:tummychow/p2.git","clone_url":"https://github.com/tummychow/p2.git","svn_url":"https://github.com/tummychow/p2","homepage":"","size":16580,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"square:master","ref":"master","sha":"9f2bb3d3f13505b4db589d33799621f7ee909c53","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":25320424,"name":"p2","full_name":"square/p2","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/p2","description":"Platypus Platform: Tools for Scalable Deployment","fork":false,"url":"https://api.github.com/repos/square/p2","forks_url":"https://api.github.com/repos/square/p2/forks","keys_url":"https://api.github.com/repos/square/p2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/p2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/p2/teams","hooks_url":"https://api.github.com/repos/square/p2/hooks","issue_events_url":"https://api.github.com/repos/square/p2/issues/events{/number}","events_url":"https://api.github.com/repos/square/p2/events","assignees_url":"https://api.github.com/repos/square/p2/assignees{/user}","branches_url":"https://api.github.com/repos/square/p2/branches{/branch}","tags_url":"https://api.github.com/repos/square/p2/tags","blobs_url":"https://api.github.com/repos/square/p2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/p2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/p2/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/p2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/p2/statuses/{sha}","languages_url":"https://api.github.com/repos/square/p2/languages","stargazers_url":"https://api.github.com/repos/square/p2/stargazers","contributors_url":"https://api.github.com/repos/square/p2/contributors","subscribers_url":"https://api.github.com/repos/square/p2/subscribers","subscription_url":"https://api.github.com/repos/square/p2/subscription","commits_url":"https://api.github.com/repos/square/p2/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/p2/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/p2/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/p2/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/p2/contents/{+path}","compare_url":"https://api.github.com/repos/square/p2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/p2/merges","archive_url":"https://api.github.com/repos/square/p2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/p2/downloads","issues_url":"https://api.github.com/repos/square/p2/issues{/number}","pulls_url":"https://api.github.com/repos/square/p2/pulls{/number}","milestones_url":"https://api.github.com/repos/square/p2/milestones{/number}","notifications_url":"https://api.github.com/repos/square/p2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/p2/labels{/name}","releases_url":"https://api.github.com/repos/square/p2/releases{/id}","created_at":"2014-10-16T20:31:12Z","updated_at":"2015-05-08T18:50:22Z","pushed_at":"2015-05-10T02:43:13Z","git_url":"git://github.com/square/p2.git","ssh_url":"git@github.com:square/p2.git","clone_url":"https://github.com/square/p2.git","svn_url":"https://github.com/square/p2","homepage":"","size":18114,"stargazers_count":44,"watchers_count":44,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":3,"forks":10,"open_issues":3,"watchers":44,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/p2/pulls/159"},"html":{"href":"https://github.com/square/p2/pull/159"},"issue":{"href":"https://api.github.com/repos/square/p2/issues/159"},"comments":{"href":"https://api.github.com/repos/square/p2/issues/159/comments"},"review_comments":{"href":"https://api.github.com/repos/square/p2/pulls/159/comments"},"review_comment":{"href":"https://api.github.com/repos/square/p2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/square/p2/pulls/159/commits"},"statuses":{"href":"https://api.github.com/repos/square/p2/statuses/0896452f9a763ddcaa0f0e89838ce60d35506fff"}}}}