From d866527138063b43f3d9f9b8649e5c391b5a2d34 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Mon, 8 Sep 2025 22:21:18 -0400 Subject: [PATCH] fix: set "chaos" if a specified* version is "chaos-y" *either from env file or command-line --- cli/app/deploy.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cli/app/deploy.go b/cli/app/deploy.go index fa0c14be..8cb630c8 100644 --- a/cli/app/deploy.go +++ b/cli/app/deploy.go @@ -106,13 +106,15 @@ checkout as-is. Recipe commit hashes are also supported as values for log.Fatal(i18n.G("get deploy version: %s", err)) } + versionIsChaos := false if !internal.Chaos { - isChaos, err := app.Recipe.EnsureVersion(toDeployVersion) + var err error + versionIsChaos, err = app.Recipe.EnsureVersion(toDeployVersion) if err != nil { log.Fatal(i18n.G("ensure recipe: %s", err)) } - if isChaos { - log.Fatal(i18n.G("version '%s' appears to be a chaos commit, but --chaos/-C was not provided", toDeployVersion)) + if versionIsChaos { + log.Warnf(i18n.G("version '%s' appears to be a chaos commit, but --chaos/-C was not provided", toDeployVersion)) } } @@ -152,7 +154,7 @@ checkout as-is. Recipe commit hashes are also supported as values for appPkg.ExposeAllEnv(stackName, compose, app.Env) appPkg.SetRecipeLabel(compose, stackName, app.Recipe.Name) - appPkg.SetChaosLabel(compose, stackName, internal.Chaos) + appPkg.SetChaosLabel(compose, stackName, internal.Chaos || versionIsChaos) if internal.Chaos { appPkg.SetChaosVersionLabel(compose, stackName, toDeployVersion) }