Bug 37526 - Handle redirects in SUSHI requests
Summary: Handle redirects in SUSHI requests
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Matt Blenkinsop
QA Contact: Nick Clemens (kidclamp)
URL:
Keywords: rel_23_11_candidate, rel_24_05_candidate
Depends on: 37856
Blocks:
  Show dependency treegraph
 
Reported: 2024-07-30 12:53 UTC by Matt Blenkinsop
Modified: 2024-09-27 17:41 UTC (History)
9 users (show)

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


Attachments
Bug 37526: Handle redirects in SUSHI requests (2.20 KB, patch)
2024-07-30 12:55 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 37526: Handle redirects in SUSHI requests (2.39 KB, patch)
2024-08-15 13:38 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 37526: Add tests (3.22 KB, patch)
2024-09-19 14:31 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 37526: Handle redirects in SUSHI requests (2.54 KB, patch)
2024-09-19 14:31 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 37526: Add tests (3.26 KB, patch)
2024-09-23 19:42 UTC, David Nind
Details | Diff | Splinter Review
Bug 37526: Handle redirects in SUSHI requests (2.59 KB, patch)
2024-09-23 19:42 UTC, David Nind
Details | Diff | Splinter Review
Bug 37526: Add tests (3.08 KB, patch)
2024-09-26 19:55 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 37526: Handle redirects in SUSHI requests (2.59 KB, patch)
2024-09-26 19:55 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 37526: (QA follow-up) Tidy (4.42 KB, patch)
2024-09-26 19:55 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Blenkinsop 2024-07-30 12:53:40 UTC
If a SUSHI service changes URL we need to be able to handle the redirect to the new URL
Comment 1 Matt Blenkinsop 2024-07-30 12:55:44 UTC
Created attachment 169858 [details] [review]
Bug 37526: Handle redirects in SUSHI requests
Comment 2 Matt Blenkinsop 2024-08-15 13:38:13 UTC
Created attachment 170381 [details] [review]
Bug 37526: Handle redirects in SUSHI requests
Comment 3 David Nind 2024-08-17 19:51:34 UTC
Not sure how to test this one...
Comment 4 Pedro Amorim 2024-09-19 14:31:30 UTC
Created attachment 171777 [details] [review]
Bug 37526: Add tests
Comment 5 Pedro Amorim 2024-09-19 14:31:34 UTC
Created attachment 171778 [details] [review]
Bug 37526: Handle redirects in SUSHI requests

Test plan:
1) Apply test patch only. Run:
prove t/db_dependent/Koha/BackgroundJob/ErmSushiHarvester.t
2) Verify tests fail.
3) Apply this patch. Run tests again. Verify they pass.

PA amended: Added test plan
Comment 6 Pedro Amorim 2024-09-19 14:35:17 UTC
I've added bug 37856 as dependency as that builds on top of bug 37963.
The tests patch I added here sits on top of it all so to prevent conflicts I've set the dependency as is.

(In reply to David Nind from comment #3)
> Not sure how to test this one...

Test plan is now provided on the patch. Bug 37963 lays the groundwork to Mock SUSHI responses, so we can write tests that emulate what we and our customers are experiencing, without requiring the people testing it to have SUSHI credentials.
Comment 7 David Nind 2024-09-23 19:42:39 UTC
Created attachment 171891 [details] [review]
Bug 37526: Add tests

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2024-09-23 19:42:41 UTC
Created attachment 171892 [details] [review]
Bug 37526: Handle redirects in SUSHI requests

Test plan:
1) Apply test patch only. Run:
prove t/db_dependent/Koha/BackgroundJob/ErmSushiHarvester.t
2) Verify tests fail.
3) Apply this patch. Run tests again. Verify they pass.

PA amended: Added test plan

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 David Nind 2024-09-23 19:43:03 UTC
(In reply to Pedro Amorim from comment #6)
> I've added bug 37856 as dependency as that builds on top of bug 37963.
> The tests patch I added here sits on top of it all so to prevent conflicts
> I've set the dependency as is.
> 
> (In reply to David Nind from comment #3)
> > Not sure how to test this one...
> 
> Test plan is now provided on the patch. Bug 37963 lays the groundwork to
> Mock SUSHI responses, so we can write tests that emulate what we and our
> customers are experiencing, without requiring the people testing it to have
> SUSHI credentials.

Thanks Pedro!
Comment 10 Nick Clemens (kidclamp) 2024-09-26 19:55:37 UTC
Created attachment 172055 [details] [review]
Bug 37526: Add tests

Signed-off-by: David Nind <david@davidnind.com>
Comment 11 Nick Clemens (kidclamp) 2024-09-26 19:55:40 UTC
Created attachment 172056 [details] [review]
Bug 37526: Handle redirects in SUSHI requests

Test plan:
1) Apply test patch only. Run:
prove t/db_dependent/Koha/BackgroundJob/ErmSushiHarvester.t
2) Verify tests fail.
3) Apply this patch. Run tests again. Verify they pass.

PA amended: Added test plan

Signed-off-by: David Nind <david@davidnind.com>
Comment 12 Nick Clemens (kidclamp) 2024-09-26 19:55:42 UTC
Created attachment 172057 [details] [review]
Bug 37526: (QA follow-up) Tidy
Comment 13 Pedro Amorim 2024-09-27 09:58:45 UTC
Thanks for QA, Nick.
Adding 24.05 and 23.11 release candidate keywords as this improves how the SUSHI response is handled widening the pool of providers Koha is able to work with.
Comment 14 Katrin Fischer 2024-09-27 17:41:23 UTC
Pushed for 24.11!

Well done everyone, thank you!