0
0
forked from toolshed/abra

fix!: chaos consistency (deploy/undeploy/rollback/upgrade)

See coop-cloud/organising#559

--chaos for rollback/upgrade goes away.
This commit is contained in:
2024-07-08 12:54:37 +02:00
parent 4580df72cb
commit c33ca1c6bc
17 changed files with 241 additions and 246 deletions

View File

@ -41,12 +41,12 @@ var appPsCommand = cli.Command{
log.Fatal(err)
}
isDeployed, deployedVersion, err := stack.IsDeployed(context.Background(), cl, app.StackName())
deployMeta, err := stack.IsDeployed(context.Background(), cl, app.StackName())
if err != nil {
log.Fatal(err)
}
if !isDeployed {
if !deployMeta.IsDeployed {
log.Fatalf("%s is not deployed?", app.Name)
}
@ -55,7 +55,7 @@ var appPsCommand = cli.Command{
if statusMeta, ok := statuses[app.StackName()]; ok {
isChaos, exists := statusMeta["chaos"]
if exists && isChaos == "false" {
if err := app.Recipe.EnsureVersion(deployedVersion); err != nil {
if err := app.Recipe.EnsureVersion(deployMeta.Version); err != nil {
log.Fatal(err)
}
} else {
@ -66,7 +66,7 @@ var appPsCommand = cli.Command{
}
}
showPSOutput(app, cl, deployedVersion, chaosVersion)
showPSOutput(app, cl, deployMeta.Version, chaosVersion)
return nil
},