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

Bug 1989504: The code logic of channel clear is ambiguous, as well as the help info and output messages #891

Merged
merged 1 commit into from Aug 31, 2021

Conversation

shellyyang1989
Copy link
Contributor

Prior to this change, we have:
When current update channel is unknown, it still requires override.

$ oc adm upgrade
Cluster version is 4.9.0-0.nightly-2021-07-31-093358
Upstream: https://github.com/shellyyang1989/upgrade-cincy/raw/master/cincy5.json
Channel: channel-f (available channels: channel-a, channel-b)
Updates:
VERSION                           IMAGE
4.9.0-0.nightly-2021-08-01-102437 registry.ci.openshift.org/ocp/release@sha256:421304acff8d9c5bf24365c42460721f9ae1392dd20fbf642c118c163b7731e5

$ oc adm upgrade channel
error: the requested channel "" is not one of the available channels (channel-a, channel-b), you must pass --allow-explicit-channel to continue

When desired channel is not specified (or empty), it will clear the channel, but the error message is not clear enough.

$ oc adm upgrade channel
error: the requested channel "" is not one of the available channels (channel-a, channel-b), you must pass --allow-explicit-channel to continue

When a unknown channel is specified with --allow-explicit-channel, there is no message indicating the channel is being set.

$ oc adm upgrade channel channel-f --allow-explicit-channel
warning: The requested channel "channel-f" is not one of the available channels (channel-a, channel-b).  You have used --allow-explicit-channel to proceed anyway.

When available channels are empty and desired channel is specified, there is no message indicating the channel is being set.

$ oc adm upgrade channel channel-d 
warning: No channels known to be compatible with the current version "4.9.0-0.nightly-2021-07-31-093358"; unable to validate "channel-d".

We don't have multiple default upstream.
Upstream is unset, so the cluster will use an appropriate default.

With the change, we will have:

When available channels are empty and desired channel is specified, the output message is indicating the channel is being set.

./oc adm upgrade
Cluster version is 4.9.0-0.nightly-2021-07-31-093358

warning: Cannot display available updates:
  Reason: NoChannel
  Message: The update channel has not been configured.

$ ./oc adm upgrade channel channel-a
warning: No channels known to be compatible with the current version "4.9.0-0.nightly-2021-07-31-093358"; unable to validate "channel-a". Setting the update channel to "channel-a" anyway.

When a unknown channel is specified with --allow-explicit-channel, the output message is indicating the channel is being set.

./oc adm upgrade
Cluster version is 4.9.0-0.nightly-2021-07-31-093358

Upstream: https://github.com/shellyyang1989/upgrade-cincy/raw/master/cincy5.json
Channel: channel-a (available channels: channel-a, channel-b)
Updates:

VERSION                           IMAGE
4.9.0-0.nightly-2021-08-01-102437 registry.ci.openshift.org/ocp/release@sha256:421304acff8d9c5bf24365c42460721f9ae1392dd20fbf642c118c163b7731e5
./oc adm upgrade channel channel-d --allow-explicit-channel
warning: The requested channel "channel-d" is not one of the available channels (channel-a, channel-b). You have used --allow-explicit-channel to proceed anyway. Setting the update channel to "channel-d".

Clearing an unknown channel does not require override.

./oc adm upgrade
Cluster version is 4.9.0-0.nightly-2021-07-31-093358

Upstream: https://github.com/shellyyang1989/upgrade-cincy/raw/master/cincy5.json
Channel: channel-d (available channels: channel-a, channel-b)
Updates:

VERSION                           IMAGE
4.9.0-0.nightly-2021-08-01-102437 registry.ci.openshift.org/ocp/release@sha256:421304acff8d9c5bf24365c42460721f9ae1392dd20fbf642c118c163b7731e5
 ./oc adm upgrade channel
warning: Clearing channel "channel-d"; cluster will no longer request available update recommendations.

Clearing a known channel requires override.

./oc adm upgrade
Cluster version is 4.9.0-0.nightly-2021-07-31-093358

Upstream: https://github.com/shellyyang1989/upgrade-cincy/raw/master/cincy5.json
Channel: channel-a (available channels: channel-a, channel-b)
Updates:

VERSION                           IMAGE
4.9.0-0.nightly-2021-08-01-102437 registry.ci.openshift.org/ocp/release@sha256:421304acff8d9c5bf24365c42460721f9ae1392dd20fbf642c118c163b7731e5

./oc adm upgrade channel
error: You are requesting to clear the update channel. The current channel "channel-a" is one of available channels (channel-a, channel-b), you must pass --allow-explicit-channel to continue

