-
Notifications
You must be signed in to change notification settings - Fork 551
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 a bug in deletion of webhook service for replacement #2606
Fix a bug in deletion of webhook service for replacement #2606
Conversation
Hi @orenc1. Thanks for your PR. I'm waiting for a operator-framework member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
(Removing the BZ from the title as it messes up downstream automation) /ok-to-test |
looks like the e2e failures were transient. |
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
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.
Thanks for submitting this fix @orenc1
/retest |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/lgtm |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
059b9ba
to
539cc69
Compare
/retest |
The condition that checks for an error with the webhook service deletion is based on the wrong variable, and the return statement is never reached, which leads to a continuous error when OLM tries to replace the webhook service on certain conditions Signed-off-by: orenc1 <[email protected]>
539cc69
to
67c533f
Compare
hi @awgreene do you think we are ready to rerun the CI? |
@@ -246,7 +246,7 @@ func (i *StrategyDeploymentInstaller) installCertRequirementsForDeployment(deplo | |||
|
|||
// Delete the Service to replace | |||
deleteErr := i.strategyClient.GetOpClient().DeleteService(service.GetNamespace(), service.GetName(), &metav1.DeleteOptions{}) | |||
if err != nil && !k8serrors.IsNotFound(deleteErr) { |
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 looks like something that should have been picked up by unit testing. Would it be a lot of effort to add a test?
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.
Since e2e is green, let's merge and put the unit test in a follow up PR. Would that work for you?
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, although I'm not sure how can we check this particular case in a unit test, in which the service could not be deleted and therefore the installCertRequirementsForDeployment
method returns an error.
I assume we'll need to use:
mockOpClient.EXPECT().DeleteService(namespace, "test-service", &metav1.DeleteOptions{}).Return(fmt.Errorf("could not delete existing service test-service"))
But not quite sure how to proceed.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: awgreene, dinhxuanvu, orenc1, timflannagan 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 |
/lgtm |
The condition that checks for an error with the webhook service deletion is based on the wrong variable, and the return statement is never reached, which leads to a continuous error when OLM tries to replace the webhook service on certain conditions
Signed-off-by: orenc1 [email protected]
Description of the change:
Motivation for the change:
https://bugzilla.redhat.com/show_bug.cgi?id=2048441
Reviewer Checklist
/doc