Your message dated Thu, 10 Jul 2025 11:47:02 +0000
with message-id <e1uzpjy-00ee88...@respighi.debian.org>
and subject line unblock ledgerhelpers
has caused the Debian Bug report #1109029,
regarding unblock: ledgerhelpers/0.3.10-3
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1109029: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1109029
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
X-Debbugs-Cc: ledgerhelp...@packages.debian.org, porri...@debian.org
Control: affects -1 + src:ledgerhelpers
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package ledgerhelpers

[ Reason ]
Fix flaky FTBFS bug Bug#1108809.

[ Impact ]
Test suite Will sometimes fail, causing FTBFS (10%-50% chance depending
on machine).

[ Tests ]
The affected code IS a test.

[ Risks ]
Leaf package, simple well-tested change (see upstream PR link in the bug).
Alternative: disable or remove the flaky test altogether.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

[ Other info ]
See https://github.com/Rudd-O/ledgerhelpers/pull/38 for the (pending)
upstream fix. The targeted fix for Debian omits the refactoring
mentioned below. Description pasted here for convenience:

> It turns out that most Linux file systems have high time stamp
> resolution but low granularity of actual timestamp values. This means
> that a file write done in quick succession after the previous one might
> not cause the st_mtime value to change.
> 
> This in turn means that the caching layer in this library will return
> stale content, causing this test to flake as described in
> https://github.com/Rudd-O/ledgerhelpers/issues/28#issuecomment-3038889660
> 
> As for the sleep duration, I tried 2 milliseconds at first, but then it
> failed after a few hundred runs. Without a sleep, it failed after a
> dozen or so runs. With 10ms it didn't fail even after a couple hundred
> thousand runs.
> 
> While at it, I also refactored the loading of transaction data into
> variables so that it's easier to grasp the intent of the test.

unblock ledgerhelpers/0.3.10-3
diff -Nru ledgerhelpers-0.3.10/debian/changelog 
ledgerhelpers-0.3.10/debian/changelog
--- ledgerhelpers-0.3.10/debian/changelog       2022-12-12 17:36:34.000000000 
+0100
+++ ledgerhelpers-0.3.10/debian/changelog       2025-07-09 09:51:04.000000000 
+0200
@@ -1,3 +1,9 @@
+ledgerhelpers (0.3.10-3) unstable; urgency=high
+
+  * De-flake test_reload_works. (Closes: Bug#1108809)
+
+ -- Marcin Owsiany <porri...@debian.org>  Wed, 09 Jul 2025 09:51:04 +0200
+
 ledgerhelpers (0.3.10-2) unstable; urgency=low
 
   * Re-add python3-setuptools build-depends, turns out it is necessary
diff -Nru 
ledgerhelpers-0.3.10/debian/patches/0002-De-flake-test_reload_works.patch 
ledgerhelpers-0.3.10/debian/patches/0002-De-flake-test_reload_works.patch
--- ledgerhelpers-0.3.10/debian/patches/0002-De-flake-test_reload_works.patch   
1970-01-01 01:00:00.000000000 +0100
+++ ledgerhelpers-0.3.10/debian/patches/0002-De-flake-test_reload_works.patch   
2025-07-09 09:51:04.000000000 +0200
@@ -0,0 +1,29 @@
+From: Marcin Owsiany <porri...@debian.org>
+Date: Wed, 9 Jul 2025 09:39:17 +0200
+Subject: De-flake test_reload_works.
+
+Closes: Bug#1108809
+---
+ tests/test_ledgerhelpers.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/test_ledgerhelpers.py b/tests/test_ledgerhelpers.py
+index 4456db2..474b379 100644
+--- a/tests/test_ledgerhelpers.py
++++ b/tests/test_ledgerhelpers.py
+@@ -7,6 +7,7 @@ except ImportError:
+     journal = None
+ import tests.test_base as base
+ import tempfile
++import time
+ import unittest
+ from unittest import TestCase as T
+ 
+@@ -34,6 +35,7 @@ class TestJournal(T):
+             _, commos = j.accounts_and_last_commodity_for_account()
+             self.assertEqual(commos["Expenses:Drinking"], "1.00 CHF")
+             data = data.replace("CHF", "EUR")
++            time.sleep(0.01) # Wait a few ms to make sure st_mtime of the 
file changes
+             f.write(data)
+             f.flush()
+             _, commos = j.accounts_and_last_commodity_for_account()
diff -Nru ledgerhelpers-0.3.10/debian/patches/series 
ledgerhelpers-0.3.10/debian/patches/series
--- ledgerhelpers-0.3.10/debian/patches/series  2022-12-12 17:36:34.000000000 
+0100
+++ ledgerhelpers-0.3.10/debian/patches/series  2025-07-09 09:51:04.000000000 
+0200
@@ -1 +1,2 @@
 0001-Update-html-docs-location.patch
+0002-De-flake-test_reload_works.patch

--- End Message ---
--- Begin Message ---
Unblocked ledgerhelpers.

--- End Message ---

Reply via email to