Skip to content

Commit c54dd68

Browse files
committed
contest: collector: ignore double inserts
Intel runner seems to be peppered with double-results. We handle these normally but Intel's results have completely identical keys (including start date). Ignore them. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 6c4207c commit c54dd68

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

contest/results-collector.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ def insert_result_psql(self, data):
117117
arg = cur.mogrify("(%s,%s,%s,%s,%s,%s,%s,%s)",
118118
(data["branch"], data["branch"][-17:], data["remote"], data["executor"],
119119
data["start"], data["end"], normal, full))
120-
cur.execute(f"INSERT INTO {self.tbl_res} {fields} VALUES " + arg.decode('utf-8'))
120+
try:
121+
cur.execute(f"INSERT INTO {self.tbl_res} {fields} VALUES " + arg.decode('utf-8'))
122+
except psycopg2.errors.UniqueViolation as e:
123+
print(f"ERROR: {type(e).__module__}.{type(e).__name__}: {e.diag.message_primary}")
124+
print(f"ERROR: DETAIL: {e.diag.message_detail}")
121125

122126
def psql_json_split(self, data):
123127
# return "normal" and "full" as json string or None

0 commit comments

Comments
 (0)