Skip to content

Commit

Permalink
tweak console message when an openapi schema is passed, because "Vali…
Browse files Browse the repository at this point in the history
…dating" is confusing (#1371)

Signed-off-by: technillogue <[email protected]>
  • Loading branch information
technillogue authored Nov 15, 2023
1 parent f5a7030 commit 4c244bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/image/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,17 @@ func Build(cfg *config.Config, dir, imageName string, secrets []string, noCache,
}
}

console.Info("Validating model schema...")

var schemaJSON []byte
if schemaFile != "" {
console.Infof("Validating model schema from %s...", schemaFile)
data, err := os.ReadFile(schemaFile)
if err != nil {
return fmt.Errorf("Failed to read schema file: %w", err)
}

schemaJSON = data
} else {
console.Info("Validating model schema...")
schema, err := GenerateOpenAPISchema(imageName, cfg.Build.GPU)
if err != nil {
return fmt.Errorf("Failed to get type signature: %w", err)
Expand Down

0 comments on commit 4c244bd

Please sign in to comment.