[Bug 22084] New: Plugin upgrade method and database plugin version storage will never be triggered for existing installs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Bug ID: 22084 Summary: Plugin upgrade method and database plugin version storage will never be triggered for existing installs Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- If an existing plugin begins using the upgrade() method, it will never actually get triggered because the installation has already occurred and no database plugin version was stored at the time. Without that database version, the upgrade method will never be triggered. In addition, if the plugin has no upgrade method, the installed version is never updated in the database! Lastly, when an upgrade succeeds it prints a warning that the upgrade failed. -- 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=22084 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- 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=22084 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 83726 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83726&action=edit Bug 22084: Plugin upgrade method and database plugin version storage will never be triggered for existing installs If an existing plugin begins using the upgrade() method, it will never actually get triggered because the installation has already occurred and no database plugin version was stored at the time. Without that database version, the upgrade method will never be triggered. In addition, if the plugin has no upgrade method, the installed version is never updated in the database! Lastly, when an upgrade succeeds it prints a warning that the upgrade failed. Test Plan: 1) Install an older version of the Kitchen sink plugin: * https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/downlo... 2) Delete the "__INSTALLED_VERSION__" key, and the "last_upgraded" key from plugin_data for this plugin, to simulate having installed from an earlier version of Koha 3) Upgrade to the latest version of the Kitchen sink plugin: * https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/downlo... 4) Note "__INSTALLED_VERSION__" still doesn't exist for the plugin, in the plugin_data table 5) Apply this patch 6) Restart all the things 7) Browse to the Kitchen sink configuration page, this should trigger the upgrade method 8) Note the "__INSTALLED_VERSION__" and "last_upgraded" keys exist in plugin_data for the Kitchen Sink plugin -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |20669 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20669 [Bug 20669] Add upgrade method to plugins -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master CC| |tomascohen@gmail.com Target Milestone|--- |19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #83726|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 83734 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83734&action=edit Bug 22084: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 83735 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83735&action=edit Bug 22084: Plugin upgrade method and database plugin version storage will never be triggered for existing installs If an existing plugin begins using the upgrade() method, it will never actually get triggered because the installation has already occurred and no database plugin version was stored at the time. Without that database version, the upgrade method will never be triggered. In addition, if the plugin has no upgrade method, the installed version is never updated in the database! Lastly, when an upgrade succeeds it prints a warning that the upgrade failed. Test Plan: 1) Install an older version of the Kitchen sink plugin: * https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/downlo... 2) Delete the "__INSTALLED_VERSION__" key, and the "last_upgraded" key from plugin_data for this plugin, to simulate having installed from an earlier version of Koha 3) Upgrade to the latest version of the Kitchen sink plugin: * https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/downlo... 4) Note "__INSTALLED_VERSION__" still doesn't exist for the plugin, in the plugin_data table 5) Apply this patch 6) Restart all the things 7) Browse to the Kitchen sink configuration page, this should trigger the upgrade method 8) Note the "__INSTALLED_VERSION__" and "last_upgraded" keys exist in plugin_data for the Kitchen Sink plugin Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #83734|0 |1 is obsolete| | Attachment #83735|0 |1 is obsolete| | --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 83740 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83740&action=edit Bug 22084: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 83741 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83741&action=edit Bug 22084: Plugin upgrade method and database plugin version storage will never be triggered for existing installs If an existing plugin begins using the upgrade() method, it will never actually get triggered because the installation has already occurred and no database plugin version was stored at the time. Without that database version, the upgrade method will never be triggered. In addition, if the plugin has no upgrade method, the installed version is never updated in the database! Lastly, when an upgrade succeeds it prints a warning that the upgrade failed. Test Plan: 1) Install an older version of the Kitchen sink plugin: * https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/downlo... 2) Delete the "__INSTALLED_VERSION__" key, and the "last_upgraded" key from plugin_data for this plugin, to simulate having installed from an earlier version of Koha 3) Upgrade to the latest version of the Kitchen sink plugin: * https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/downlo... 4) Note "__INSTALLED_VERSION__" still doesn't exist for the plugin, in the plugin_data table 5) Apply this patch 6) Restart all the things 7) Browse to the Kitchen sink configuration page, this should trigger the upgrade method 8) Note the "__INSTALLED_VERSION__" and "last_upgraded" keys exist in plugin_data for the Kitchen Sink plugin Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #83740|0 |1 is obsolete| | --- Comment #6 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 85384 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85384&action=edit Bug 22084: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #83741|0 |1 is obsolete| | --- Comment #7 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 85385 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85385&action=edit Bug 22084: Plugin upgrade method and database plugin version storage will never be triggered for existing installs If an existing plugin begins using the upgrade() method, it will never actually get triggered because the installation has already occurred and no database plugin version was stored at the time. Without that database version, the upgrade method will never be triggered. In addition, if the plugin has no upgrade method, the installed version is never updated in the database! Lastly, when an upgrade succeeds it prints a warning that the upgrade failed. Test Plan: 1) Install an older version of the Kitchen sink plugin: * https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/downlo... 2) Delete the "__INSTALLED_VERSION__" key, and the "last_upgraded" key from plugin_data for this plugin, to simulate having installed from an earlier version of Koha 3) Upgrade to the latest version of the Kitchen sink plugin: * https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/downlo... 4) Note "__INSTALLED_VERSION__" still doesn't exist for the plugin, in the plugin_data table 5) Apply this patch 6) Restart all the things 7) Browse to the Kitchen sink configuration page, this should trigger the upgrade method 8) Note the "__INSTALLED_VERSION__" and "last_upgraded" keys exist in plugin_data for the Kitchen Sink plugin Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |josef.moravec@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.11.x for 18.11.04 rmaint note: the parent bug for this was backported all the way to 17.11.x series so we need it all the way down. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_17_11_candidate, | |rel_18_05_candidate, | |rel_18_11_candidate Status|Pushed to Stable |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Jesse Maseto <jesse@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jesse@bywatersolutions.com --- Comment #10 from Jesse Maseto <jesse@bywatersolutions.com> --- Pushed to 18.05.x for 18.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22084 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org