• Bug#1109029: unblock: ledgerhelpers/0.3.10-3

    From Marcin Owsiany@21:1/5 to All on Wed Jul 9 22:20:02 2025
    XPost: linux.debian.devel.release

    This is a multi-part MIME message sent by reportbug.


    Package: release.debian.org
    Severity: normal
    X-Debbugs-Cc: [email protected], [email protected]
    Control: affects -1 + src:ledgerhelpers
    User: [email protected]
    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 <[email protected]> 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 <[email protected]>
    +Date: Wed, 9 Jul 2025 09:39:17 +0200
    +Subject: De-flake test_reload_works.
    +
    +