Bug 39765

Summary: Old-fashioned ILL backends (not plugins) are not working
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: ILLAssignee: Pedro Amorim <pedro.amorim>
Status: Pushed to main --- QA Contact: Tomás Cohen Arazi (tcohen) <tomascohen>
Severity: major    
Priority: P5 - low CC: martin.renvoize, pedro.amorim, tomascohen
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Bug Depends on: 38340    
Bug Blocks:    
Attachments: Bug 39765: Revert plugin check logic
[ALTERNATE] Bug 39765: Centralize loaded plugin caching
Bug 39765: Revert plugin check logic
Bug 39765: Revert plugin check logic
Bug 39765: Centralize loaded plugin caching

Description Pedro Amorim 2025-04-28 15:03:21 UTC
This patch:
https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=38340&attachment=181542

Is adding the method get_plugin but that method is never implemented.

prove t/db_dependent/Koha/ILL/Requests.t
t/db_dependent/Koha/ILL/Requests.t .. 6/17     # Looks like you planned 13 tests but ran 12.
t/db_dependent/Koha/ILL/Requests.t .. 7/17 
#   Failed test 'Backend testing (mocks)'
#   at t/db_dependent/Koha/ILL/Requests.t line 808.
The method Koha::ILL::Request->get_plugin is not covered by tests!
Comment 1 Katrin Fischer 2025-04-28 15:04:43 UTC
Thanks Pedro for testing and catching this.
Comment 2 Pedro Amorim 2025-04-28 15:05:33 UTC
Created attachment 181623 [details] [review]
Bug 39765: Revert plugin check logic

Apply patch. Run tests.
prove t/db_dependent/Koha/ILL/Requests.t
Comment 3 Pedro Amorim 2025-04-28 15:06:26 UTC
Need Tomas' input here.
Comment 4 Tomás Cohen Arazi (tcohen) 2025-04-28 16:12:21 UTC
Hmm, this is some rebase error. It should be calling get_backend_plugin instead.
Comment 5 Tomás Cohen Arazi (tcohen) 2025-04-28 17:41:50 UTC
Created attachment 181633 [details] [review]
[ALTERNATE] Bug 39765: Centralize loaded plugin caching

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Tomás Cohen Arazi (tcohen) 2025-04-28 17:43:09 UTC
Pedro, your patch is correct. I propose something that takes us a step further. If you consider it needs more time/thinking, we can ditch my alternate patch and work on it somewhere else.

Best regards
Comment 7 Tomás Cohen Arazi (tcohen) 2025-04-28 17:45:22 UTC Comment hidden (obsolete)
Comment 8 Tomás Cohen Arazi (tcohen) 2025-04-28 17:46:47 UTC
Created attachment 181635 [details] [review]
Bug 39765: Revert plugin check logic

Apply patch. Run tests.
prove t/db_dependent/Koha/ILL/Requests.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 9 Pedro Amorim 2025-04-29 08:40:51 UTC
Created attachment 181638 [details] [review]
Bug 39765: Centralize loaded plugin caching

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Comment 10 Pedro Amorim 2025-04-29 08:42:07 UTC
(In reply to Tomás Cohen Arazi (tcohen) from comment #6)
> Pedro, your patch is correct. I propose something that takes us a step
> further. If you consider it needs more time/thinking, we can ditch my
> alternate patch and work on it somewhere else.
> 
> Best regards

No, that makes sense. My patch was more a proof of regression / starting point of discussion. Yours is better.
Comment 11 Katrin Fischer 2025-04-29 13:36:12 UTC
Thanks Tomas and Pedro!
Comment 12 Katrin Fischer 2025-04-29 15:26:19 UTC
Pushed for 25.05!

Well done everyone, thank you!