Skip to content

USHIFT-1086: Refuse to start if versions of data and executable are different, refuse migration if data version > exec version#1900

Merged
openshift-merge-robot merged 3 commits intoopenshift:mainfrom
pmtk:1086-version-lower-refuse
Jun 7, 2023
Merged

USHIFT-1086: Refuse to start if versions of data and executable are different, refuse migration if data version > exec version#1900
openshift-merge-robot merged 3 commits intoopenshift:mainfrom
pmtk:1086-version-lower-refuse

Conversation

@pmtk
Copy link
Member

@pmtk pmtk commented Jun 7, 2023

No description provided.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 7, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 7, 2023

@pmtk: This pull request references USHIFT-1086 which is a valid jira issue.

Details

In response to this:

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.

@openshift-ci openshift-ci bot requested review from copejon and pliurh June 7, 2023 16:11
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 7, 2023
@pmtk pmtk changed the title USHIFT-1086: Refuse to start if versions of data and executable are different USHIFT-1086: Refuse to start if versions of data and executable are different, refuse migration if data version > exec version Jun 7, 2023
}

type versionMetadata struct {
X, Y int
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We talk about x, y, and z but those aren't very meaningful field names. Maybe "Major" and "Minor"?

}

dataVer, err := getVersionOfData()
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic below this point would be easier to unit test if it was pulled out into its own function so the test suite could pass the execVer and dataVer values for different scenarios.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intended that initially but was discouraged by no protection from passing params in wrong order and doing checks wrong. but the ut argument is valid so i'll change it

@pmtk pmtk force-pushed the 1086-version-lower-refuse branch from 082be1c to f73e3c8 Compare June 7, 2023 19:50
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 7, 2023

@pmtk: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-openshift-conformance-reduced-arm f73e3c8 link false /test e2e-openshift-conformance-reduced-arm

Full PR test history. Your PR dashboard.

Details

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.

Copy link
Contributor

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 7, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 7, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhellmann, pmtk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

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

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants