aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-04-15 15:45:46 +0200
committerAleksandr Nogikh <nogikh@google.com>2025-04-15 15:55:41 +0000
commit1a6e1709f1d9fef11742f9686a1e1912ef2a12ea (patch)
treef0c0e32ae4b0016519e1e85abf108f33053d2902
parent72b08b89bcde266d8ec4abc77b01fcc0cc95bea0 (diff)
syz-cluster: display the skipped status
If the series was skipped during triage, show that in the status and let users filter by it.
-rw-r--r--syz-cluster/dashboard/handler.go1
-rw-r--r--syz-cluster/pkg/db/entities.go3
-rw-r--r--syz-cluster/pkg/db/series_repo.go5
3 files changed, 8 insertions, 1 deletions
diff --git a/syz-cluster/dashboard/handler.go b/syz-cluster/dashboard/handler.go
index c17921351..8799b1550 100644
--- a/syz-cluster/dashboard/handler.go
+++ b/syz-cluster/dashboard/handler.go
@@ -115,6 +115,7 @@ func (h *dashboardHandler) seriesList(w http.ResponseWriter, r *http.Request) er
{db.SessionStatusWaiting, "waiting"},
{db.SessionStatusInProgress, "in progress"},
{db.SessionStatusFinished, "finished"},
+ {db.SessionStatusSkipped, "skipped"},
},
}
diff --git a/syz-cluster/pkg/db/entities.go b/syz-cluster/pkg/db/entities.go
index 203ab32c9..531861800 100644
--- a/syz-cluster/pkg/db/entities.go
+++ b/syz-cluster/pkg/db/entities.go
@@ -79,6 +79,7 @@ const (
SessionStatusWaiting SessionStatus = "waiting"
SessionStatusInProgress SessionStatus = "in progress"
SessionStatusFinished SessionStatus = "finished"
+ SessionStatusSkipped SessionStatus = "skipped"
// To be used in filters.
SessionStatusAny SessionStatus = ""
)
@@ -90,6 +91,8 @@ func (s *Session) Status() SessionStatus {
return SessionStatusWaiting
} else if s.FinishedAt.IsNull() {
return SessionStatusInProgress
+ } else if !s.SkipReason.IsNull() {
+ return SessionStatusSkipped
}
return SessionStatusFinished
}
diff --git a/syz-cluster/pkg/db/series_repo.go b/syz-cluster/pkg/db/series_repo.go
index 00043f1a8..d79bb1d4e 100644
--- a/syz-cluster/pkg/db/series_repo.go
+++ b/syz-cluster/pkg/db/series_repo.go
@@ -169,7 +169,10 @@ func (repo *SeriesRepository) ListLatest(ctx context.Context, filter SeriesFilte
case SessionStatusInProgress:
stmt.SQL += " Sessions.ID = Series.LatestSessionID AND Sessions.FinishedAt IS NULL"
case SessionStatusFinished:
- stmt.SQL += " Sessions.ID = Series.LatestSessionID AND Sessions.FinishedAt IS NOT NULL"
+ stmt.SQL += " Sessions.ID = Series.LatestSessionID AND Sessions.FinishedAt IS NOT NULL" +
+ " AND Sessions.SkipReason IS NULL"
+ case SessionStatusSkipped:
+ stmt.SQL += " Sessions.ID = Series.LatestSessionID AND Sessions.SkipReason IS NOT NULL"
default:
return nil, fmt.Errorf("unknown status value: %q", filter.Status)
}