aboutsummaryrefslogtreecommitdiffstats
path: root/syz-ci
diff options
context:
space:
mode:
authorLaura Peskin <pesk@google.com>2024-10-31 14:58:47 -0700
committerAleksandr Nogikh <nogikh@google.com>2024-12-03 09:29:58 +0000
commit330db277a9678919d2842b0270677e20156cce3e (patch)
treece29da18e381ca27368d20dbdfbe6d6dc54b6fa0 /syz-ci
parentdb79ee42aa4ce246143fd292e083ad85441de20d (diff)
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.
Diffstat (limited to 'syz-ci')
-rw-r--r--syz-ci/manager.go5
-rw-r--r--syz-ci/syz-ci.go6
2 files changed, 7 insertions, 4 deletions
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"`