Summary: | updatedatabase.pl does not propagate the error code | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Installation and upgrade (command-line installer) | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | RESOLVED FIXED | QA Contact: | Kyle M Hall <kyle> |
Severity: | normal | ||
Priority: | P5 - low | CC: | dcook, fridolin.somers, kyle |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.11.00,23.05.04,22.11.10
|
|
Bug Depends on: | |||
Bug Blocks: | 34683 | ||
Attachments: |
Bug 34685: Make updatedatabase.pl propagate the error
Bug 34685: Make updatedatabase.pl propagate the error Bug 34685: Make updatedatabase.pl propagate the error Bug 34685: Make updatedatabase.pl propagate the error |
Description
Jonathan Druart
2023-09-01 07:46:04 UTC
Created attachment 155057 [details] [review] Bug 34685: Make updatedatabase.pl propagate the error updatedatabase.pl already return 0 even if an error occurred during the upgrade. Test plan: Adjust a db rev to make it fail and modify the value of the syspref 'version' in DB to make the db rev run. Run updatedabase.pl and `echo $?` Created attachment 155060 [details] [review] Bug 34685: Make updatedatabase.pl propagate the error updatedatabase.pl already return 0 even if an error occurred during the upgrade. Test plan: Adjust a db rev to make it fail and modify the value of the syspref 'version' in DB to make the db rev run. Run updatedabase.pl and `echo $?` My test plan: 0. vi Koha.pm Change $VERSION from "23.06.00.016" to "23.06.00.017" 1. vi installer/data/mysql/db_revs/230600017.pl Added a "die" into the first part of the "up" sub 2a. koha-mysql kohadev 2b. update systempreferences set value = '23.0600016' where variable = 'Version'; 3. echo 'flush_all' | nc -q 1 memcached 11211 4. perl ./installer/data/mysql/updatedatabase.pl Created attachment 155247 [details] [review] Bug 34685: Make updatedatabase.pl propagate the error updatedatabase.pl already return 0 even if an error occurred during the upgrade. Test plan: Adjust a db rev to make it fail and modify the value of the syspref 'version' in DB to make the db rev run. Run updatedabase.pl and `echo $?` Signed-off-by: David Cook <dcook@prosentient.com.au> Created attachment 155274 [details] [review] Bug 34685: Make updatedatabase.pl propagate the error updatedatabase.pl already return 0 even if an error occurred during the upgrade. Test plan: Adjust a db rev to make it fail and modify the value of the syspref 'version' in DB to make the db rev run. Run updatedabase.pl and `echo $?` Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master for 23.11. Nice work everyone, thanks! Pushed to 23.05.x for 23.05.04 Nice work everyone! Pushed to oldstable for 22.11.x |