mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-11-30 16:36:50 -05:00
compatibility: allow newer patch versions for images
Validation incorrectly prevented newer patch versions for images.
This commit is contained in:
parent
2a0b56f7b8
commit
6f9d76dd6e
3 changed files with 23 additions and 6 deletions
|
|
@ -358,6 +358,14 @@ func validateVersionCompatibilityHelper(fieldName string, configuredVersion stri
|
|||
configuredVersion = imageVersion.Version
|
||||
}
|
||||
|
||||
if fieldName == "MicroserviceVersion" {
|
||||
cliVersion := compatibility.EnsurePrefixV(constants.VersionInfo)
|
||||
serviceVersion := compatibility.EnsurePrefixV(configuredVersion)
|
||||
if semver.Compare(cliVersion, serviceVersion) == -1 {
|
||||
return fmt.Errorf("the CLI's version (%s) is older than the configured version (%s)", cliVersion, serviceVersion)
|
||||
}
|
||||
}
|
||||
|
||||
return compatibility.BinaryWith(configuredVersion)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue