Skip to content
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

Proposal: enhance plugin installation and management. #508

Open
justanr opened this issue Sep 5, 2018 · 4 comments
Open

Proposal: enhance plugin installation and management. #508

justanr opened this issue Sep 5, 2018 · 4 comments

Comments

@justanr
Copy link
Collaborator

justanr commented Sep 5, 2018

While working on the ranks plugin (getting close), I noticed a few things that made plugin upgrades difficult and other things that would be nice to have.

  1. Add upgrade plugin to both cli and management ui. The primary effect here would be finding any settings that exist for the plugin that are not currently stored and removing ones that are stored by no longer declared by the plugin.

  2. add on_plugin_install, on_plugin_uninstall, and on_plugin_upgrade hooks (not attached to the names) and potentially on_plugin_settings_changed so plugins can preform any administrative tasks related to these actions.

An example of using the install/uninstall/upgrade actions would be a plugin that creates a user to interact with users on the forum (e. g. automod, or similar), or if we follow through with the permission revision adding new permissions. Install hook would handle creating these and uninstall would clean them up, upgrade could handle differences between versions.

@micha030201
Copy link
Contributor

Add upgrade plugin to both cli and management ui. The primary effect here would be finding any settings that exist for the plugin that are not currently stored and removing ones that are stored by no longer declared by the plugin.

Does upgrading a plugin not require flaskbb to be restarted? What would be the point of having a button in the interface to upgrade the plugin if the user still has to restart their the app from the console?

@justanr
Copy link
Collaborator Author

justanr commented Sep 7, 2018

Installing is the same way. It's a two step process: pip install plugin and then either running the cli plugin install or the install from the gui. But that step is what creates the entries in the plugin settings table.

The upgrade I'm talking about is the second step. The process does need to be restarted but it'd need to be restarted for installing a new plugin from scratch as well. There are ways to do this without down time but that's outside the scope here.

Right now the only way to get new settings from a plugin is to uninstall and reinstall via the gui or cli. However this erases the current configuration.

@micha030201
Copy link
Contributor

Right now the only way to get new settings from a plugin is to uninstall and reinstall via the gui or cli. However this erases the current configuration.

Ah, I see. Sorry, I misunderstood what the issue was about.

@justanr
Copy link
Collaborator Author

justanr commented Sep 7, 2018

It's overloaded terminology, I could see why it'd be confusing. No problem.

@sh4nks sh4nks added this to To do in 2.1 Polish Services via automation Feb 19, 2019
@sh4nks sh4nks added this to the 2.1 milestone Feb 19, 2019
@sh4nks sh4nks removed this from To do in 2.1 Polish Services Sep 9, 2021
@sh4nks sh4nks modified the milestones: 2.1, 2.2 Sep 10, 2021
@sh4nks sh4nks added this to To do in 2.2 Polishing reloaded Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants