From c9b465977b3ed5db310c2123d7b046589c1b3fc0 Mon Sep 17 00:00:00 2001 From: Luke Meyer Date: Sun, 28 Jul 2024 15:12:28 -0400 Subject: [PATCH] include string test_id in analysis matviews --- pkg/db/matviews.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/db/matviews.go b/pkg/db/matviews.go index 2f36cb452..fd7471bcf 100644 --- a/pkg/db/matviews.go +++ b/pkg/db/matviews.go @@ -242,6 +242,7 @@ GROUP BY const testAnalysisByVariantMatView = ` SELECT tests.id AS test_id, + town.unique_id as test_str_id, tests.name AS test_name, tests.watchlist, date(prow_job_runs."timestamp") AS date, @@ -254,17 +255,19 @@ SELECT FROM prow_job_run_tests JOIN tests ON tests.id = prow_job_run_tests.test_id + JOIN test_ownerships town ON town.test_id = tests.id JOIN prow_job_runs ON prow_job_runs.id = prow_job_run_tests.prow_job_run_id JOIN prow_jobs ON prow_jobs.id = prow_job_runs.prow_job_id WHERE prow_job_run_tests.created_at > (|||TIMENOW||| - '14 days'::interval) AND prow_job_runs."timestamp" > (|||TIMENOW||| - '14 days'::interval) GROUP BY - tests.name, tests.id, date(prow_job_runs."timestamp"), unnest(prow_jobs.variants), prow_jobs.release + tests.name, town.unique_id, tests.id, date(prow_job_runs."timestamp"), unnest(prow_jobs.variants), prow_jobs.release ` const testAnalysisByJobMatView = ` SELECT tests.id AS test_id, + town.unique_id as test_str_id, tests.name AS test_name, tests.watchlist, date(prow_job_runs."timestamp") AS date, @@ -277,12 +280,13 @@ SELECT FROM prow_job_run_tests JOIN tests ON tests.id = prow_job_run_tests.test_id + JOIN test_ownerships town ON town.test_id = tests.id JOIN prow_job_runs ON prow_job_runs.id = prow_job_run_tests.prow_job_run_id JOIN prow_jobs ON prow_jobs.id = prow_job_runs.prow_job_id WHERE prow_job_run_tests.created_at > (|||TIMENOW||| - '14 days'::interval) AND prow_job_runs."timestamp" > (|||TIMENOW||| - '14 days'::interval) GROUP BY - tests.name, tests.id, date(prow_job_runs."timestamp"), prow_jobs.release, prow_jobs.name + tests.name, town.unique_id, tests.id, date(prow_job_runs."timestamp"), prow_jobs.release, prow_jobs.name ` const prowJobFailedTestsMatView = `