Skip to content

USHIFT-1091 USHIFT-1095: Handle upgrade from 4.13#1957

Merged
openshift-merge-robot merged 1 commit intoopenshift:mainfrom
pmtk:1091-from-4.13
Jun 27, 2023
Merged

USHIFT-1091 USHIFT-1095: Handle upgrade from 4.13#1957
openshift-merge-robot merged 1 commit intoopenshift:mainfrom
pmtk:1091-from-4.13

Conversation

@pmtk
Copy link
Copy Markdown
Member

@pmtk pmtk commented Jun 23, 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 23, 2023
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Jun 23, 2023

@pmtk: This pull request references USHIFT-1091 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 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 23, 2023
@openshift-ci openshift-ci Bot requested review from ggiguash and pacevedom June 23, 2023 18:28
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 23, 2023
@pmtk pmtk force-pushed the 1091-from-4.13 branch 2 times, most recently from f934b37 to 0d1b04a Compare June 26, 2023 09:55
@pmtk pmtk changed the title WIP USHIFT-1091: Handle upgrade from 4.13 USHIFT-1091: Handle upgrade from 4.13 Jun 26, 2023
@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 Jun 26, 2023
@pmtk pmtk changed the title USHIFT-1091: Handle upgrade from 4.13 USHIFT-1091 USHIFT-1095: Handle upgrade from 4.13 Jun 26, 2023
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Jun 26, 2023

@pmtk: This pull request references USHIFT-1095 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.

@pmtk pmtk force-pushed the 1091-from-4.13 branch 2 times, most recently from 54e375e to 73cf1ef Compare June 26, 2023 14:36
@pmtk
Copy link
Copy Markdown
Member Author

pmtk commented Jun 26, 2023

/retest

Comment thread pkg/admin/prerun/prerun.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It would be good to log before and after this call, since it's a distinct unit of work.

Comment thread pkg/admin/prerun/prerun.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It would be good to be consistent about either having each case be 1 if statement with combined conditions (like here) or to use nested if statements (like above). I don't have a strong preference for which approach is used, but if nested conditions make it easier to ensure we are testing all of the relevant cases maybe that's the thing to do?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

What I like about current version is clear distinction of cases where data does and does not exist (seems to me to be kind of a big deal that deserves special treatment).
Lines from 174 to the end of the function could be inside an else but that's not idiomatic...
TBH I'm most happy with the current version - it's explicit that if !dataExists exhausts all the cases when data doesn't exist, and the rest are cases when it does. Turning that into if !dataExists && !healthExists and if !dataExists && healthExists makes me spend some brain cycles to think if there are other, implicit cases with !dataExists

Comment thread pkg/admin/prerun/prerun.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not perform the pre-run process when moving from 4.13?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I tried that in first version (333216d#diff-e78e17834c76663b756393d04ebe7aceb8ea4059d44b7d2ae3ee4e9999aead6eR65) but I didn't like the workaround to fit in that process (manually constructing "4.13" + "healthy" and generating backup name from deployId without boot id)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I also expect that when we get to solving TODOs in this function, it might get renamed to resolve these special cases so all of this will be part of pre-run and what we have today will be "regular flow"

@pmtk pmtk force-pushed the 1091-from-4.13 branch from f7bf7fc to af74b24 Compare June 27, 2023 15:03
@pmtk pmtk force-pushed the 1091-from-4.13 branch from af74b24 to 3696ad1 Compare June 27, 2023 16:52
@dhellmann
Copy link
Copy Markdown
Contributor

/lgtm

That logic is easier to follow now, nice cleanup.

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

openshift-ci Bot commented Jun 27, 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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jun 27, 2023

@pmtk: The following tests 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/microshift-e2e-arm 3696ad1 link false /test microshift-e2e-arm
ci/prow/e2e-openshift-conformance-reduced-arm 3696ad1 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.

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