Bug 30692

Summary: Wrong progress displayed for ES indexing tasks
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Martin Renvoize <martin.renvoize>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, jonathan.druart, kyle, nick
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00
Bug Depends on: 30360    
Bug Blocks:    
Attachments: Bug 30692: Fix progress for ES indexing tasks
Bug 30692: Fix progress for ES indexing tasks

Description Tomás Cohen Arazi 2022-05-05 14:09:44 UTC
Steps to reproduce:

1. Have ES setup
2. Edit a record changing anything on it (title)
3. Save
4. Go to Administration > Background jobs
=> FAIL: The task is 'Finished' but progress is '0/1'
Comment 1 Tomás Cohen Arazi 2022-05-05 14:24:00 UTC
Created attachment 134642 [details] [review]
Bug 30692: Fix progress for ES indexing tasks

This patch makes the ES indexing task record progress properly.

To test:
1. Have ES setup
2. Edit a record making any change that would trigger indexing
3. Go to Administration > Background jobs
=> FAIL: The task status is 'Finished' but progress shows '0/1'.
4. Apply this patch
5. Restart the default worker:
   $ koha-worker --restart kohadev
6. Repeat 2 and 3
=> SUCCESS: Things work the same, but progress is '1/1'
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Martin Renvoize 2022-05-05 14:49:08 UTC
Created attachment 134646 [details] [review]
Bug 30692: Fix progress for ES indexing tasks

This patch makes the ES indexing task record progress properly.

To test:
1. Have ES setup
2. Edit a record making any change that would trigger indexing
3. Go to Administration > Background jobs
=> FAIL: The task status is 'Finished' but progress shows '0/1'.
4. Apply this patch
5. Restart the default worker:
   $ koha-worker --restart kohadev
6. Repeat 2 and 3
=> SUCCESS: Things work the same, but progress is '1/1'
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2022-05-05 14:49:26 UTC
Trivial and correct.. PQA
Comment 4 Martin Renvoize 2022-05-05 15:12:21 UTC
Pushed for 22.05, thanks to everyone involved :)