Removes error silencing from IsFailForwardEnabled - #2957
Conversation
|
Skipping CI for Draft Pull Request. |
02cff6c to
e781c82
Compare
f7656be to
c682d1a
Compare
| name: "SubscriptionOmitsChannel", | ||
| clusterState: []runtime.Object{ | ||
| newSub(namespace, "package", "", catalog), | ||
| newOperatorGroup("foo", namespace), |
There was a problem hiding this comment.
Note: there is a lot of copy-pasted newOperatorGroup("foo", namespace) lines. What is not very visible in the diff is that there are some calls for newOperatorGroup where strategy is set to fail forward.
Previously presence of OG in cluster state was not required in this test (and in others in this PR) because was len(ogs) == 0 condition in IsFailForwardEnabled which was returning a default value for a timeout and now we explicitly return an error in this case. So tests had to be updated.
|
/approve |
perdasilva
left a comment
There was a problem hiding this comment.
lgtm - thank you!!!!
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: m1kola, perdasilva 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 |
c682d1a to
579a0d7
Compare
Signed-off-by: Mikalai Radchuk <mradchuk@redhat.com>
579a0d7 to
d6158bf
Compare
|
/lgtm |
Description of the change:
IsFailForwardEnabledis currently silincing errors fromListmethod. This change makes it propogate errors to the caller.IsFailForwardEnabledcurrently has a specifal case for situation where there are 0OperatorGroups(len(ogs) == 0) which no longer makes sense: oneOperatorGroupsis required. This now falls into more genericlen(ogs) != 1condition.Main change is in
pkg/controller/registry/resolver/fail_forward.go. Everything else is just updates required to fix tests: many of them were working without a fake operator group before.Motivation for the change:
Follow up from this conversation - #2952 (comment).
Architectural changes:
Change in how we handle zero
OperatorGroups.Testing remarks:
Existing tests should cover the change.
Reviewer Checklist
/doc[FLAKE]are truly flaky and have an issue