[Bug 42976] New: InstallPlugins reloads every plugin from disk even when only one is being installed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42976 Bug ID: 42976 Summary: InstallPlugins reloads every plugin from disk even when only one is being installed Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: kyle@bywatersolutions.com, martin.renvoize@openfifth.co.uk, tomascohen@gmail.com Depends on: 42430 Target Milestone: --- Bug 42430 made Koha::Plugins->InstallPlugins() force every discovered plugin class to be deleted and re-required from disk on every call, so plugin_methods reflects the .pm file as it currently exists rather than a stale in-memory copy left over in a long-lived Plack worker. That fix is applied unconditionally to every plugin found on disk, even when only one specific plugin is being installed or upgraded (as identified via the existing 'include' parameter). This is safe but wasteful: on an instance with several installed plugins, uploading or reinstalling a single one now forces a full delete-and-recompile of every other installed plugin's .pm file(s) too, not just the one that actually changed. This bug is to scope the forced reload: when the 'include' parameter names specific plugin class(es), only those should be deleted and reloaded from disk. When no include is given (the existing "reinstall everything" protective sweep for plugins removed from disk without using the UI), keep today's behaviour of reloading every plugin. Test plan: 1. Enable plugins and install two or more plugins. 2. Run: perl misc/devel/install_plugins.pl --include <one plugin's class> 3. Confirm only the named plugin's .pm file is reloaded/recompiled, and other installed plugins are left untouched. 4. Run: perl misc/devel/install_plugins.pl (no --include) 5. Confirm all plugins are still reloaded, matching current behaviour. 6. prove -r t/db_dependent/Koha/Plugins/ t/db_dependent/Koha/REST/Plugin/ still passes. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42430 [Bug 42430] Fix issue with stale plugin methods after plugin upgrade -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42976 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42977 Depends on|42430 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42430 [Bug 42430] Fix issue with stale plugin methods after plugin upgrade https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42977 [Bug 42977] Plugin upload does not tell InstallPlugins which plugin was uploaded -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42976 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Blocks|42977 | Status|NEW |RESOLVED Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42977 [Bug 42977] Plugin upload does not tell InstallPlugins which plugin was uploaded -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42976 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org