Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/api/job_analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ func PrintJobAnalysisJSONFromDB(
}
tr := make([]testResult, 0)

// These matviews only contain data for the last ~14 days.
jr := dbc.DB.Table("prow_job_failed_tests_by_day_matview")
if period == PeriodHour {
jr = dbc.DB.Table("prow_job_failed_tests_by_hour_matview")
Expand Down
1 change: 1 addition & 0 deletions pkg/db/views.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ SELECT date_trunc('|||BY|||'::text, pjrt.prow_job_run_timestamp) AS period,
FROM prow_job_run_tests pjrt
JOIN tests tests ON pjrt.test_id = tests.id
WHERE pjrt.status = 12
AND pjrt.prow_job_run_timestamp > (|||TIMENOW||| - '15 days'::interval)
GROUP BY tests.name, (date_trunc('|||BY|||'::text, pjrt.prow_job_run_timestamp)), pjrt.prow_job_id
`

Expand Down