-
Notifications
You must be signed in to change notification settings - Fork 12
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
Drop usage of ManageError and ManageSuccess functions #93
Conversation
ManageError(...) and ManageSuccess(...) from https://github.com/redhat-cop/operator-utils have functionality to manage the status of the custom resource after each reconcile, either for success or for error situations. We are not currently using this functionality as the status of marin3r custom resources does not support this. Furthermore, ManageError is causing some spurious panics in reconcile loops when the custom resource cannot be retrieved for some reason. A first look into ManageError seems to point to the problem being that ManageError only restrains itslef from trying to access the fields in the custom resource if the api call returned a "not found" error. The panic occurs when a different api/client error is returned and then the function tries to access the struct, which just holds a nil value. The statement that ends up causing the panic is https://github.com/redhat-cop/operator-utils/blob/eca9bb2b140c4a08a13a5c570d5cdbcaa15a48b3/pkg/util/lockedresourcecontroller/resource-reconciler.go#L233
@roivaz: There are no kind on this issue.
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. |
/kind bug |
/ok-to-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.
/lgtm
LGTM label has been added. Git tree hash: 6a2fd8fa8642a751df47a7e46369f4f7ed77cf4c
|
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: roivaz 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 |
ManageError(...) and ManageSuccess(...) from https://github.com/redhat-cop/operator-utils have functionality to manage the status of the custom resource after each reconcile, either for success or for error situations. We are not currently using this functionality as the status of marin3r custom resources does not support this.
Furthermore, ManageError is causing some spurious panics in reconcile loops when the custom resource cannot be retrieved for some reason. A first look into ManageError seems to point to the problem being that ManageError only restrains itslef from trying to access the fields in the custom resource if the api call returned a "not found" error. The panic occurs when a different api/client error is returned and then the function tries to access the struct, which just holds a nil value. The statement that ends up causing the panic is https://github.com/redhat-cop/operator-utils/blob/eca9bb2b140c4a08a13a5c570d5cdbcaa15a48b3/pkg/util/lockedresourcecontroller/resource-reconciler.go#L233