Bug 38394 - Remove try/catch and say_failures for 24.11
Summary: Remove try/catch and say_failures for 24.11
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (command-line installer) (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 37895 38448
  Show dependency treegraph
 
Reported: 2024-11-07 14:20 UTC by Jonathan Druart
Modified: 2024-11-14 15:19 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 38394: Remove existing try/catch and say_failure from DB revs (38.59 KB, patch)
2024-11-07 14:31 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38394: Remove 3 'done' (1.79 KB, patch)
2024-11-07 14:31 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2024-11-07 14:20:06 UTC
On bug 37895 we have failed to propose a solution to encapsulate exceptions and rethrow them.

Until this is ready we should not try/catch and so use say_failure from our DB revs.
Comment 1 Jonathan Druart 2024-11-07 14:31:14 UTC
Created attachment 174239 [details] [review]
Bug 38394: Remove existing try/catch and say_failure from DB revs

On bug 37895 we have failed to propose a solution to encapsulate exceptions and rethrow them.

Until this is ready we should not try/catch and so use say_failure from our DB revs.

We want to stop the DB update process when something is wrong. In those
try/catch we are actually continuing even if something bad happens.

As RaiseError is set on the dbh, say_failure statements will never be
reached.

Test plan:
checkout origin/24.05.0
reset_all
checkout main + this patch
updatedatabase

Everything should run fine.
Comment 2 Jonathan Druart 2024-11-07 14:31:17 UTC
Created attachment 174240 [details] [review]
Bug 38394: Remove 3 'done'

We don't want that, and it's not consistent with the other outputs.
If we don't have anything useful to say, don't say anything.
Comment 3 Katrin Fischer 2024-11-07 14:45:44 UTC
I've removed say_failure from https://wiki.koha-community.org/wiki/Database_updates as well.
Comment 4 Katrin Fischer 2024-11-07 14:55:06 UTC
Reviewed carefully, going to push these.
Comment 5 Jonathan Druart 2024-11-07 14:55:20 UTC
btw, found some inconsistencies in the DB output


* "Added OAI-PMH:HarvestEmailReport system preference" should be "Added new system preference 'OAI-PMH:HarvestEmailReport'"

* Added new system preference 'JobsNotificationMethod' is white instead of green

* Added column 'service_platformerm_usage_data_providers' is blue (why not green?)

* "list_borrowers added to 1 users with manage_bookings" should be better worded, like "Added permissions 'permission' to ..."

* "Added BOOKING_CANCELLATION authorised value category" should be "Added new authorised value category 'CAT'"

* "Updated manage_search_targets permission description" => this is only noise
Comment 6 Katrin Fischer 2024-11-07 15:00:19 UTC
(In reply to Jonathan Druart from comment #5)
> btw, found some inconsistencies in the DB output
> 
> 
> * "Added OAI-PMH:HarvestEmailReport system preference" should be "Added new
> system preference 'OAI-PMH:HarvestEmailReport'"
> 
> * Added new system preference 'JobsNotificationMethod' is white instead of
> green
> 
> * Added column 'service_platformerm_usage_data_providers' is blue (why not
> green?)
> 
> * "list_borrowers added to 1 users with manage_bookings" should be better
> worded, like "Added permissions 'permission' to ..."
> 
> * "Added BOOKING_CANCELLATION authorised value category" should be "Added
> new authorised value category 'CAT'"
> 
> * "Updated manage_search_targets permission description" => this is only
> noise

I agree that these slipped through and I also corrected many before pushing already. Follow-up's woudl be very welcome.
Comment 7 Katrin Fischer 2024-11-07 15:32:52 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 8 Katrin Fischer 2024-11-14 15:19:53 UTC
Moved to Bug 38448 - Fix inconsistencies in database update messages