feat: unify installation model catalog
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/aritmolab/thothii/tools/tht/internal/authconfig"
|
||||
"github.com/aritmolab/thothii/tools/tht/internal/compose"
|
||||
"github.com/aritmolab/thothii/tools/tht/internal/config"
|
||||
"github.com/aritmolab/thothii/tools/tht/internal/modelprojection"
|
||||
"github.com/aritmolab/thothii/tools/tht/internal/output"
|
||||
"github.com/aritmolab/thothii/tools/tht/internal/pi"
|
||||
"github.com/aritmolab/thothii/tools/tht/internal/service"
|
||||
@@ -101,7 +102,7 @@ func RunWithProbe(ctx context.Context, installation config.Installation, runner
|
||||
return Report{}, errors.New("doctor requires an HTTP probe")
|
||||
}
|
||||
secretValues, secretErr := secretValues(installation)
|
||||
report := Report{Checks: make([]Check, 0, 12)}
|
||||
report := Report{Checks: make([]Check, 0, 13)}
|
||||
add := func(name, status, detail string) {
|
||||
report.Checks = append(report.Checks, Check{Name: name, Status: status, Detail: output.SanitizeDetail(detail, secretValues)})
|
||||
}
|
||||
@@ -111,6 +112,13 @@ func RunWithProbe(ctx context.Context, installation config.Installation, runner
|
||||
} else {
|
||||
add("descriptor", StatusPassed, "installation descriptor is loaded")
|
||||
}
|
||||
if drift, err := modelprojection.Check(installation); err != nil {
|
||||
add("model-projection", StatusFailed, "model runtime projections could not be recomputed")
|
||||
} else if len(drift) > 0 {
|
||||
add("model-projection", StatusFailed, "generated model runtime projections differ: "+strings.Join(drift, ", "))
|
||||
} else {
|
||||
add("model-projection", StatusPassed, "generated model runtime projections match modelCatalog")
|
||||
}
|
||||
if err := filePermissions(installation); err != nil || secretErr != nil {
|
||||
if secretErr != nil {
|
||||
add("files", StatusFailed, "declared secret files could not be read")
|
||||
|
||||
Reference in New Issue
Block a user