fix: COO-1282: avoid loop while setting plugin status#1017
Conversation
|
@jgbernalp: This pull request references COO-1282 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.22.0" version, but no target version was set. DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jgbernalp 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 |
29238ff to
c794634
Compare
| LastTransitionTime: metav1.Now(), | ||
| }, | ||
| } | ||
| meta.SetStatusCondition(&pl.Status.Conditions, metav1.Condition{ |
There was a problem hiding this comment.
SetStatusCondition returns a boolean that indicates if it was updated successfully or not. Should we look to handle these returns?
There was a problem hiding this comment.
The return value here represents if something changed or not. Not if it was an actual error, as this just mutates the conditions.
There was a problem hiding this comment.
So tracking this can avoid the if reflect.DeepEqual(oldStatus.Conditions, pl.Status.Conditions) {?
Not saying this needs changing but that seems at least like a good followup if correct.
There was a problem hiding this comment.
Got it. I misread Peter's initial comment.
fixes: COO-1282 Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
c794634 to
b494240
Compare
|
/lgtm |
|
/test observability-operator-e2e |
|
/override ci/prow/observability-operator-e2e |
|
@jgbernalp: Overrode contexts on behalf of jgbernalp: ci/prow/observability-operator-e2e DetailsIn 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-sigs/prow repository. |
fixes: COO-1282 Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
|
/cherry-pick release-1.4 |
|
@jgbernalp: new pull request created: #1019 DetailsIn 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-sigs/prow repository. |
No description provided.