From f7cfc6225a3f2876676a89d1d0486a4c08f0aefc Mon Sep 17 00:00:00 2001 From: Pimyn Girgis Date: Tue, 16 Dec 2025 11:09:32 +0100 Subject: syz-cluster: show series versions in the dashboard Display a list of other versions of the same series on the series details page. Fetch all series sharing the same title and render them in a new "Series Versions" table, allowing navigation between different versions of a patch series. --- syz-cluster/dashboard/handler.go | 6 ++++++ syz-cluster/dashboard/templates/series.html | 11 ++++++++++- syz-cluster/pkg/db/series_repo.go | 11 +++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) (limited to 'syz-cluster') diff --git a/syz-cluster/dashboard/handler.go b/syz-cluster/dashboard/handler.go index 381efcfcd..e9d949f7c 100644 --- a/syz-cluster/dashboard/handler.go +++ b/syz-cluster/dashboard/handler.go @@ -172,6 +172,7 @@ func (h *dashboardHandler) seriesInfo(w http.ResponseWriter, r *http.Request) er *db.Series Patches []*db.Patch Sessions []SessionData + Versions []*db.Series TotalPatches int } var data SeriesData @@ -188,6 +189,11 @@ func (h *dashboardHandler) seriesInfo(w http.ResponseWriter, r *http.Request) er return fmt.Errorf("failed to query patches: %w", err) } data.TotalPatches = len(data.Patches) + // Note: There may be some false positives, but there's no straightforward way to filter them out. + data.Versions, err = h.seriesRepo.ListAllVersions(ctx, data.Series.Title) + if err != nil { + return fmt.Errorf("failed to query all series versions: %w", err) + } sessions, err := h.sessionRepo.ListForSeries(ctx, data.Series) if err != nil { return fmt.Errorf("failed to query sessions: %w", err) diff --git a/syz-cluster/dashboard/templates/series.html b/syz-cluster/dashboard/templates/series.html index 3f349435d..504d059eb 100644 --- a/syz-cluster/dashboard/templates/series.html +++ b/syz-cluster/dashboard/templates/series.html @@ -53,7 +53,16 @@ Version - {{.Version}} + + + Cc diff --git a/syz-cluster/pkg/db/series_repo.go b/syz-cluster/pkg/db/series_repo.go index fdb452f72..aa8c687ca 100644 --- a/syz-cluster/pkg/db/series_repo.go +++ b/syz-cluster/pkg/db/series_repo.go @@ -226,6 +226,17 @@ WHERE SEARCH(Patches.TitleTokens, @name) return ret, nil } +func (repo *SeriesRepository) ListAllVersions(ctx context.Context, title string) ([]*Series, error) { + ro := repo.client.ReadOnlyTransaction() + defer ro.Close() + return readEntities[Series](ctx, ro, spanner.Statement{ + SQL: "SELECT ID, Version FROM SERIES where Title = @title ORDER BY Version", + Params: map[string]any{ + "title": title, + }, + }) +} + func (repo *SeriesRepository) querySessions(ctx context.Context, ro *spanner.ReadOnlyTransaction, seriesList []*SeriesWithSession) error { idToSeries := map[string]*SeriesWithSession{} -- cgit mrf-deployment