Skip to content

Commit

Permalink
fix: skip apps without releases in release train (#2042)
Browse files Browse the repository at this point in the history
Ref: SRX-LEIHOZ
  • Loading branch information
sven-urbanski-freiheit-com authored Oct 14, 2024
1 parent 531fb4e commit 5e45cc4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/cd-service/pkg/repository/transformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3822,6 +3822,10 @@ func (c *envReleaseTrain) prognosis(
}
} else if upstreamLatest {
l := len(allLatestReleases[appName])
if allLatestReleases == nil || allLatestReleases[appName] == nil || l == 0 {
logger.FromContext(ctx).Sugar().Warnf("app %s appears to have no releases on env=%s, so it is skipped", appName, c.Env)
continue
}
versionToDeploy = uint64(allLatestReleases[appName][int(math.Max(0, float64(l-1)))])
} else {
upstreamVersion := allLatestDeploymentsUpstreamEnv[appName]
Expand Down

0 comments on commit 5e45cc4

Please sign in to comment.