From 3a6940898bb6087b84e27a352021637e652f7885 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 7 Oct 2025 13:36:36 -0400 Subject: [PATCH] Fix broken samples API The samples API was performing an invalid SQL query since the ORM update in 5b02472b4d4. This fixes the problem and un-XFAILs the test. --- lnt/server/ui/api.py | 1 + tests/server/ui/test_api.py | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lnt/server/ui/api.py b/lnt/server/ui/api.py index 58cb1ade..a7131b30 100644 --- a/lnt/server/ui/api.py +++ b/lnt/server/ui/api.py @@ -438,6 +438,7 @@ def get(machine_id, test_id, field_index): q = session.query(field.column, ts.Order.llvm_project_revision, ts.Run.start_time, ts.Run.id) \ + .select_from(ts.Sample) \ .join(ts.Run) \ .join(ts.Order) \ .filter(ts.Run.machine_id == machine.id) \ diff --git a/tests/server/ui/test_api.py b/tests/server/ui/test_api.py index 325f0677..93e400c4 100644 --- a/tests/server/ui/test_api.py +++ b/tests/server/ui/test_api.py @@ -1,5 +1,3 @@ -# XFAIL: TODO-FIXME - # Check that the LNT REST JSON API is working. # create temporary instance # RUN: rm -rf %t.instance