-
Notifications
You must be signed in to change notification settings - Fork 10.2k
[2025-11-03] Manual Dependency Bump #20907
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
base: main
Are you sure you want to change the base?
Conversation
The static check doesn't know that cobra will exit prematurely. And
thinks that leaderCli can be nil later on:
../etcdctl/ctlv3/command/move_leader_command.go:78:14: SA5011: possible nil pointer dereference (staticcheck)
resp, err = leaderCli.MoveLeader(ctx, target)
Add a return (although unreachable), so SA5011 doesn't flag this issue.
Signed-off-by: Ivan Valdes <ivan@vald.es>
Reference: etcd-io#20864 Signed-off-by: Ivan Valdes <ivan@vald.es>
Reference: etcd-io#20866 Signed-off-by: Ivan Valdes <ivan@vald.es>
…2.6.0 Reference: etcd-io#20880 Signed-off-by: Ivan Valdes <ivan@vald.es>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ivanvc 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 |
Reference: etcd-io#20882 Signed-off-by: Ivan Valdes <ivan@vald.es>
Reference: etcd-io#20883 Signed-off-by: Ivan Valdes <ivan@vald.es>
4c0c09b to
bbd8431
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 25 files with indirect coverage changes @@ Coverage Diff @@
## main #20907 +/- ##
=======================================
Coverage 69.17% 69.18%
=======================================
Files 422 422
Lines 34839 34840 +1
=======================================
+ Hits 24100 24104 +4
+ Misses 9341 9335 -6
- Partials 1398 1401 +3 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
/retest |
| } | ||
| if leaderCli == nil { | ||
| cobrautl.ExitWithError(cobrautl.ExitBadArgs, fmt.Errorf("no leader endpoint given at %v", eps)) | ||
| return |
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.
Why add this? Did the linter complain this?
It will never be executed. cobrautl.ExitWithError exits the process.
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.
I documented this in the ea665b5 commit message.
The static check doesn't know that cobra will exit prematurely. And thinks that leaderCli can be nil later on:
../etcdctl/ctlv3/command/move_leader_command.go:78:14: SA5011: possible nil pointer dereference (staticcheck)
resp, err = leaderCli.MoveLeader(ctx, target)Add a return (although unreachable), so SA5011 doesn't flag this issue.
The other option would be to add a comment to ignore the warning.
Reference: https://staticcheck.dev/docs/checks/#SA5011
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, in that case, pls add a comment above to clarify why only adding return here (note that there are lots of cobrautl.ExitWithError usage). Not everyone read commit message.
This pull request completes this week's (and 2025-10-27) etcd dependency updates following our dependency roster and dependency management instructions.
Dependabot raised the following PRs:
Bumped
Fully indirect
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.