-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
delete err when return _ #45709
delete err when return _ #45709
Conversation
Hi @YuPengZTE. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with 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. I understand the commands that are listed here. |
What is the need for this? It looks like two lines down, it calls for err, so I'm not sure why we wouldn't want to return it. |
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.
getAllDaemonSetPods
will always return nil
error. We don't need to return error in getAllDaemonSetPods
at all.
@k8s-bot ok to test |
/release-note-none |
@k8s-bot ok to test |
@@ -38,7 +38,7 @@ func (dsc *DaemonSetsController) rollingUpdate(ds *extensions.DaemonSet) error { | |||
return fmt.Errorf("couldn't get node to daemon pod mapping for daemon set %q: %v", ds.Name, err) | |||
} | |||
|
|||
_, oldPods, err := dsc.getAllDaemonSetPods(ds, nodeToDaemonPods) |
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 getAllDaemonSetPods is always returning nil
just change the function itself to not return an error.
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.
OK, good idea.
Changes have done, PTAL.
Thanks @lukaszo
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
/approve |
/assign @janetkuo |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: YuPengZTE, janetkuo, lukaszo
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 45709, 41939) |
Signed-off-by: yupengzte yu.peng36@zte.com.cn
What this PR does / why we need it:
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
Release note: