fix: harden model catalog projections

This commit is contained in:
Codex
2026-09-02 19:25:01 +02:00
parent ce4c31a6fb
commit a6a5bf2036
38 changed files with 573 additions and 83 deletions
+7 -2
View File
@@ -528,8 +528,13 @@ func piCommand(ctx context.Context, installation config.Installation, runner com
defer func() { _ = lock.Release() }()
}
if args[0] == "restart" || args[0] == "update" || args[0] == "rollback" {
if err := modelprojection.Generate(installation); err != nil {
return commandUsageError(stderr, "installation model catalog could not be projected: "+err.Error())
drift, err := modelprojection.Check(installation)
if err != nil {
return commandUsageError(stderr, "installation model catalog could not be verified: "+err.Error())
}
if len(drift) > 0 {
return commandUsageError(stderr,
"installation model catalog changed; run tht start to apply the complete runtime projection")
}
}
controlled := compose.InstallationRunner{Installation: installation, Runner: runner}