./oc adm upgrade channel --allow-explicit-channel
warning: Clearing channel "channel-a"; cluster will no longer request available update recommendations.

./oc adm upgrade
Cluster version is 4.9.0-0.nightly-2021-07-31-093358

warning: Cannot display available updates:
  Reason: NoChannel
  Message: The update channel has not been configured.

Add more detailed information to help info and output messages. And
make a change to not require --allow-explicit-channel when clearing
an unkown channel. More info is in this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1989504
@shellyyang1989
Copy link
Contributor Author

/retest

@shellyyang1989
Copy link
Contributor Author

/assign @vrutkovs

@vrutkovs
Copy link
Member

/approve
/bugzilla refresh
/cc @jottofar

Looks good, leaving this for Trevor/Jack to double check

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 19, 2021

@vrutkovs: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

/approve
/bugzilla refresh
/cc @jottofar

Looks good, leaving this for Trevor/Jack to double check

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 a review from jottofar August 19, 2021 07:31
@vrutkovs
Copy link
Member

/retitle Bug 1989504: The code logic of channel clear is ambiguous, as well as the help info and output messages

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 19, 2021
@openshift-ci openshift-ci bot changed the title Bug 1989504 - The code logic of channel clear is ambiguous, as well as the help info and output messages Bug 1989504: The code logic of channel clear is ambiguous, as well as the help info and output messages Aug 19, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 19, 2021

@shellyyang1989: An error was encountered querying GitHub for users with public email (yanyang@redhat.com) for bug 1989504 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. non-200 OK status code: 403 Forbidden body: "{\n \"documentation_url\": \"https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#secondary-rate-limits\",\n \"message\": \"You have exceeded a secondary rate limit. Please wait a few minutes before you try again.\"\n}\n"

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1989504: The code logic of channel clear is ambiguous, as well as the help info and output messages

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.

@shellyyang1989
Copy link
Contributor Author

Thanks Vadim!
@wking Could you please double check? It's been updated based on your comments. Thanks!

@wking
Copy link
Member

wking commented Aug 24, 2021

I think the Setting the update channel to %q anyway and (no change) bits are redundant, because the exit code already covers whether the command succeeds or fails. But I am not bothered enough by that to want to hold up this change. I like the known distinction when clearing channels, so we don't bother with --allow-explicit-channel in the "clearing an unknown current channel" case.

/lgtm
/bugzilla refresh

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 24, 2021

@wking: This pull request references Bugzilla bug 1989504, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.9.0) matches configured target release for branch (4.9.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @shellyyang1989

In response to this:

I think the Setting the update channel to %q anyway and (no change) bits are redundant, because the exit code already covers whether the command succeeds or fails. But I am not bothered enough by that to want to hold up this change. I like the known distinction when clearing channels, so we don't bother with --allow-explicit-channel in the "clearing an unknown current channel" case.

/lgtm
/bugzilla refresh

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 bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Aug 24, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 24, 2021

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: shellyyang1989.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@wking: This pull request references Bugzilla bug 1989504, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.9.0) matches configured target release for branch (4.9.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @shellyyang1989

In response to this:

I think the Setting the update channel to %q anyway and (no change) bits are redundant, because the exit code already covers whether the command succeeds or fails. But I am not bothered enough by that to want to hold up this change. I like the known distinction when clearing channels, so we don't bother with --allow-explicit-channel in the "clearing an unknown current channel" case.

/lgtm
/bugzilla refresh

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.

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 lgtm Indicates that a PR is ready to be merged. label Aug 24, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 24, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shellyyang1989, vrutkovs, 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

@vrutkovs
Copy link
Member

/retest

@shellyyang1989
Copy link
Contributor Author

The failed test seems irrelevant to this PR.

@vrutkovs
Copy link
Member

Agreed
/skip

to make it pass

@vrutkovs
Copy link
Member

Ah, its required, guess I'll have to

/retest

it until it passes

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

11 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@wking
Copy link
Member

wking commented Aug 28, 2021

@soltysh, there are some unrelated firing alerts and repeated events failing e2e-agnostic-cmd. Can you:

/override ci/prow/e2e-agnostic-cmd

so this can land, while folks are digging into and fixing those?

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

14 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 20e7f65 into openshift:master Aug 31, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 31, 2021

@shellyyang1989: All pull requests linked via external trackers have merged:

Bugzilla bug 1989504 has been moved to the MODIFIED state.

In response to this:

Bug 1989504: The code logic of channel clear is ambiguous, as well as the help info and output messages

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.

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. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants