From 330db277a9678919d2842b0270677e20156cce3e Mon Sep 17 00:00:00 2001 From: Laura Peskin Date: Thu, 31 Oct 2024 14:58:47 -0700 Subject: syz-ci: manager dash value is nil if dashboard is nil The introduction of the ManagerDashapi interface unintentionally overrode the nil checks on the manager's dashboard value. This change sets the interface value only if there is a valid dashboard. --- syz-ci/manager.go | 5 ++++- syz-ci/syz-ci.go | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'syz-ci') diff --git a/syz-ci/manager.go b/syz-ci/manager.go index 872825c34..83d174872 100644 --- a/syz-ci/manager.go +++ b/syz-ci/manager.go @@ -154,12 +154,15 @@ func createManager(cfg *Config, mgrcfg *ManagerConfig, stop chan struct{}, repo: repo, mgrcfg: mgrcfg, managercfg: mgrcfg.managercfg, - dash: dash, storage: assetStorage, debugStorage: !cfg.AssetStorage.IsEmpty() && cfg.AssetStorage.Debug, stop: stop, debug: debug, } + // Leave the dashboard interface value as nil if it does not wrap a valid dashboard pointer. + if dash != nil { + mgr.dash = dash + } os.RemoveAll(mgr.currentDir) return mgr, nil diff --git a/syz-ci/syz-ci.go b/syz-ci/syz-ci.go index b8b358652..fdaca59f3 100644 --- a/syz-ci/syz-ci.go +++ b/syz-ci/syz-ci.go @@ -180,9 +180,9 @@ type ManagerConfig struct { // and rename managers/foo to managers/ci-foo. Then this instance can be moved // to another ci along with managers/ci-foo dir. Name string `json:"name"` - Disabled string `json:"disabled"` // If not empty, don't build/start this manager. - DashboardClient string `json:"dashboard_client"` - DashboardKey string `json:"dashboard_key"` + Disabled string `json:"disabled"` // If not empty, don't build/start this manager. + DashboardClient string `json:"dashboard_client"` // Optional. + DashboardKey string `json:"dashboard_key"` // Optional. Repo string `json:"repo"` // Short name of the repo (e.g. "linux-next"), used only for reporting. RepoAlias string `json:"repo_alias"` -- cgit mrf-deployment