diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2023-03-07 16:07:35 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2023-03-07 16:22:43 +0100 |
| commit | 1f8570eb2de6051a733d86ece8d127099fa25992 (patch) | |
| tree | 97dbf1260f0678b06614b40ff23dd3370d8c1cbd | |
| parent | 6b272a2ced094b793e9f88c8c42fab67838873f8 (diff) | |
dashboard: support obsolete KernelRepo entries
There are cases when a previously fuzzed tree was obsoleted and can no
longer be polled for commits. At the same time, we still want to display
short repo aliases in bug reportings and on the dashboard.
| -rw-r--r-- | dashboard/app/api.go | 3 | ||||
| -rw-r--r-- | dashboard/app/app_test.go | 6 | ||||
| -rw-r--r-- | dashboard/app/config.go | 3 |
3 files changed, 12 insertions, 0 deletions
diff --git a/dashboard/app/api.go b/dashboard/app/api.go index 9451d2dc9..95150fd9e 100644 --- a/dashboard/app/api.go +++ b/dashboard/app/api.go @@ -231,6 +231,9 @@ func apiCommitPoll(c context.Context, ns string, r *http.Request, payload []byte ReportEmail: reportEmail(c, ns), } for _, repo := range config.Namespaces[ns].Repos { + if repo.Obsolete { + continue + } resp.Repos = append(resp.Repos, dashapi.Repo{ URL: repo.URL, Branch: repo.Branch, diff --git a/dashboard/app/app_test.go b/dashboard/app/app_test.go index cd14f9d32..f772ceab7 100644 --- a/dashboard/app/app_test.go +++ b/dashboard/app/app_test.go @@ -82,6 +82,12 @@ var testConfig = &GlobalConfig{ Maintainers: []string{"maintainers@repo10.org", "bugs@repo10.org"}, }, }, + { + URL: "git://github.com/google/syzkaller", + Branch: "old_master", + Alias: "repo10alias", + Obsolete: true, + }, }, Managers: map[string]ConfigManager{ "special-obsoleting": { diff --git a/dashboard/app/config.go b/dashboard/app/config.go index 60b511238..f9623c6a8 100644 --- a/dashboard/app/config.go +++ b/dashboard/app/config.go @@ -194,6 +194,9 @@ type KernelRepo struct { ReportingPriority int // CC for all bugs reported on this repo. CC CCConfig + // This repository is no longer active and should not be polled for commits. + // It will only be used to display kernel aliases for older crashes. + Obsolete bool } type CCConfig struct { |
