[Bug 24213] New: Koha::Object->get_from_storage should return undef if the object has been deleted
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 Bug ID: 24213 Summary: Koha::Object->get_from_storage should return undef if the object has been deleted Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org It currently explodes with something like: DBIC result _type isn't of the _type Subscription at t/db_dependent/Biblio.t line 627. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=24213 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96179 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96179&action=edit Bug 24213: Add tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96180 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96180&action=edit Bug 24213: Fix Koha::Object->get_from_storage if the object has been deleted Without this patch it fails with something like: DBIC result _type isn't of the _type Subscription at t/db_dependent/Biblio.t line 627. Test plan: - Apply the first patch (Add tests) - Confirm that they fail - Apply this patch - Confirm that the tests pass -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21901 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21901 [Bug 21901] Improve performance for serial registration -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96179|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98175 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98175&action=edit Bug 24213: Add tests 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=24213 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96180|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98176 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98176&action=edit Bug 24213: Fix Koha::Object->get_from_storage if the object has been deleted Without this patch it fails with something like: DBIC result _type isn't of the _type Subscription at t/db_dependent/Biblio.t line 627. Test plan: - Apply the first patch (Add tests) - Confirm that they fail - Apply this patch - Confirm that the tests pass 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=24213 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Needs Signoff |Signed Off --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Works as expected and makes sense.. Signing off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |BLOCKED --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QAing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- # Subtest: Bad value tests 1..3 # No tests run! not ok 16 - No tests run for subtest "Bad value tests" # Failed test 'No tests run for subtest "Bad value tests"' # at t/db_dependent/Koha/Object.t line 685. # Looks like you failed 1 test of 16. not ok 16 - store() tests # Failed test 'store() tests' # at t/db_dependent/Koha/Object.t line 688. Stumbling across this fail, but also without your patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #7)
# Subtest: Bad value tests 1..3 # No tests run! not ok 16 - No tests run for subtest "Bad value tests" # Failed test 'No tests run for subtest "Bad value tests"' # at t/db_dependent/Koha/Object.t line 685. # Looks like you failed 1 test of 16. not ok 16 - store() tests # Failed test 'store() tests' # at t/db_dependent/Koha/Object.t line 688.
Stumbling across this fail, but also without your patch.
Can be ignored. Resolved with strict_sql_mode. Maybe an idea to put this key in the default koha-conf.xml (commented or zero)? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Passed QA Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98175|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 98203 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98203&action=edit Bug 24213: Add tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98176|0 |1 is obsolete| | --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 98204 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98204&action=edit Bug 24213: Fix Koha::Object->get_from_storage if the object has been deleted Without this patch it fails with something like: DBIC result _type isn't of the _type Subscription at t/db_dependent/Biblio.t line 627. Test plan: - Apply the first patch (Add tests) - Confirm that they fail - Apply this patch - Confirm that the tests pass Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #8)
(In reply to Marcel de Rooy from comment #7)
# Subtest: Bad value tests 1..3 # No tests run! not ok 16 - No tests run for subtest "Bad value tests" # Failed test 'No tests run for subtest "Bad value tests"' # at t/db_dependent/Koha/Object.t line 685. # Looks like you failed 1 test of 16. not ok 16 - store() tests # Failed test 'store() tests' # at t/db_dependent/Koha/Object.t line 688.
Stumbling across this fail, but also without your patch.
Can be ignored. Resolved with strict_sql_mode. Maybe an idea to put this key in the default koha-conf.xml (commented or zero)?
I do not understand what you meant. The test passes for me, with strict_sql_mode set. When run with prove, the strict mode is enabled automatically. Also the flag is set for devs (so from koha-testing-docker), that's is expected, we want devs to catch such problems. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |joy@bywatersolutions.com Version(s)|20.05.00 |20.05.00, 19.11.03 released in| | --- Comment #13 from Joy Nelson <joy@bywatersolutions.com> --- Pushed to 19.11.x branch for 19.11.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.05.00, 19.11.03 |20.05.00, 19.11.03, released in| |19.05.08 CC| |lucas@bywatersolutions.com --- Comment #14 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 19.05.x for 19.05.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24213 Hayley Mapley <hayleymapley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Pushed to oldoldstable Version(s)|20.05.00, 19.11.03, |20.05.00, 19.11.03, released in|19.05.08 |19.05.08, 18.11.14 CC| |hayleymapley@catalyst.net.n | |z --- Comment #15 from Hayley Mapley <hayleymapley@catalyst.net.nz> --- Backported to 18.11.x for 18.11.14. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org