Warn instead of error on missing config version

This commit is contained in:
3wc
2025-09-01 21:03:16 -04:00
parent eb9c72df38
commit db92b3920a

View File

@ -196,6 +196,8 @@ checkout as-is. Recipe commit hashes are also supported as values for
deployedVersion = deployMeta.Version deployedVersion = deployMeta.Version
} }
// Gather secrets
secStats, err := secret.PollSecretsStatus(cl, app) secStats, err := secret.PollSecretsStatus(cl, app)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
@ -211,6 +213,8 @@ checkout as-is. Recipe commit hashes are also supported as values for
secretInfo = append(secretInfo, fmt.Sprintf("%s: %s", secStat.LocalName, secStat.Version)) secretInfo = append(secretInfo, fmt.Sprintf("%s: %s", secStat.LocalName, secStat.Version))
} }
// Gather configs
// Get current configs from existing deployment // Get current configs from existing deployment
currentConfigNames, err := client.GetConfigNamesForStack(cl, context.Background(), app.StackName()) currentConfigNames, err := client.GetConfigNamesForStack(cl, context.Background(), app.StackName())
if err != nil { if err != nil {
@ -237,7 +241,9 @@ checkout as-is. Recipe commit hashes are also supported as values for
versionKey := strings.ToUpper(configName) + "_VERSION" versionKey := strings.ToUpper(configName) + "_VERSION"
newVersion, exists := abraShEnv[versionKey] newVersion, exists := abraShEnv[versionKey]
if !exists { if !exists {
log.Fatalf("No version found for config %s", configName) log.Warnf("No version found for config %s", configName)
configInfo = append(configInfo, fmt.Sprintf("%s: ? (missing)", configName))
continue
} }
if currentVersion, exists := currentConfigs[configName]; exists { if currentVersion, exists := currentConfigs[configName]; exists {
@ -268,6 +274,7 @@ checkout as-is. Recipe commit hashes are also supported as values for
); err != nil { ); err != nil {
log.Fatal(err) log.Fatal(err)
} }
// FIXME: just for debugging
return return
stack.WaitTimeout, err = appPkg.GetTimeoutFromLabel(compose, stackName) stack.WaitTimeout, err = appPkg.GetTimeoutFromLabel(compose, stackName)