-
Notifications
You must be signed in to change notification settings - Fork 545
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
feat(sub): Include IP failure condition message in sub status condition #2262
feat(sub): Include IP failure condition message in sub status condition #2262
Conversation
f27a108
to
3ab249f
Compare
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
/hold |
Currently when an InstallPlan fails, due to bundle unpacking error is pending due to errors like invalid operatorgroup, or pending bundle unpacking job the reason is propagated to the Subscription that owns it. The message for the failure is however missing from the Subscription condition. eg ``` kind: Subscription status: conditions: - lastTransitionTime: "2021-07-07T17:55:20Z" reason: Installing status: "True" type: InstallPlanPending ``` This PR propagates the message assosiated with the reason in the InstallPlan condition when an InstallPlan is either pending, or has failed permanantly. eg ``` kind: Subscription status: conditions: - lastTransitionTime: "2021-07-07T17:55:20Z" message: no operator group found that is managing this namespace reason: Installing status: "True" type: InstallPlanPending ``` Signed-off-by: Anik Bhattacharjee <anikbhattacharya93@gmail.com>
3ab249f
to
303608d
Compare
/hold cancel |
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
} | ||
if cond := status.GetCondition(v1alpha1.InstallPlanInstalled); cond.Status != corev1.ConditionUnknown { | ||
if cond.Message != "" { | ||
str = cond.Message |
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 overwrites the str value found after iterating over the list of bundleLookups. This seems intentional, as a successful install of an IP should be communicated rather than failed bundleLookup messages.
Could we check if the IP was installed and return the str before iterating through the bundleLookups?
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.
Nice work @anik120
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: anik120, ankitathomas, awgreene 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 |
Description of the change:
Currently when an InstallPlan fails, due to bundle unpacking error
is pending due to errors like invalid operatorgroup, or pending bundle unpacking job
the reason is propagated to the Subscription that owns it. The message for the failure is
however missing from the Subscription condition.
eg
This PR propagates the message assosiated with the reason in the InstallPlan
condition when an InstallPlan is either pending, or has failed permanantly.
eg
Motivation for the change:
Reviewer Checklist
/doc