-
Notifications
You must be signed in to change notification settings - Fork 427
OTA-1035: Allow testing adm upgrade status on mock data
#1595
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
OTA-1035: Allow testing adm upgrade status on mock data
#1595
Conversation
|
@petr-muller: This pull request references OTA-1035 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set. DetailsIn 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. |
|
/retest |
| // TODO: We can remove these flags once the idea about `oc adm upgrade status` stabilizes and the command | ||
| // is promoted out of the OC_ENABLE_CMD_UPGRADE_STATUS feature gate | ||
| flags.StringVar(&o.mockCvPath, "mock-clusterversion", "", "Path to a YAML ClusterVersion object to use for testing (will be removed later).") | ||
| flags.StringVar(&o.mockOperatorsPath, "mock-clusteroperators", "", "Path to a YAML ClusterOperatorList to use for testing (will be removed later).") |
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.
Did we want to add some fixtures to this to unit test known configs vs. expected output? Because running go test ./pkg/cli/admin/upgrade/status and having it consume mock data other folks have written and confirm that I haven't broken the output other folks were expecting in those situations would be nice. Mainly to start building a corpus of situations we want to cover, and as a way to track how our output in those situations evolves over time.
Also, no worries if you think those fixtures sound like overkill, or if they sound useful in the future, but not worth picking up yet. I'm also fine with a middle ground where we start a directory like pkg/cli/admin/upgrade/status/fixtures/happy-mid-update, etc. with the mock content in it, even if we don't version-control expected output yet.
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.
That sounds great, will do!
wking
left a comment
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.
Looks good to me. Adding a hold in case you want to tweak in response to this, but feel free to lift the hold without changes if none of that sounds right-now appealing ;)
/lgtm
/hold
|
/lgtm cancel I want to address Trevor's suggestion, canceling lgtm to avoid mistakenly lifting the hold |
The above really does not seem like it relates to my change? /test unit |
|
/hold cancel |
ebcb7bc to
57e9844
Compare
|
@petr-muller: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
wking
left a comment
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.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wking The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
[ART PR BUILD NOTIFIER] This PR has been included in build openshift-enterprise-cli-container-v4.15.0-202311130831.p0.g1d4a9af.assembly.stream for distgit openshift-enterprise-cli. |
Catching the docs up with 10c41f5 (add alerts to update health in oc adm upgrade status, 2024-04-25, openshift#1740). Also drop the enumeration that started when the file was created in 57e9844 (`adm upgrade status`: add fixture test, 2023-11-09, openshift#1595). Folks who care how many inputs and outputs there currently are can count for themselves, and this content is easier to maintain without having to bump later entry numbers when inserting an earlier entry.
While
oc adm upgrade statusis under development, logic is client-side, andbehind feature gate, it is useful to avoid relying on an actual upgrading
cluster in an interesting state at hand.
This will also allow us to capture interesting "stuck" upgrade cases and
back-test further development on previously seen interesting states.
I have added a simple improvement commit to this PR (emiting
<none>when a reason or message is empty) to illustrate: