-
Notifications
You must be signed in to change notification settings - Fork 107
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
fix(status): do not set Unknown back to component for every loop on reconcile #979
Conversation
@@ -278,13 +278,21 @@ func (r *DataScienceClusterReconciler) reconcileSubComponent(ctx context.Context | |||
componentName := component.GetComponentName() | |||
|
|||
enabled := component.GetManagementState() == v1.Managed | |||
|
|||
isExistStatus := 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.
Probably no need, you have assignment right below.
status.SetComponentCondition(&saved.Status.Conditions, componentName, status.ReconcileInit, message, corev1.ConditionUnknown) | ||
|
||
// only set to init condition e.g Unknonw for the very first time when component is not in the list | ||
if !isExistStatus { |
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.
Looks like the whole update is under the condition
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.
yes, the idea is to, only make this call, if we find the component in the installcomponents list,
it indicates if this is happening after upgrade operator or it is another new reconcile. so we can skip the Unknown showing after it 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.
Yeah, but should you skip UpdateWithRetry() call in this case at all?
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.
ah, i see your point.
- init is only set for the very first time - after that component not in the installed list then use Unknown - otherwise, even it is not installed it has gone thro once so True of False Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ykaliuta 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 |
the failure in the e2e is due to a missing tag on CFO 1.4.0 |
/test opendatahub-operator-e2e |
…econcile (opendatahub-io#979) * fix(status): do not flip back to Unknown when loop reconcile component - init is only set for the very first time - after that component not in the installed list then use Unknown - otherwise, even it is not installed it has gone thro once so True of False Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update: code review Signed-off-by: Wen Zhou <wenzhou@redhat.com> --------- Signed-off-by: Wen Zhou <wenzhou@redhat.com>
ref: https://issues.redhat.com/browse/RHOAIENG-415
Description
How Has This Been Tested?
local build quay.io/wenzhou/opendatahub-operator-catalog:v2.10.415-1
Merge criteria: