-
Notifications
You must be signed in to change notification settings - Fork 238
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
OCPBUGS-42740: PrivateLink Actuators should return errors on failure. #2483
Conversation
@jstuever: This pull request references Jira Issue OCPBUGS-42740, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. In 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. |
5bcae7d
to
85941f7
Compare
Prior to this change, the GCP Link actuator failed to return an error when a failure was experienced while creating certian cloud resources. This is because the actuators were overriding the value of the err varliabe prior to using it in a following return statement. As a result, the controller would assume the link actuator was successful and continue calling the hub actuator. This caused, the PrivateLinkFailed condidtion would show an error regarding the failed provisioning of DNS resources instead of the underlying issue in the link actuator. This change fixes the problem by placing the secondary assignment of the err variable into the corrisponding if block, thereby maintaining the origional value of the variable. This causes the final return to act as expected by condition of the origional error. It also ensures the origional error is always returned while logging any condition status update errorrs inline.
85941f7
to
2f649fb
Compare
/cc @2uasimojo |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2483 +/- ##
==========================================
+ Coverage 46.26% 46.85% +0.59%
==========================================
Files 279 279
Lines 32901 33363 +462
==========================================
+ Hits 15221 15632 +411
- Misses 16402 16439 +37
- Partials 1278 1292 +14
|
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 2uasimojo, jstuever 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 |
/override "Red Hat Konflux / hive-operator-enterprise-contract / hive" |
@2uasimojo: Overrode contexts on behalf of 2uasimojo: Red Hat Konflux / hive-operator-enterprise-contract / hive In 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. |
@jstuever: all tests passed! Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
56d6d64
into
openshift:master
@jstuever: Jira Issue OCPBUGS-42740: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-42740 has been moved to the MODIFIED state. In 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. |
Prior to this change, the GCP Link actuator failed to return an error when a failure was experienced while creating certian cloud resources. This is because the actuators were overriding the value of the err varliabe prior to using it in a following return statement. As a result, the controller would assume the link actuator was successful and continue calling the hub actuator. This caused, the PrivateLinkFailed condidtion would show an error regarding the failed provisioning of DNS resources instead of the underlying issue in the link actuator.
This change fixes the problem by placing the secondary assignment of the err variable into the corrisponding if block, thereby maintaining the origional value of the variable. This causes the final return to act as expected by condition of the origional error. It also ensures the origional error is always returned while logging any condition status update errorrs inline.
https://issues.redhat.com/browse/OCPBUGS-42740