-
Notifications
You must be signed in to change notification settings - Fork 91
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
misc bug fix in manage controller #1121
Conversation
Signed-off-by: Zhonghu Xu <xuzhonghu@huawei.com>
Codecov ReportAttention: Patch coverage is
Continue to review full report in Codecov by Sentry.
|
if apierrors.IsNotFound(err) { | ||
return nil | ||
} | ||
log.Errorf("failed to get pod %s/%s: %v", key.podNs, key.podName, err) |
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 error message is presented on line L290. My suggestion is to delete the log here and put the message in the err return value.
log.Errorf("failed to get pod %s/%s: %v", key.podNs, key.podName, err) | |
return fmt.Errorf("failed to get pod %s/%s: %v", key.podNs, key.podName, err) |
Signed-off-by: Zhonghu Xu <xuzhonghu@huawei.com>
} | ||
namespace, err := c.namespaceLister.Get(pod.Namespace) | ||
if err != nil { | ||
if !apierrors.IsNotFound(err) { |
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.
if !apierrors.IsNotFound(err) { | |
if apierrors.IsNotFound(err) { |
?
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: LiZhenCheng9527 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 |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This is motivated by @bitcoffeeiux refereencing this controller. I found there are something not perfect here.
Others are mostly clean code
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: