-
Notifications
You must be signed in to change notification settings - Fork 562
Clear (existing) error cond from Subscription, once error resolved #3166
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
Clear (existing) error cond from Subscription, once error resolved #3166
Conversation
a4ffc39
to
3227583
Compare
/retest |
/retest |
3227583
to
f8c215b
Compare
Generally looks good to me. But @m1kola has some quyestions. |
@tmshort there was a change I needed to do in the e2e test to reflect "BundleUnpacking cond is now removed instead of being set to false" in the e2e test 😅 Made that change, all tests should pass now. |
The func `removeSubsCond` takes in a list of pointers to Subscription objects, modifies the objects that the pointers point to, but return a new list of those pointers. A [PR](operator-framework#2942) included in the v0.25.0 release [changed the way the output of that function was being used](https://github.com/operator-framework/operator-lifecycle-manager/pull/2942/files#diff-a1760d9b7ac1e93734eea675d8d8938c96a50e995434b163c6f77c91bace9990R1146-R1155) leading to a regression. This PR fixes the `removeSubsCond` function, fixing the regression as a result. Closes operator-framework#3162 Signed-off-by: Anik Bhattacharjee <[email protected]>
f8c215b
to
0cb11cb
Compare
/lgtm |
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.
I'm a bit on the fence about removing the condition instead of setting it to False (see comments below), but other than that - looks good.
Type: v1alpha1.SubscriptionBundleUnpacking, | ||
Status: corev1.ConditionFalse, | ||
}) | ||
o.removeSubsCond(subs, v1alpha1.SubscriptionBundleUnpacking) |
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.
If we want to keep the condition, I think alternative fix will be something like this:
o.removeSubsCond(subs, v1alpha1.SubscriptionBundleUnpacking) | |
o.setSubsCond(subs, v1alpha1.SubscriptionCondition{ | |
Type: v1alpha1.SubscriptionBundleUnpacking, | |
Status: corev1.ConditionFalse, | |
}) |
Because setSubsCond
returns a new slice of pointers containing updated subs only (similar to old implementation of removeSubsCond
).
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.
Removing condition can potentially break clients, but given the fact:
- It is relatively recent change
- And not consistent with other conditions
I think it might be ok to remove it.
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.
My vote would be to remove it. Reasons I say that are:
- When I asked around I wasn't able to get a "a user asked for it and hence it was added in there" answer.
- Which feeds into the doubts about the usefulness of clients needing to know if BundleUnpacking is true or false. As opposed to for example, the usefulness of clients needing to know if
ResolutionFailed
is true or false.
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.
Ship it!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: anik120, m1kola, tmshort 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 |
…ror resolved Upstream fix: operator-framework/operator-lifecycle-manager#3166 Upstream-repository: operator-lifecycle-manager Upstream-commit: 54da66a9996632315827ba37e14823de6405b4d9 Signed-off-by: Anik Bhattacharjee <[email protected]>
However, this test is skipped for upstream, and runs only downstream. This PR is a follow up to operator-framework#3166 to reflect the `BundleUnpacking` condition removal in the remaining test.
PR operator-framework#3166 removes the `BundleUnpacking` condition once resolution is successful. PR operator-framework#3166 [modified an e2e test](operator-framework@54da66a#diff-11f70fc71ac22d725767916f562789de88d06eb9ebe19f337a59fd7035a3ca2dR2448) to reflect that change. However, the test being fixed in this PR is skipped for upstream, and runs only downstream.This PR is a follow up to operator-framework#3166 to reflect the `BundleUnpacking` condition removal in the remaining test.
PR operator-framework#3166 removes the `BundleUnpacking` condition once resolution is successful. PR operator-framework#3166 [modified an e2e test](operator-framework@54da66a#diff-11f70fc71ac22d725767916f562789de88d06eb9ebe19f337a59fd7035a3ca2dR2448) to reflect that change. However, the test being fixed in this PR is skipped for upstream, and runs only downstream.This PR is a follow up to operator-framework#3166 to reflect the `BundleUnpacking` condition removal in the remaining test. Signed-off-by: Anik Bhattacharjee <[email protected]>
PR #3166 removes the `BundleUnpacking` condition once resolution is successful. PR #3166 [modified an e2e test](54da66a#diff-11f70fc71ac22d725767916f562789de88d06eb9ebe19f337a59fd7035a3ca2dR2448) to reflect that change. However, the test being fixed in this PR is skipped for upstream, and runs only downstream.This PR is a follow up to #3166 to reflect the `BundleUnpacking` condition removal in the remaining test. Signed-off-by: Anik Bhattacharjee <[email protected]>
Description of the change:
The func
removeSubsCond
takes in a list of pointers to Subscription objects, modifies theobjects that the pointers point to, but return a new list of those pointers. A PR included in
the v0.25.0 release changed the way the output of that function was being used leading to a regression.
This PR fixes the
removeSubsCond
function, fixing the regression as a result.Motivation for the change:
Closes #3162
Reviewer Checklist
/doc
[FLAKE]
are truly flaky and have an issue