Skip to content
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

Address Go 1.24 govet errors #19486

Merged
merged 1 commit into from
Feb 26, 2025
Merged

Conversation

ivanvc
Copy link
Member

@ivanvc ivanvc commented Feb 26, 2025

With Go v1.24.0 being more strict on the errors usage, it raises some issues in the current codebase.

% (cd client/v3 && 'go' 'vet' './...')
stderr: # go.etcd.io/etcd/client/v3
stderr: # [go.etcd.io/etcd/client/v3]
stderr: ./retry_interceptor.go:354:48: non-constant format string in call to google.golang.org/grpc/status.Errorf
stderr: ./retry_interceptor.go:356:40: non-constant format string in call to google.golang.org/grpc/status.Errorf
stderr: ./retry_interceptor.go:358:39: non-constant format string in call to google.golang.org/grpc/status.Errorf

% (cd tests && 'go' 'vet' './...')
stderr: # go.etcd.io/etcd/tests/v3/integration
stderr: # [go.etcd.io/etcd/tests/v3/integration]
stderr: integration/v3_lease_test.go:1034:24: non-constant format string in call to fmt.Errorf
FAIL: (code:1):
  % (cd tests && 'go' 'vet' './...')

FAIL: 'run go vet ./...' checking failed (!=0 return code)
There was a Failure in module tests, aborting...
FAIL: 'govet' FAILED at Tue Feb 25 05:04:55 PM PST 2025

Ultimately, addressing these issues shouldn't have any impact on Go 1.23.

Part of #19417 / #19440

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

Signed-off-by: Ivan Valdes <ivan@vald.es>
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 68.91%. Comparing base (47e764f) to head (16b1460).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
client/v3/retry_interceptor.go 66.66% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
client/v3/retry_interceptor.go 65.61% <66.66%> (+0.90%) ⬆️

... and 24 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #19486      +/-   ##
==========================================
- Coverage   68.95%   68.91%   -0.04%     
==========================================
  Files         420      420              
  Lines       35762    35762              
==========================================
- Hits        24658    24647      -11     
- Misses       9677     9689      +12     
+ Partials     1427     1426       -1     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 47e764f...16b1460. Read the comment docs.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ahrtr ahrtr merged commit 6ecb6fb into etcd-io:main Feb 26, 2025
42 checks passed
@ivanvc ivanvc deleted the address-govet-1.24-errors branch February 26, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants