From 37f7ec75a3672de8b3280d0b59ef2d4c97e5097d Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Wed, 28 Sep 2022 16:20:12 +0000 Subject: all: introduce asset storage config to syz-manager Let users set the asset storage config in the syz-manager config. When running under syz-ci, pass the asset storage config from the syz-ci. Create an asset storage instance on the start of syz-manager. Refactor some of syz-manager code to make it less complex. --- pkg/mgrconfig/load.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pkg/mgrconfig/load.go') diff --git a/pkg/mgrconfig/load.go b/pkg/mgrconfig/load.go index f1063ed17..bef05faa4 100644 --- a/pkg/mgrconfig/load.go +++ b/pkg/mgrconfig/load.go @@ -182,6 +182,15 @@ func Complete(cfg *Config) error { if err != nil { return err } + if !cfg.AssetStorage.IsEmpty() { + if cfg.DashboardClient == "" { + return fmt.Errorf("asset storage also requires dashboard client") + } + err = cfg.AssetStorage.Validate() + if err != nil { + return err + } + } cfg.initTimeouts() return nil } -- cgit mrf-deployment