[Bug 36730] New: (Bug 35428 follow-up) po files (sometimes) fail to update
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36730 Bug ID: 36730 Summary: (Bug 35428 follow-up) po files (sometimes) fail to update Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: translate.koha-community.org Assignee: januszop@gmail.com Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org CC: jonathan.druart@gmail.com Depends on: 35428 Under some circumstances (e.g. non-standard disk latency) po files fail to be generated. The output from the gulp po:update --lang xx-XX task is than like this: [10:01:39] 'po_update_staff' errored after 6.41 s [10:01:39] Error: ENOENT: no such file or directory, open '/tmp/koha-5WCc9s/Koha-staff-prog.pot' This is due to the time dependencies inside the function flush (callback) (in the function xgettext) in gulpfile.js. It happens that the /tmp/koha-NNNNNN folder gets deleted before the asynchronous callback function called by fs.readFile is completed. The callback should copy the content of the .pot file from /tmp/koha- to its final destination, while, in parallel in fact, the folder inside /tmp is being removed. This creates a race condition. A patch proposal will follow. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35428 [Bug 35428] gulp po tasks do not clean temporary files -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36730 --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 165836 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165836&action=edit Bug 36730: (Bug 35428 follow-up) po files (sometimes) fail to update Under some circumstances (e.g. non-standard disk latency) po files fail to be generated. The output from the gulp po:update --lang xx-XX task is than like this: [10:01:39] 'po_update_staff' errored after 6.41 s [10:01:39] Error: ENOENT: no such file or directory, open '/tmp/koha-5WCc9s/Koha-staff-prog.pot' This is due to the time dependencies inside the function flush (callback) (in the function xgettext) in gulpfile.js. It happens that the /tmp/koha-NNNNNN folder gets deleted before the asynchronous callback function called by fs.readFile is completed. The callback should copy the content of the .pot file from /tmp/koha- to its final destination, while, in parallel in fact, the folder inside /tmp is being removed. This creates a race condition. Test plan: ========== Hard to reproduce. But the race condition found in the code should be obvious. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36730 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36730 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Awesome, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36730 Jonathan Druart <jonathan.druart@gmail.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=36730 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #165836|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 166242 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166242&action=edit Bug 36730: (Bug 35428 follow-up) po files (sometimes) fail to update Under some circumstances (e.g. non-standard disk latency) po files fail to be generated. The output from the gulp po:update --lang xx-XX task is than like this: [10:01:39] 'po_update_staff' errored after 6.41 s [10:01:39] Error: ENOENT: no such file or directory, open '/tmp/koha-5WCc9s/Koha-staff-prog.pot' This is due to the time dependencies inside the function flush (callback) (in the function xgettext) in gulpfile.js. It happens that the /tmp/koha-NNNNNN folder gets deleted before the asynchronous callback function called by fs.readFile is completed. The callback should copy the content of the .pot file from /tmp/koha- to its final destination, while, in parallel in fact, the folder inside /tmp is being removed. This creates a race condition. Test plan: ========== Hard to reproduce. But the race condition found in the code should be obvious. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36730 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_23_05_candidate, | |rel_23_11_candidate, | |rel_24_05_candidate Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36730 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36730 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36730 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_24_05_candidate | CC| |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=36730 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00 |24.05.00,23.11.06 released in| | Status|Pushed to main |Pushed to stable CC| |fridolin.somers@biblibre.co | |m --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36730 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Version(s)|24.05.00,23.11.06 |24.05.00,23.11.06,23.05.12 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 23.05.x for upcoming 23.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36730 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|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=36730 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #7 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 unless requested -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36730 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |david@davidnind.com Status|Needs documenting |RESOLVED --- Comment #8 from David Nind <david@davidnind.com> --- No changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org