Bug 37810

Summary: Some SUSHI providers return ServiceActive instead of Service_Active
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: ERMAssignee: Pedro Amorim <pedro.amorim>
Status: Pushed to main --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, jonathan.druart, jonathan.field, martin.renvoize, matt.blenkinsop, michaela.sieber, pedro.amorim
Version: MainKeywords: rel_23_11_candidate, rel_24_05_candidate
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:
24.11.00
Circulation function:
Attachments: Bug 37810: Consider ServiceActive on status response
Bug 37810: Add test
Bug 37810: Consider ServiceActive on status response
Bug 37810: Add test
Bug 37810: Consider ServiceActive on status response
Bug 37810: Add test
Bug 37810: Consider ServiceActive on status response
Bug 37810: (QA follow-up) Tidy

Description Pedro Amorim 2024-09-02 14:48:21 UTC

    
Comment 1 Pedro Amorim 2024-09-02 14:51:42 UTC
Created attachment 170947 [details] [review]
Bug 37810: Consider ServiceActive on status response

Some SUSHI providers return ServiceActive instead of the documented Service_Active:
https://countermetrics.stoplight.io/docs/counter-sushi-api/f0dd30f814944-server-status

This ensures the test connection does not fail regardless of what is used
Comment 2 Pedro Amorim 2024-09-19 12:38:57 UTC
Created attachment 171717 [details] [review]
Bug 37810: Add test

Test plan:
1) Apply only tests patch, run:
prove t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t
2) Verify tests fail
3) Apply fix patch
4) Run tests again, verify they pass
Comment 3 Pedro Amorim 2024-09-19 12:39:00 UTC
Created attachment 171718 [details] [review]
Bug 37810: Consider ServiceActive on status response

Some SUSHI providers return ServiceActive instead of the documented Service_Active:
https://countermetrics.stoplight.io/docs/counter-sushi-api/f0dd30f814944-server-status

This ensures the test connection does not fail regardless of what is used
Comment 4 Pedro Amorim 2024-09-27 09:57:11 UTC
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 5 David Nind 2024-09-27 21:42:43 UTC Comment hidden (obsolete)
Comment 6 Pedro Amorim 2024-09-29 11:27:55 UTC
Hi David, thank you.
I believe you may need to pull latest main as it appears you're missing the last 2 follow-up patches from bug 37856 that fix those test errors.
The test error seems to be the one fixed by those patches, are you able to confirm please? i.e. make sure main is up to date and test again.
Happy to look again in case I'm mistaken. Thanks!
Comment 7 David Nind 2024-09-29 17:18:11 UTC
Created attachment 172198 [details] [review]
Bug 37810: Add test

Test plan:
1) Apply only tests patch, run:
prove t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t
2) Verify tests fail
3) Apply fix patch
4) Run tests again, verify they pass

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2024-09-29 17:18:13 UTC
Created attachment 172199 [details] [review]
Bug 37810: Consider ServiceActive on status response

Some SUSHI providers return ServiceActive instead of the documented Service_Active:
https://countermetrics.stoplight.io/docs/counter-sushi-api/f0dd30f814944-server-status

This ensures the test connection does not fail regardless of what is used

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 David Nind 2024-09-29 17:19:21 UTC
(In reply to Pedro Amorim from comment #6)
> Hi David, thank you.
> I believe you may need to pull latest main as it appears you're missing the
> last 2 follow-up patches from bug 37856 that fix those test errors.
> The test error seems to be the one fixed by those patches, are you able to
> confirm please? i.e. make sure main is up to date and test again.
> Happy to look again in case I'm mistaken. Thanks!

Things are working now, so this must have been the case. Now signed off.
Comment 10 Nick Clemens (kidclamp) 2024-10-01 14:07:17 UTC
Created attachment 172272 [details] [review]
Bug 37810: Add test

Test plan:
1) Apply only tests patch, run:
prove t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t
2) Verify tests fail
3) Apply fix patch
4) Run tests again, verify they pass

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 11 Nick Clemens (kidclamp) 2024-10-01 14:07:19 UTC
Created attachment 172273 [details] [review]
Bug 37810: Consider ServiceActive on status response

Some SUSHI providers return ServiceActive instead of the documented Service_Active:
https://countermetrics.stoplight.io/docs/counter-sushi-api/f0dd30f814944-server-status

This ensures the test connection does not fail regardless of what is used

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 12 Nick Clemens (kidclamp) 2024-10-01 14:07:21 UTC
Created attachment 172274 [details] [review]
Bug 37810: (QA follow-up) Tidy

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 13 Martin Renvoize (ashimema) 2024-10-02 09:56:25 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant