Skip to content
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

Merged

Conversation

pvasant
Copy link
Contributor

@pvasant pvasant commented Jun 15, 2022

./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

@openshift-ci openshift-ci bot requested review from jharrington22 and zgalor June 15, 2022 18:25
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 15, 2022
@pvasant pvasant force-pushed the acceptmajorminorforclusterupgrade branch from 0483c20 to 6c9e55a Compare June 15, 2022 19:32
@pvasant pvasant marked this pull request as draft June 16, 2022 12:10
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 16, 2022
@pvasant pvasant force-pushed the acceptmajorminorforclusterupgrade branch from 6c9e55a to f9b6cad Compare July 6, 2022 21:43
@pvasant pvasant marked this pull request as ready for review July 6, 2022 21:43
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 6, 2022
@openshift-ci openshift-ci bot requested a review from vkareh July 6, 2022 21:44
@pvasant
Copy link
Contributor Author

pvasant commented Jul 6, 2022

@oriAdler PTAL this is a minor enhacement which allows to specify just major and minor during cluster upgrade

@pvasant pvasant force-pushed the acceptmajorminorforclusterupgrade branch 2 times, most recently from be26b28 to 6222d27 Compare July 7, 2022 00:55
Copy link
Contributor

@oriAdler oriAdler left a 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

cmd/upgrade/cluster/cmd.go Outdated Show resolved Hide resolved
@@ -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) {
Copy link
Contributor

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:

Suggested change
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

Copy link
Contributor Author

@pvasant pvasant Jul 7, 2022

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

@pvasant pvasant force-pushed the acceptmajorminorforclusterupgrade branch from 6222d27 to 0eec646 Compare July 7, 2022 16:26
@pvasant pvasant force-pushed the acceptmajorminorforclusterupgrade branch from 0eec646 to e6607aa Compare July 7, 2022 16:34
@pvasant
Copy link
Contributor Author

pvasant commented Jul 7, 2022

@ciaranRoche @zgalor PTAL

@ciaranRoche
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 8, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 8, 2022

[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:
  • OWNERS [ciaranRoche,pvasant]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 8, 2022

@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.

@openshift-ci openshift-ci bot merged commit 8fd25d0 into openshift:master Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants