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 1875247: Add package check for the channel head querying #1748
Bug 1875247: Add package check for the channel head querying #1748
Conversation
Hi @jianzhangbjz. Thanks for your PR. I'm waiting for a operator-framework member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/assign @kevinrizza |
/ok-to-test |
} | ||
|
||
} else if len(headCandidates) < 1 { | ||
return nil, fmt.Errorf("Not found the head for channel") |
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.
nit: can this error message be head of channel not found
?
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.
Sure, thanks!
next, ok := replaces[current] | ||
if !ok { | ||
break | ||
for _, v := range headCandidates { |
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.
Is this change just for the case where headCandidates == nil
? Is it necessary since above we are just already returning if that's the case?
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.
Not really, this change is for the situation of the len(headCandidates) > 1
. If there are multi packages in a channel, there will multi headCandidates
, return all of them here.
/retest |
e7d29fe
to
7f62712
Compare
This PR failed 1 out of 1 times with 2 individual failed tests and 4 skipped tests. A test is considered flaky if failed on multiple commits. totaltestcount: 1
|
/retitle Bug 1875247: Add package check for the channel head querying |
@jianzhangbjz: Re-titling can only be requested by trusted users, like repository collaborators. 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. |
@jianzhangbjz: This pull request references Bugzilla bug 1875247, which is invalid:
Comment 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. |
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.
Thanks for opening this PR.
I don't think we should be checking at runtime for a condition that should never occur -- that is, the arguments to sortChannel
should all be in the same package and channel.
Improving the errors that are returned when there are more or fewer than 1 head candidates would be great, though. Do you mind updating this change so that it only affects the errors that are returned?
if v.sourceInfo.Package != p { | ||
p = v.sourceInfo.Package | ||
} else { | ||
// if find multi heads in the same package, return error |
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.
This would only fire if two consecutive candidates were from the same package ([A A B]
vs. [A B A]
), which I don't think is the intention.
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.
@benluddy Thanks for your review and suggestions! I agreed. Update the error logs.
I think most of this was addressed with #1735, do we want to keep this open to address error messages / etc? |
7f62712
to
1429f13
Compare
/bugzilla refresh |
@jianzhangbjz: This pull request references Bugzilla bug 1875247, which is invalid:
Comment 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. |
/bugzilla refresh |
@jianzhangbjz: This pull request references Bugzilla bug 1875247, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
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. |
Co-authored-by: Ben Luddy <ben.luddy@gmail.com>
/approve |
/bugzilla refresh |
@benluddy: This pull request references Bugzilla bug 1875247, which is invalid:
Comment 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. |
/retest Looks good to me. Thanks for the contribution! This is just waiting for a second review and for the master branch to unfreeze (should happen in about a week). |
@jianzhangbjz: The following test failed, say
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/test-infra repository. I understand the commands that are listed here. |
/bugzilla refresh |
@benluddy: This pull request references Bugzilla bug 1875247, which is valid. 3 validation(s) were run on this bug
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. |
/retest |
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: benluddy, ecordell, jianzhangbjz 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
@jianzhangbjz: All pull requests linked via external trackers have merged: Bugzilla bug 1875247 has been moved to the MODIFIED state. 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. |
Description of the change:
OLM supports multi packages in a channel, so OLM should check the head bundle based on the package. Fix bug: https://bugzilla.redhat.com/show_bug.cgi?id=1875247
Any comments are welcome! Thanks!
Motivation for the change:
Supports multi packages for the channel head querying
Reviewer Checklist
/docs