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

OTA-1271: Create the oc adm upgrade recommend subcommand #1863

Conversation

DavidHurta
Copy link
Contributor

This PR will add the backbones for the new oc adm upgrade recommend subcommand.

The logic is copied over from an existing github.com/openshift/oc/pkg/cli/admin/upgrade package. The logic is to be changed over the upcoming iterations of development.

For the initial commit, the new recommend package contains the logic from the github.com/openshift/oc/pkg/cli/admin/upgrade package as of the 93286c9 commit. Only the logic regarding the default output of the oc adm upgrade command and outputs regarding available or available but not recommended updates was copied over.

This logic was placed behind a feature gate environment variable named OC_ENABLE_CMD_UPGRADE_RECOMMEND. The new subcommand can be tested by running:

$ OC_ENABLE_CMD_UPGRADE_RECOMMEND=true ./oc adm upgrade recommend

As most of the internal functions are not exported, the existing tests were copied over as well for the existing used functions in the new package recommend.

This pull request references https://issues.redhat.com/browse/OTA-1271

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

openshift-ci-robot commented Sep 2, 2024

@Davoska: This pull request references OTA-1271 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.18.0" version, but no target version was set.

In response to this:

This PR will add the backbones for the new oc adm upgrade recommend subcommand.

The logic is copied over from an existing github.com/openshift/oc/pkg/cli/admin/upgrade package. The logic is to be changed over the upcoming iterations of development.

For the initial commit, the new recommend package contains the logic from the github.com/openshift/oc/pkg/cli/admin/upgrade package as of the 93286c9 commit. Only the logic regarding the default output of the oc adm upgrade command and outputs regarding available or available but not recommended updates was copied over.

This logic was placed behind a feature gate environment variable named OC_ENABLE_CMD_UPGRADE_RECOMMEND. The new subcommand can be tested by running:

$ OC_ENABLE_CMD_UPGRADE_RECOMMEND=true ./oc adm upgrade recommend

As most of the internal functions are not exported, the existing tests were copied over as well for the existing used functions in the new package recommend.

This pull request references https://issues.redhat.com/browse/OTA-1271

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 2, 2024
@DavidHurta
Copy link
Contributor Author

/uncc ardaguclu deads2k

@DavidHurta
Copy link
Contributor Author

/cc @petr-muller @wking

@DavidHurta
Copy link
Contributor Author

/retest-required

1 similar comment
@DavidHurta
Copy link
Contributor Author

/retest-required

Copy link
Member

@wking wking left a comment

Choose a reason for hiding this comment

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

/lgtm

In case you want to address this nit:

/hold

But feel free to lift the hold without changing anything if you want to punt on expanding that string.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 3, 2024
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 3, 2024
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 4, 2024
Add the backbones for the new `oc adm upgrade recommend` subcommand.

The logic is copied over from an existing package `upgrade` [1]. The
logic is to be changed over the upcoming iterations of development.

For the initial commit, the new `recommend` package contains the logic
from the [1] package as of the [2] commit. Only the logic regarding the
default output of the `oc adm upgrade` command and outputs regarding
available or available but not recommended updates was copied over.

This logic was placed behind a feature gate environment variable named
`OC_ENABLE_CMD_UPGRADE_RECOMMEND`. The new subcommand can be tested by
running:

```
$ OC_ENABLE_CMD_UPGRADE_RECOMMEND=true ./oc adm upgrade recommend
```

As most of the internal functions are not exported, the existing tests
were copied over as well for the existing used functions in the new
package `recommend`.

[1] github.com/openshift/oc/pkg/cli/admin/upgrade
[2] 93286c9
Copy link
Member

@wking wking left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold cancel

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Sep 4, 2024
Copy link
Contributor

openshift-ci bot commented Sep 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Davoska, wking

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD b75ae2e and 2 for PR HEAD 95933a7 in total

2 similar comments
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD b75ae2e and 2 for PR HEAD 95933a7 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD b75ae2e and 2 for PR HEAD 95933a7 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD b904f99 and 1 for PR HEAD 95933a7 in total

@DavidHurta
Copy link
Contributor Author

/test all

@DavidHurta
Copy link
Contributor Author

/retest

@DavidHurta
Copy link
Contributor Author

/retest-required

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD ee70761 and 0 for PR HEAD 95933a7 in total

@openshift-ci-robot
Copy link

/hold

Revision 95933a7 was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 6, 2024
@DavidHurta
Copy link
Contributor Author

/retest

@DavidHurta
Copy link
Contributor Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 7, 2024
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD ee70761 and 2 for PR HEAD 95933a7 in total

4 similar comments
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD ee70761 and 2 for PR HEAD 95933a7 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD ee70761 and 2 for PR HEAD 95933a7 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD ee70761 and 2 for PR HEAD 95933a7 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD ee70761 and 2 for PR HEAD 95933a7 in total

Copy link
Contributor

openshift-ci bot commented Sep 9, 2024

@Davoska: 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-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 7ccae27 into openshift:master Sep 9, 2024
13 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-tools
This PR has been included in build ose-tools-container-v4.18.0-202409092310.p0.g7ccae27.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: openshift-enterprise-cli
This PR has been included in build openshift-enterprise-cli-container-v4.18.0-202409092310.p0.g7ccae27.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: openshift-enterprise-deployer
This PR has been included in build openshift-enterprise-deployer-container-v4.18.0-202409092310.p0.g7ccae27.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-cli-artifacts
This PR has been included in build ose-cli-artifacts-container-v4.18.0-202409092310.p0.g7ccae27.assembly.stream.el9.
All builds following this will include this PR.

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