-
Notifications
You must be signed in to change notification settings - Fork 208
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
accept major minor version for cluster upgrade #745
accept major minor version for cluster upgrade #745
Conversation
0483c20
to
6c9e55a
Compare
6c9e55a
to
f9b6cad
Compare
@oriAdler PTAL this is a minor enhacement which allows to specify just major and minor during cluster upgrade |
be26b28
to
6222d27
Compare
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.
Left two small comments, except that LGTM
pkg/ocm/versions.go
Outdated
@@ -220,3 +220,54 @@ func (c *Client) GetDefaultVersion() (version string, err error) { | |||
} | |||
return "", fmt.Errorf("There are no openShift versions available") | |||
} | |||
|
|||
func IsValidVersion(userVersion string, supportedVersion string) (bool, error) { |
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.
Maybe we should have instead:
func IsValidVersion(userVersion string, supportedVersion string) (bool, error) { | |
func IsValidVersion(userVersionStr string, supportedVersionStr string) (bool, error) { |
And we can replace the names of the variables inside the function with userVersion
, userVersionMajorMinor
, supportedVersion
and supportedVersionMajorMinor
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.
Please check now i tried my best to make it more clear
6222d27
to
0eec646
Compare
0eec646
to
e6607aa
Compare
@ciaranRoche @zgalor PTAL |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ciaranRoche, pvasant The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@pvasant: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
./rosa upgrade cluster -c 1t9qanso4h9ch0n0du5af0htdk177qqv --version 4.10
I: Ensuring account and operator role policies for cluster '1t9qanso4h9ch0n0du5af0htdk177qqv' are compatible with upgrade.
I: Account and operator roles for cluster '1t9qanso4h9ch0n0du5af0htdk177qqv' are compatible with upgrade
? Are you sure you want to upgrade cluster to version '4.10.20'? (y/N)
pvasanth@localhost: (acceptmajorminorforclusterupgrade *) $ ./rosa upgrade cluster -c 1t9qanso4h9ch0n0du5af0htdk177qqv --version 4.9
E: Expected a valid version to upgrade to
pvasanth@localhost: (acceptmajorminorforclusterupgrade *) $ ./rosa upgrade cluster -c 1t9qanso4h9ch0n0du5af0htdk177qqv --version 4.8
E: Expected a valid version to upgrade to
pvasanth@localhost: (acceptmajorminorforclusterupgrade *) $ ./rosa upgrade cluster -c 1t9qanso4h9ch0n0du5af0htdk177qqv --version 4.9.40
I: Ensuring account and operator role policies for cluster '1t9qanso4h9ch0n0du5af0htdk177qqv' are compatible with upgrade.
I: Account and operator roles for cluster '1t9qanso4h9ch0n0du5af0htdk177qqv' are compatible with upgrade
? Are you sure you want to upgrade cluster to version '4.9.40'? (y/N)
pvasanth@localhost: (acceptmajorminorforclusterupgrade *) $ ./rosa upgrade cluster -c 1t9qanso4h9ch0n0du5af0htdk177qqv --version 4.8.40
E: Expected a valid version to upgrade to
https://issues.redhat.com/browse/SDA-6119