-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ezml 1226 versions semantic control #600
Ezml 1226 versions semantic control #600
Conversation
if prevCrApp.Spec.Version == crApp.Spec.Version { | ||
prevVer := semver.New(prevCrApp.Spec.Version) | ||
newVer := semver.New(crApp.Spec.Version) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point, prevVer and/or newVer can be nil if the version string is not understood by semver. In those cases we should also reject the upgrade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, my mistake. In those cases, New
will panic, which is bad for us.
Try using NewVersion (instead of New) as in https://github.com/coreos/go-semver/blob/main/example.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
Also note that Travis CI is reporting that you need to run "make format". |
Fixed |
Nice. |
Resolves #590