Fine tune schema and job archive migration

This commit is contained in:
Jan Eitzinger
2023-04-06 18:09:36 +02:00
parent 6661937fed
commit d858868901
6 changed files with 35 additions and 15 deletions

View File

@@ -172,11 +172,11 @@ func (fsa *FsArchive) LoadClusterCfg(name string) (*schema.Cluster, error) {
log.Errorf("fsBackend LoadClusterCfg()- %v", err)
return &schema.Cluster{}, err
}
if config.Keys.Validate {
if err := schema.Validate(schema.ClusterCfg, bytes.NewReader(b)); err != nil {
return &schema.Cluster{}, fmt.Errorf("validate cluster config: %v", err)
}
// if config.Keys.Validate {
if err := schema.Validate(schema.ClusterCfg, bytes.NewReader(b)); err != nil {
return &schema.Cluster{}, fmt.Errorf("validate cluster config: %v", err)
}
// }
return DecodeCluster(bytes.NewReader(b))
}