[Bug 30727] New: Background tasks can be called multiple times on batch record deletion
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 Bug ID: 30727 Summary: Background tasks can be called multiple times on batch record deletion Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Background tasks can be |Holds queue updates can be |called multiple times on |called multiple times on |batch record deletion |batch record deletion Depends on| |29346 Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Status|NEW |ASSIGNED Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29346 [Bug 29346] Real-time holds queue update -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com, | |martin.renvoize@ptfs-europe | |.com, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 134820 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134820&action=edit Bug 30727: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 134821 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134821&action=edit Bug 30727: Avoid holds queue updates multiple times on BatchDeleteBiblio This patch makes the background job only enqueue holds queue updates once per biblio, when appropriate. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/BackgroundJobs/BatchDeleteBiblio.t => FAIL: It enqueues 3 times for a bib! 3. Apply this patch 4. Repeat 2 => SUCCESS: It only enqueues once! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30728 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30728 [Bug 30728] Allow real-time holds queue opt-out -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- The tests fail for me for step 4: prove -v t/db_dependent/Koha/BackgroundJobs/BatchDeleteBiblio.t t/db_dependent/Koha/BackgroundJobs/BatchDeleteBiblio.t .. 1..1 # Subtest: process() tests 1..1 not ok 1 - Holds queue update is enqueued only once # Failed test 'Holds queue update is enqueued only once' # at t/db_dependent/Koha/BackgroundJobs/BatchDeleteBiblio.t line 81. # got: '4' # expected: '1' # Looks like you failed 1 test of 1. not ok 1 - process() tests # Failed test 'process() tests' # at t/db_dependent/Koha/BackgroundJobs/BatchDeleteBiblio.t line 84. # Looks like you failed 1 test of 1. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests Test Summary Report ------------------- t/db_dependent/Koha/BackgroundJobs/BatchDeleteBiblio.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=1, Tests=1, 3 wallclock secs ( 0.02 usr 0.01 sys + 2.25 cusr 0.18 csys = 2.46 CPU) Result: FAIL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|29346 |30710 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29346 [Bug 29346] Real-time holds queue update https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30710 [Bug 30710] Background tasks can be called multiple times on batch item deletion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Sorry, I missed the fact the skip_holds_queue parameter was added on bug 30710. Tweaked the dependencies. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 --- Comment #5 from David Nind <david@davidnind.com> --- (In reply to Tomás Cohen Arazi from comment #4)
Sorry, I missed the fact the skip_holds_queue parameter was added on bug 30710. Tweaked the dependencies.
Thanks Tomás! Tests now pass, so sign-off on the way. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134820|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 134840 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134840&action=edit Bug 30727: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134821|0 |1 is obsolete| | --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 134841 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134841&action=edit Bug 30727: Avoid holds queue updates multiple times on BatchDeleteBiblio This patch makes the background job only enqueue holds queue updates once per biblio, when appropriate. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/BackgroundJobs/BatchDeleteBiblio.t => FAIL: It enqueues 3 times for a bib! 3. Apply this patch 4. Repeat 2 => SUCCESS: It only enqueues once! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134840|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 134855 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134855&action=edit Bug 30727: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134841|0 |1 is obsolete| | --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 134856 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134856&action=edit Bug 30727: Avoid holds queue updates multiple times on BatchDeleteBiblio This patch makes the background job only enqueue holds queue updates once per biblio, when appropriate. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/BackgroundJobs/BatchDeleteBiblio.t => FAIL: It enqueues 3 times for a bib! 3. Apply this patch 4. Repeat 2 => SUCCESS: It only enqueues once! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Tests pass, QA Script is happy and the code works as described. A solid fix, thanks Tomas. PQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_22_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30727 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_22_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org