aboutsummaryrefslogtreecommitdiffstats
path: root/syz-ci
diff options
context:
space:
mode:
authorAndrew Donnellan <ajd@linux.ibm.com>2023-11-13 11:45:50 +1100
committerAleksandr Nogikh <nogikh@google.com>2025-12-11 12:46:44 +0000
commita066d2bc4b02c5b24dfc01dae9d50e32f3ed6c0e (patch)
treefde402ead729637e7192e5f7b36e36983126ff1e /syz-ci
parentef85274a87e38293283a1ec5417cdc76d1ad6b7c (diff)
syz-ci: don't try to create a JobManager when no dashboard specified
Instantiating the JobManager will fail if you don't specify a dashboard address, which is an optional field in the syz-ci config. There's no point having a JobManager without a dashboard, so just skip this completely when there's no dashboard. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Diffstat (limited to 'syz-ci')
-rw-r--r--syz-ci/syz-ci.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/syz-ci/syz-ci.go b/syz-ci/syz-ci.go
index 4ee611852..fd1f2a7bb 100644
--- a/syz-ci/syz-ci.go
+++ b/syz-ci/syz-ci.go
@@ -321,13 +321,16 @@ func main() {
}()
}
}
- jm, err := newJobManager(cfg, managers, shutdownPending)
- if err != nil {
- log.Fatalf("failed to create dashapi connection %v", err)
- }
+
ctxJobs, stopJobs := context.WithCancel(ctx)
wgJobs := sync.WaitGroup{}
- jm.startLoop(ctxJobs, &wgJobs)
+ if cfg.DashboardAddr != "" {
+ jm, err := newJobManager(cfg, managers, shutdownPending)
+ if err != nil {
+ log.Fatalf("failed to create dashapi connection %v", err)
+ }
+ jm.startLoop(ctxJobs, &wgJobs)
+ }
// For testing. Racy. Use with care.
http.HandleFunc("/upload_cover", func(w http.ResponseWriter, r *http.Request) {