From 36459dcdb75ddeba9abe9ef2f2ba291b3a3a64c3 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Sat, 6 Nov 2021 22:09:02 -0700 Subject: [PATCH] Fix fencepost error when fetching autopkgtest results from sqlite When querying swift there is no way to take results only newer than a specified point, you can only query newer than or equal to. But for sqlite we can absolutely use > instead of >= and avoid re-processing results we've already seen. --- britney2/policies/autopkgtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index d20198f..a05f52c 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -1024,7 +1024,7 @@ class AutopkgtestPolicy(BasePolicy): ' r.run_id FROM test AS t ' 'LEFT JOIN result AS r ON t.id=r.test_id ' 'WHERE t.release=? AND t.arch=? ' - 'AND t.package=? AND r.run_id >= ?', + 'AND t.package=? AND r.run_id > ?', (self.options.series, arch, src, latest_run_id)): exitcode, ver, triggers, run_id = row if not ver: