{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/77625377","id":77625377,"diff_hunk":"@@ -81,10 +83,17 @@ void execute(Terminal terminal, String pluginName, Map<String, String> settings)\n         }\n \n         terminal.println(VERBOSE, \"Removing: \" + pluginDir);\n-        Path tmpPluginDir = env.pluginsFile().resolve(\".removing-\" + pluginName);\n+        final Path tmpPluginDir = env.pluginsFile().resolve(\".removing-\" + pluginName);\n         Files.move(pluginDir, tmpPluginDir, StandardCopyOption.ATOMIC_MOVE);\n         pluginPaths.add(tmpPluginDir);\n \n         IOUtils.rm(pluginPaths.toArray(new Path[pluginPaths.size()]));\n+\n+        // we preserve the config files in case the user is upgrading the plugin, but we print\n+        // a message so the user knows in case they want to remove manually\n+        final Path pluginConfigDir = env.configFile().resolve(pluginName);\n+        if (Files.exists(pluginConfigDir)) {\n+            terminal.println(\"-> Preserving plugin config files: \" + pluginConfigDir);","path":"core/src/main/java/org/elasticsearch/plugins/RemovePluginCommand.java","position":null,"original_position":45,"commit_id":"817bbfb2d118c4ccd28c9737c5763317979f6841","original_commit_id":"75956604eb328c5c158e3c4a80fc684e7fa8f825","user":{"login":"jasontedor","id":4744941,"avatar_url":"https://avatars.githubusercontent.com/u/4744941?v=3","gravatar_id":"","url":"https://api.github.com/users/jasontedor","html_url":"https://github.com/jasontedor","followers_url":"https://api.github.com/users/jasontedor/followers","following_url":"https://api.github.com/users/jasontedor/following{/other_user}","gists_url":"https://api.github.com/users/jasontedor/gists{/gist_id}","starred_url":"https://api.github.com/users/jasontedor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasontedor/subscriptions","organizations_url":"https://api.github.com/users/jasontedor/orgs","repos_url":"https://api.github.com/users/jasontedor/repos","events_url":"https://api.github.com/users/jasontedor/events{/privacy}","received_events_url":"https://api.github.com/users/jasontedor/received_events","type":"User","site_admin":false},"body":"I pushed 817bbfb2d118c4ccd28c9737c5763317979f6841.","created_at":"2016-09-06T12:36:22Z","updated_at":"2016-09-06T12:36:22Z","html_url":"https://github.com/elastic/elasticsearch/pull/20338#discussion_r77625377","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/20338","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/77625377"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/20338#discussion_r77625377"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/20338"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/20338","id":84112439,"html_url":"https://github.com/elastic/elasticsearch/pull/20338","diff_url":"https://github.com/elastic/elasticsearch/pull/20338.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/20338.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20338","number":20338,"state":"open","locked":false,"title":"Print message when removing plugin with config","user":{"login":"jasontedor","id":4744941,"avatar_url":"https://avatars.githubusercontent.com/u/4744941?v=3","gravatar_id":"","url":"https://api.github.com/users/jasontedor","html_url":"https://github.com/jasontedor","followers_url":"https://api.github.com/users/jasontedor/followers","following_url":"https://api.github.com/users/jasontedor/following{/other_user}","gists_url":"https://api.github.com/users/jasontedor/gists{/gist_id}","starred_url":"https://api.github.com/users/jasontedor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasontedor/subscriptions","organizations_url":"https://api.github.com/users/jasontedor/orgs","repos_url":"https://api.github.com/users/jasontedor/repos","events_url":"https://api.github.com/users/jasontedor/events{/privacy}","received_events_url":"https://api.github.com/users/jasontedor/received_events","type":"User","site_admin":false},"body":"When removing a plugin with a config directory, we preserve the config\r\ndirectory. This is because the workflow for upgrading a plugin involves\r\nremoving and then installing the plugin again and losing the plugin\r\nconfig in this case would be terrible. This commit causes a message\r\nregarding this to be printed in case the user wants to manually delete\r\nthese files.\r\n","created_at":"2016-09-06T12:25:03Z","updated_at":"2016-09-06T12:36:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d175b40d2120275e47407725e3254ae72766943d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/20338/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/20338/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20338/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/817bbfb2d118c4ccd28c9737c5763317979f6841","head":{"label":"jasontedor:remove-plugin","ref":"remove-plugin","sha":"817bbfb2d118c4ccd28c9737c5763317979f6841","user":{"login":"jasontedor","id":4744941,"avatar_url":"https://avatars.githubusercontent.com/u/4744941?v=3","gravatar_id":"","url":"https://api.github.com/users/jasontedor","html_url":"https://github.com/jasontedor","followers_url":"https://api.github.com/users/jasontedor/followers","following_url":"https://api.github.com/users/jasontedor/following{/other_user}","gists_url":"https://api.github.com/users/jasontedor/gists{/gist_id}","starred_url":"https://api.github.com/users/jasontedor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasontedor/subscriptions","organizations_url":"https://api.github.com/users/jasontedor/orgs","repos_url":"https://api.github.com/users/jasontedor/repos","events_url":"https://api.github.com/users/jasontedor/events{/privacy}","received_events_url":"https://api.github.com/users/jasontedor/received_events","type":"User","site_admin":false},"repo":{"id":38618383,"name":"elasticsearch","full_name":"jasontedor/elasticsearch","owner":{"login":"jasontedor","id":4744941,"avatar_url":"https://avatars.githubusercontent.com/u/4744941?v=3","gravatar_id":"","url":"https://api.github.com/users/jasontedor","html_url":"https://github.com/jasontedor","followers_url":"https://api.github.com/users/jasontedor/followers","following_url":"https://api.github.com/users/jasontedor/following{/other_user}","gists_url":"https://api.github.com/users/jasontedor/gists{/gist_id}","starred_url":"https://api.github.com/users/jasontedor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasontedor/subscriptions","organizations_url":"https://api.github.com/users/jasontedor/orgs","repos_url":"https://api.github.com/users/jasontedor/repos","events_url":"https://api.github.com/users/jasontedor/events{/privacy}","received_events_url":"https://api.github.com/users/jasontedor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jasontedor/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/jasontedor/elasticsearch","forks_url":"https://api.github.com/repos/jasontedor/elasticsearch/forks","keys_url":"https://api.github.com/repos/jasontedor/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jasontedor/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jasontedor/elasticsearch/teams","hooks_url":"https://api.github.com/repos/jasontedor/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/jasontedor/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/jasontedor/elasticsearch/events","assignees_url":"https://api.github.com/repos/jasontedor/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/jasontedor/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/jasontedor/elasticsearch/tags","blobs_url":"https://api.github.com/repos/jasontedor/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jasontedor/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jasontedor/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/jasontedor/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jasontedor/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/jasontedor/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/jasontedor/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/jasontedor/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/jasontedor/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/jasontedor/elasticsearch/subscription","commits_url":"https://api.github.com/repos/jasontedor/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/jasontedor/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/jasontedor/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/jasontedor/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/jasontedor/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/jasontedor/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jasontedor/elasticsearch/merges","archive_url":"https://api.github.com/repos/jasontedor/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jasontedor/elasticsearch/downloads","issues_url":"https://api.github.com/repos/jasontedor/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/jasontedor/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/jasontedor/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/jasontedor/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jasontedor/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/jasontedor/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/jasontedor/elasticsearch/deployments","created_at":"2015-07-06T12:48:14Z","updated_at":"2015-07-06T12:48:36Z","pushed_at":"2016-09-06T12:36:10Z","git_url":"git://github.com/jasontedor/elasticsearch.git","ssh_url":"git@github.com:jasontedor/elasticsearch.git","clone_url":"https://github.com/jasontedor/elasticsearch.git","svn_url":"https://github.com/jasontedor/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":236151,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"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":"elastic:master","ref":"master","sha":"b6bf20c2dafa54a7c00012bc24e0ad51f78b3815","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"name":"elasticsearch","full_name":"elastic/elasticsearch","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elastic/elasticsearch","forks_url":"https://api.github.com/repos/elastic/elasticsearch/forks","keys_url":"https://api.github.com/repos/elastic/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elastic/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/elasticsearch/events","assignees_url":"https://api.github.com/repos/elastic/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elastic/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elastic/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elastic/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elastic/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elastic/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elastic/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/elasticsearch/merges","archive_url":"https://api.github.com/repos/elastic/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elastic/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elastic/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/elastic/elasticsearch/deployments","created_at":"2010-02-08T13:20:56Z","updated_at":"2016-09-06T11:02:10Z","pushed_at":"2016-09-06T12:36:11Z","git_url":"git://github.com/elastic/elasticsearch.git","ssh_url":"git@github.com:elastic/elasticsearch.git","clone_url":"https://github.com/elastic/elasticsearch.git","svn_url":"https://github.com/elastic/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":345460,"stargazers_count":18285,"watchers_count":18285,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6215,"mirror_url":null,"open_issues_count":1139,"forks":6215,"open_issues":1139,"watchers":18285,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/20338"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/20338"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/20338"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/20338/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/20338/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/20338/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/817bbfb2d118c4ccd28c9737c5763317979f6841"}}}}
{"actor":{"display_login":"jasontedor"}}