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: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected],
[email protected], [email protected]
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.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/