Bug 38988 - If JobsNotificationMethod is not STOMP the about page shows as if there was a problem
Summary: If JobsNotificationMethod is not STOMP the about page shows as if there was a...
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: About (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Nick Clemens (kidclamp)
URL:
Keywords:
Depends on: 36655 37260
Blocks:
  Show dependency treegraph
 
Reported: 2025-01-28 17:34 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2025-02-13 14:32 UTC (History)
2 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the messages displayed in About Koha "Server information" and "System information" tabs, depending on whether the RabbitMQ service is running and the options for the JobsNotificationMethod system preference. Previously, an error message was shown in the system information tab when the "Polling" option was selected and RabbitMQ was not running, when it shouldn't have. Expected behavour: - RabbitMQ running: . STOMP option: message broker shows as "Using RabbitMQ", no warnings in the system information tab . Polling option: message broker shows as "Using SQL polling", no warnings in the system information tab - RabbitMQ not running: . STOMP option: message broker shows as "Using SQL polling (Fallback, Error connecting to RabbitMQ)", error message shown in the system information tab . Polling option: message broker shows as "Using SQL polling", no warnings in the system information tab
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 38988: Make the polling use case be normal in about page (4.20 KB, patch)
2025-01-28 18:06 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 38988: Make the polling use case be normal in about page (4.25 KB, patch)
2025-01-29 10:29 UTC, David Nind
Details | Diff | Splinter Review
Bug 38988: Make the polling use case be normal in about page (4.30 KB, patch)
2025-02-07 16:07 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 Tomás Cohen Arazi (tcohen) 2025-01-28 17:34:15 UTC
I'm not sure how bug 35655 ended up doing this, but it is not ok:

* If polling is selected, the `text-bg-warning` is picked, and in the STOMP case it is `text-bg-info`. Both are ok so should be displayed the same.
* In the `System information` section, you end up with the message about not being able to connect to the message broker. Which is a feature if you chose `polling` so no error at all.
Comment 1 Tomás Cohen Arazi (tcohen) 2025-01-28 18:06:02 UTC
Created attachment 177286 [details] [review]
Bug 38988: Make the polling use case be normal in about page

This patch makes choosing `polling` for the `JobsNotificationMethod`
system preference not be considered problematic or different than
`STOMP`.

To test:
1. In `KTD` make sure you have `STOMP` selected
2. Make sure rabbitmq is running:
   $ ktd --shell
  k$ sudo -s
   $ service rabbitmq-server start
3. Go to the about page, 'Server information'
=> SUCCESS: 'Using RabbitMQ' displayed
4. Stop rabbit
   $ service rabbitmq-server stop
5. Repeat 3
=> SUCCESS: Using Rabbit but fallback to polling
6. Go to the 'System information' tab
=> SUCCESS: Error message about the broker not functional
7. Choose 'polling'
8. Repeat 3
=> FAIL: It says 'Using SQL polling' but in bold face <.<
9. Repeat 6
=> FAIL: There's an error about the broker, which we explicitly asked
not to use <.<
10. Apply this patch
11. Repeat 3
=> SUCCESS: Nothing weird, 'Using SQL polling' displayed.
12. Repeat 6
=> SUCCESS: No weird error about the broker.
13. Switch to 'STOMP'
=> SUCCESS: Behavior is the same with/without rabbit running
14. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 David Nind 2025-01-29 10:29:48 UTC
Created attachment 177307 [details] [review]
Bug 38988: Make the polling use case be normal in about page

This patch makes choosing `polling` for the `JobsNotificationMethod`
system preference not be considered problematic or different than
`STOMP`.

To test:
1. In `KTD` make sure you have `STOMP` selected
2. Make sure rabbitmq is running:
   $ ktd --shell
  k$ sudo -s
   $ service rabbitmq-server start
3. Go to the about page, 'Server information'
=> SUCCESS: 'Using RabbitMQ' displayed
4. Stop rabbit
   $ service rabbitmq-server stop
5. Repeat 3
=> SUCCESS: Using Rabbit but fallback to polling
6. Go to the 'System information' tab
=> SUCCESS: Error message about the broker not functional
7. Choose 'polling'
8. Repeat 3
=> FAIL: It says 'Using SQL polling' but in bold face <.<
9. Repeat 6
=> FAIL: There's an error about the broker, which we explicitly asked
not to use <.<
10. Apply this patch
11. Repeat 3
=> SUCCESS: Nothing weird, 'Using SQL polling' displayed.
12. Repeat 6
=> SUCCESS: No weird error about the broker.
13. Switch to 'STOMP'
=> SUCCESS: Behavior is the same with/without rabbit running
14. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Nick Clemens (kidclamp) 2025-02-07 16:07:47 UTC
Created attachment 177638 [details] [review]
Bug 38988: Make the polling use case be normal in about page

This patch makes choosing `polling` for the `JobsNotificationMethod`
system preference not be considered problematic or different than
`STOMP`.

To test:
1. In `KTD` make sure you have `STOMP` selected
2. Make sure rabbitmq is running:
   $ ktd --shell
  k$ sudo -s
   $ service rabbitmq-server start
3. Go to the about page, 'Server information'
=> SUCCESS: 'Using RabbitMQ' displayed
4. Stop rabbit
   $ service rabbitmq-server stop
5. Repeat 3
=> SUCCESS: Using Rabbit but fallback to polling
6. Go to the 'System information' tab
=> SUCCESS: Error message about the broker not functional
7. Choose 'polling'
8. Repeat 3
=> FAIL: It says 'Using SQL polling' but in bold face <.<
9. Repeat 6
=> FAIL: There's an error about the broker, which we explicitly asked
not to use <.<
10. Apply this patch
11. Repeat 3
=> SUCCESS: Nothing weird, 'Using SQL polling' displayed.
12. Repeat 6
=> SUCCESS: No weird error about the broker.
13. Switch to 'STOMP'
=> SUCCESS: Behavior is the same with/without rabbit running
14. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Katrin Fischer 2025-02-13 14:32:36 UTC
Pushed for 25.05!

Well done everyone, thank you!