-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add purge option to remove plugin CLI #24981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
By default, the remove plugin CLI command preserves configuration files. This is so that if a user is upgrading the plugin (which is done by first removing the old version and then installing the new version) they do not lose their configuration file. Yet, there are circumstances where preserving the configuration file is not desired. This commit adds a purge option to the remove plugin CLI command.
| env = new Environment(settings); | ||
| } | ||
|
|
||
| static MockTerminal removePlugin(String name, Path home) throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to add the argument and pass false all the places that call this unless there are far more callers that I can see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, I bet a few places should have randomBoolean() instead of false.
|
@nik9000 I addressed your suggestion. I pushed a bigger change though which is to allow purge to be used after a plugin is removed to cleanup lingering config files. This necessitated removing the marker file that we drop in the specific plugin directory into the root plugin directory. Since this is a bigger change, can you take another look? |
nik9000
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me. I think this breaks backwards compatibility with previous failure markers but that that is probably ok. I hope folks don't leave half removed plugins laying around for too long.
By default, the remove plugin CLI command preserves configuration files. This is so that if a user is upgrading the plugin (which is done by first removing the old version and then installing the new version) they do not lose their configuration file. Yet, there are circumstances where preserving the configuration file is not desired. This commit adds a purge option to the remove plugin CLI command. Relates #24981
|
Thanks @nik9000. |
Indeed. |
By default, the remove plugin CLI command preserves configuration files. This is so that if a user is upgrading the plugin (which is done by first removing the old version and then installing the new version) they do not lose their configuration file. Yet, there are circumstances where preserving the configuration file is not desired. This commit adds a purge option to the remove plugin CLI command.