GitHub PullRequestReviewCommentEvent at 2014-07-17 01:45:53
Repository: juju
Actor: axw
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/juju/juju/pulls/comments/15038058","id":15038058,"diff_hunk":"@@ -190,10 +191,18 @@ func (c *BootstrapCommand) Run(ctx *cmd.Context) (resultErr error) {\n \t\t}\n \t}\n \n-\tdefer cleanup()\n-\tif err := bootstrapFuncs.EnsureNotBootstrapped(environ); err != nil {\n-\t\treturn err\n+\t// Check to see if this environment is already bootstrapped. If it\n+\t// is, we inform the user and exit early. If an error is returned\n+\t// but it is not that the environment is already bootstrapped,\n+\t// then we're in an unknown state.\n+\tif err := bootstrapFuncs.EnsureNotBootstrapped(environ); nil != err {\n+\t\tif environs.ErrAlreadyBootstrapped == err {\n+\t\t\tlogger.Warningf(\"This juju environment is already bootstrapped. If you want to start a new Juju environment, run juju destroy-environment first to clean up.\")\n+\t\t\treturn err\n+\t\t}\n+\t\treturn errors.Annotatef(err, \"cannot determine if environment is already bootstrapped. There are potentially files that need to be cleaned up.\")","path":"cmd/juju/bootstrap.go","position":42,"original_position":42,"commit_id":"c15b3e95ecad215ee192b71dd0b62454cf27e616","original_commit_id":"c15b3e95ecad215ee192b71dd0b62454cf27e616","user":{"login":"axw","id":843579,"avatar_url":"https://avatars.githubusercontent.com/u/843579?","gravatar_id":"3e47ab60c72fc978e7bcfaf7b22f479b","url":"https://api.github.com/users/axw","html_url":"https://github.com/axw","followers_url":"https://api.github.com/users/axw/followers","following_url":"https://api.github.com/users/axw/following{/other_user}","gists_url":"https://api.github.com/users/axw/gists{/gist_id}","starred_url":"https://api.github.com/users/axw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axw/subscriptions","organizations_url":"https://api.github.com/users/axw/orgs","repos_url":"https://api.github.com/users/axw/repos","events_url":"https://api.github.com/users/axw/events{/privacy}","received_events_url":"https://api.github.com/users/axw/received_events","type":"User","site_admin":false},"body":"I'm concerned that the second sentence in that error message will read strangely in transient errors. What prompted you to add this? Did you trigger a common error path due to files being left around in an environment?","created_at":"2014-07-17T01:45:53Z","updated_at":"2014-07-17T01:45:53Z","html_url":"https://github.com/juju/juju/pull/319#discussion_r15038058","pull_request_url":"https://api.github.com/repos/juju/juju/pulls/319","_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/comments/15038058"},"html":{"href":"https://github.com/juju/juju/pull/319#discussion_r15038058"},"pull_request":{"href":"https://api.github.com/repos/juju/juju/pulls/319"}}},"pull_request":{"url":"https://api.github.com/repos/juju/juju/pulls/319","id":18494920,"html_url":"https://github.com/juju/juju/pull/319","diff_url":"https://github.com/juju/juju/pull/319.diff","patch_url":"https://github.com/juju/juju/pull/319.patch","issue_url":"https://api.github.com/repos/juju/juju/issues/319","number":319,"state":"open","title":"Bootstrap no longer cleans up if it can't tell whether an environment is bootstrapped or not.","user":{"login":"katco-","id":5490961,"avatar_url":"https://avatars.githubusercontent.com/u/5490961?","gravatar_id":"a334ba9d9fbb1ee1a4816d783b5a37f1","url":"https://api.github.com/users/katco-","html_url":"https://github.com/katco-","followers_url":"https://api.github.com/users/katco-/followers","following_url":"https://api.github.com/users/katco-/following{/other_user}","gists_url":"https://api.github.com/users/katco-/gists{/gist_id}","starred_url":"https://api.github.com/users/katco-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katco-/subscriptions","organizations_url":"https://api.github.com/users/katco-/orgs","repos_url":"https://api.github.com/users/katco-/repos","events_url":"https://api.github.com/users/katco-/events{/privacy}","received_events_url":"https://api.github.com/users/katco-/received_events","type":"User","site_admin":false},"body":"Added a test to simulate an instance in which this might occur. Tested locally; some tests were failing, but they looked innocuous and related to connecting to mongo, not these changes.","created_at":"2014-07-16T21:03:12Z","updated_at":"2014-07-17T01:45:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64535346f6bce8d4d3220867d92bcdabc983ac34","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/juju/juju/pulls/319/commits","review_comments_url":"https://api.github.com/repos/juju/juju/pulls/319/comments","review_comment_url":"https://api.github.com/repos/juju/juju/pulls/comments/{number}","comments_url":"https://api.github.com/repos/juju/juju/issues/319/comments","statuses_url":"https://api.github.com/repos/juju/juju/statuses/c15b3e95ecad215ee192b71dd0b62454cf27e616","head":{"label":"katco-:lp-1340893-bootstrap-destroy","ref":"lp-1340893-bootstrap-destroy","sha":"c15b3e95ecad215ee192b71dd0b62454cf27e616","user":{"login":"katco-","id":5490961,"avatar_url":"https://avatars.githubusercontent.com/u/5490961?","gravatar_id":"a334ba9d9fbb1ee1a4816d783b5a37f1","url":"https://api.github.com/users/katco-","html_url":"https://github.com/katco-","followers_url":"https://api.github.com/users/katco-/followers","following_url":"https://api.github.com/users/katco-/following{/other_user}","gists_url":"https://api.github.com/users/katco-/gists{/gist_id}","starred_url":"https://api.github.com/users/katco-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katco-/subscriptions","organizations_url":"https://api.github.com/users/katco-/orgs","repos_url":"https://api.github.com/users/katco-/repos","events_url":"https://api.github.com/users/katco-/events{/privacy}","received_events_url":"https://api.github.com/users/katco-/received_events","type":"User","site_admin":false},"repo":{"id":21104510,"name":"juju","full_name":"katco-/juju","owner":{"login":"katco-","id":5490961,"avatar_url":"https://avatars.githubusercontent.com/u/5490961?","gravatar_id":"a334ba9d9fbb1ee1a4816d783b5a37f1","url":"https://api.github.com/users/katco-","html_url":"https://github.com/katco-","followers_url":"https://api.github.com/users/katco-/followers","following_url":"https://api.github.com/users/katco-/following{/other_user}","gists_url":"https://api.github.com/users/katco-/gists{/gist_id}","starred_url":"https://api.github.com/users/katco-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katco-/subscriptions","organizations_url":"https://api.github.com/users/katco-/orgs","repos_url":"https://api.github.com/users/katco-/repos","events_url":"https://api.github.com/users/katco-/events{/privacy}","received_events_url":"https://api.github.com/users/katco-/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/katco-/juju","description":"juju is devops distilled","fork":true,"url":"https://api.github.com/repos/katco-/juju","forks_url":"https://api.github.com/repos/katco-/juju/forks","keys_url":"https://api.github.com/repos/katco-/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/katco-/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/katco-/juju/teams","hooks_url":"https://api.github.com/repos/katco-/juju/hooks","issue_events_url":"https://api.github.com/repos/katco-/juju/issues/events{/number}","events_url":"https://api.github.com/repos/katco-/juju/events","assignees_url":"https://api.github.com/repos/katco-/juju/assignees{/user}","branches_url":"https://api.github.com/repos/katco-/juju/branches{/branch}","tags_url":"https://api.github.com/repos/katco-/juju/tags","blobs_url":"https://api.github.com/repos/katco-/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/katco-/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/katco-/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/katco-/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/katco-/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/katco-/juju/languages","stargazers_url":"https://api.github.com/repos/katco-/juju/stargazers","contributors_url":"https://api.github.com/repos/katco-/juju/contributors","subscribers_url":"https://api.github.com/repos/katco-/juju/subscribers","subscription_url":"https://api.github.com/repos/katco-/juju/subscription","commits_url":"https://api.github.com/repos/katco-/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/katco-/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/katco-/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/katco-/juju/issues/comments/{number}","contents_url":"https://api.github.com/repos/katco-/juju/contents/{+path}","compare_url":"https://api.github.com/repos/katco-/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/katco-/juju/merges","archive_url":"https://api.github.com/repos/katco-/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/katco-/juju/downloads","issues_url":"https://api.github.com/repos/katco-/juju/issues{/number}","pulls_url":"https://api.github.com/repos/katco-/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/katco-/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/katco-/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/katco-/juju/labels{/name}","releases_url":"https://api.github.com/repos/katco-/juju/releases{/id}","created_at":"2014-06-22T20:27:55Z","updated_at":"2014-06-30T20:38:24Z","pushed_at":"2014-07-16T21:01:34Z","git_url":"git://github.com/katco-/juju.git","ssh_url":"git@github.com:katco-/juju.git","clone_url":"https://github.com/katco-/juju.git","svn_url":"https://github.com/katco-/juju","homepage":"juju.ubuntu.com","size":24939,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"juju:master","ref":"master","sha":"2357de0d2f788fdcdd5c04d9851fe57cf7f02f79","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?","gravatar_id":"b095d1e26e5705abe0ad2de7d87aac2e","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"repo":{"id":20445947,"name":"juju","full_name":"juju/juju","owner":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?","gravatar_id":"b095d1e26e5705abe0ad2de7d87aac2e","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juju/juju","description":"juju is devops distilled","fork":false,"url":"https://api.github.com/repos/juju/juju","forks_url":"https://api.github.com/repos/juju/juju/forks","keys_url":"https://api.github.com/repos/juju/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juju/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juju/juju/teams","hooks_url":"https://api.github.com/repos/juju/juju/hooks","issue_events_url":"https://api.github.com/repos/juju/juju/issues/events{/number}","events_url":"https://api.github.com/repos/juju/juju/events","assignees_url":"https://api.github.com/repos/juju/juju/assignees{/user}","branches_url":"https://api.github.com/repos/juju/juju/branches{/branch}","tags_url":"https://api.github.com/repos/juju/juju/tags","blobs_url":"https://api.github.com/repos/juju/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juju/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juju/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/juju/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juju/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/juju/juju/languages","stargazers_url":"https://api.github.com/repos/juju/juju/stargazers","contributors_url":"https://api.github.com/repos/juju/juju/contributors","subscribers_url":"https://api.github.com/repos/juju/juju/subscribers","subscription_url":"https://api.github.com/repos/juju/juju/subscription","commits_url":"https://api.github.com/repos/juju/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/juju/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/juju/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/juju/juju/issues/comments/{number}","contents_url":"https://api.github.com/repos/juju/juju/contents/{+path}","compare_url":"https://api.github.com/repos/juju/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juju/juju/merges","archive_url":"https://api.github.com/repos/juju/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juju/juju/downloads","issues_url":"https://api.github.com/repos/juju/juju/issues{/number}","pulls_url":"https://api.github.com/repos/juju/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/juju/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/juju/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juju/juju/labels{/name}","releases_url":"https://api.github.com/repos/juju/juju/releases{/id}","created_at":"2014-06-03T14:28:10Z","updated_at":"2014-07-16T09:22:13Z","pushed_at":"2014-07-16T23:28:04Z","git_url":"git://github.com/juju/juju.git","ssh_url":"git@github.com:juju/juju.git","clone_url":"https://github.com/juju/juju.git","svn_url":"https://github.com/juju/juju","homepage":"juju.ubuntu.com","size":32572,"stargazers_count":182,"watchers_count":182,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":42,"mirror_url":null,"open_issues_count":36,"forks":42,"open_issues":36,"watchers":182,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/319"},"html":{"href":"https://github.com/juju/juju/pull/319"},"issue":{"href":"https://api.github.com/repos/juju/juju/issues/319"},"comments":{"href":"https://api.github.com/repos/juju/juju/issues/319/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/juju/pulls/319/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/juju/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/juju/juju/pulls/319/commits"},"statuses":{"href":"https://api.github.com/repos/juju/juju/statuses/c15b3e95ecad215ee192b71dd0b62454cf27e616"}}}}