Package: golang-entgo-ent Version: 0.11.3-4 Severity: serious Tags: ftbfs patch upstream Justification: fails to build from source (but built successfully in the past) X-Debbugs-Cc: paul.m...@canonical.com
Dear Maintainer, A test of the golang test suite of ent is sometimes failing because the results fetched from the database are not sorted as expected. 681s === RUN Example_M2M2Types 681s --- FAIL: Example_M2M2Types (0.00s) 681s got: 681s [Group(id=2, name=GitLab) Group(id=1, name=GitHub)] 681s [Group(id=1, name=GitHub)] 681s [User(id=1, age=30, name=a8m) User(id=2, age=28, name=nati)] 681s want: 681s [Group(id=1, name=GitHub) Group(id=2, name=GitLab)] 681s [Group(id=1, name=GitHub)] 681s [User(id=1, age=30, name=a8m) User(id=2, age=28, name=nati)] By default sqlite does not guaranty results ordering but this can go unnoticed on simple cases. I suspect some race condition somewhere is triggering the bug and the 2 results are swapped. To make it reliable we need to explicitly call .Order(ent.Asc("id")). -- System Information: Debian Release: bookworm/sid APT prefers jammy-updates APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy'), (100, 'jammy-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.5.0-14-generic (SMP w/16 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled