Allow version comparison errors (#6257)
This commit is contained in:
@@ -298,7 +298,12 @@ func UpdateLatestAppVersion(ctx context.Context, client runtimeclient.Client, ap
|
||||
klog.Warningf("failed to parse version: %s, use first version %s", v.Spec.VersionName, latestAppVersion)
|
||||
continue
|
||||
}
|
||||
if parsedVersion.GT(semver.MustParse(strings.TrimPrefix(latestAppVersion, "v"))) {
|
||||
oldLatestAppVersion, err := semver.Parse(strings.TrimPrefix(latestAppVersion, "v"))
|
||||
if err != nil {
|
||||
klog.Warningf("failed to parse oldLatestAppVersion: %s", latestAppVersion)
|
||||
continue
|
||||
}
|
||||
if parsedVersion.GT(oldLatestAppVersion) {
|
||||
latestAppVersion = v.Spec.VersionName
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user