Skip to content

Commit 09fc048

Browse files
committed
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>
1 parent 6bdf333 commit 09fc048

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

syz-ci/syz-ci.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,16 @@ func main() {
321321
}()
322322
}
323323
}
324-
jm, err := newJobManager(cfg, managers, shutdownPending)
325-
if err != nil {
326-
log.Fatalf("failed to create dashapi connection %v", err)
327-
}
324+
328325
ctxJobs, stopJobs := context.WithCancel(ctx)
329326
wgJobs := sync.WaitGroup{}
330-
jm.startLoop(ctxJobs, &wgJobs)
327+
if cfg.DashboardAddr != "" {
328+
jm, err := newJobManager(cfg, managers, shutdownPending)
329+
if err != nil {
330+
log.Fatalf("failed to create dashapi connection %v", err)
331+
}
332+
jm.startLoop(ctxJobs, &wgJobs)
333+
}
331334

332335
// For testing. Racy. Use with care.
333336
http.HandleFunc("/upload_cover", func(w http.ResponseWriter, r *http.Request) {

0 commit comments

Comments
 (0)