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

fix: enable errorlint in server directory (part 1) #18767

Closed
wants to merge 1 commit into from

Conversation

mmorel-35
Copy link
Contributor

This enable errorlint in packages server

Related to #18576

@k8s-ci-robot
Copy link

Hi @mmorel-35. Thanks for your PR.

I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

@codecov-commenter
Copy link

codecov-commenter commented Oct 22, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 49.01961% with 26 lines in your changes missing coverage. Please review.

Project coverage is 68.71%. Comparing base (bb381d4) to head (a21b94e).
Report is 4 commits behind head on main.

Current head a21b94e differs from pull request most recent head add6d6f

Please upload reports for the commit add6d6f to get more accurate results.

Files with missing lines Patch % Lines
server/etcdmain/etcd.go 0.00% 7 Missing ⚠️
server/etcdserver/bootstrap.go 0.00% 6 Missing ⚠️
server/etcdserver/api/v3rpc/watch.go 50.00% 2 Missing ⚠️
server/lease/leasehttp/http.go 0.00% 2 Missing ⚠️
server/storage/backend.go 0.00% 2 Missing ⚠️
server/storage/schema/membership.go 0.00% 2 Missing ⚠️
server/etcdmain/config.go 66.66% 1 Missing ⚠️
server/etcdserver/api/etcdhttp/peer.go 75.00% 1 Missing ⚠️
server/etcdserver/api/etcdhttp/utils.go 50.00% 1 Missing ⚠️
server/etcdserver/api/v2store/store.go 0.00% 1 Missing ⚠️
... and 1 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
Files with missing lines Coverage Δ
server/etcdserver/api/membership/cluster.go 88.53% <100.00%> (ø)
server/etcdserver/api/membership/errors.go 100.00% <100.00%> (ø)
server/etcdserver/api/membership/storev2.go 45.19% <100.00%> (ø)
server/etcdserver/corrupt.go 89.83% <100.00%> (ø)
server/storage/schema/schema.go 100.00% <100.00%> (ø)
server/etcdmain/config.go 65.00% <66.66%> (ø)
server/etcdserver/api/etcdhttp/peer.go 85.33% <75.00%> (ø)
server/etcdserver/api/etcdhttp/utils.go 39.13% <50.00%> (ø)
server/etcdserver/api/v2store/store.go 83.91% <0.00%> (ø)
server/etcdserver/server.go 81.05% <83.33%> (ø)
... and 6 more

... and 19 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #18767      +/-   ##
==========================================
+ Coverage   68.68%   68.71%   +0.02%     
==========================================
  Files         420      420              
  Lines       35504    35505       +1     
==========================================
+ Hits        24385    24396      +11     
+ Misses       9685     9677       -8     
+ Partials     1434     1432       -2     

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 bb381d4...add6d6f. Read the comment docs.

@ahrtr
Copy link
Member

ahrtr commented Oct 23, 2024

/ok-to-test

Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks

@mmorel-35
Copy link
Contributor Author

/test pull-etcd-integration-4-cpu-arm64

@mmorel-35
Copy link
Contributor Author

Hi @ahrtr

I see this message from @codecov-commenter :

Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Is there any intention to address this ?

@ahrtr
Copy link
Member

ahrtr commented Oct 23, 2024

Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Is there any intention to address this ?

Thank you for bringing this up. Where did you see the message?

I'd like to defer to @henrybear327 and @ivanvc to comment on this. Thanks.

@mmorel-35
Copy link
Contributor Author

It's in this PR and each of one I'm providing.

Can't you see this ?

image

@ivanvc
Copy link
Member

ivanvc commented Oct 23, 2024

I'd like to defer to @henrybear327 and @ivanvc to comment on this. Thanks.

This was briefly discussed in issue #18131 (comment) / #18143. At that point, it worked fine, but that banner/warning later started appearing (see how it was before #18143).

Let's track it in the original issue (cc. @henrybear327). Thanks, @mmorel-35, for raising awareness.

Copy link
Member

@jmhbnz jmhbnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Thanks @mmorel-35

I have added a comment #18131 (comment) in relation to the codecov warning.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, jmhbnz, mmorel-35

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

@mmorel-35
Copy link
Contributor Author

@ahrtr,

There is no suggested assignee here.
Do you know why ?
Who shall be assigned then ?

case nil:
case flag.ErrHelp:
switch {
case errors.Is(perr, nil):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this has different semantics than checking err == nil.
How this is an improvement?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmorel-35
Copy link
Contributor Author

mmorel-35 commented Oct 24, 2024

Sorry I’ll have to start over with #18780

@k8s-ci-robot
Copy link

@mmorel-35: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-etcd-unit-test-arm64 4445265 link true /test pull-etcd-unit-test-arm64
pull-etcd-e2e-arm64 4445265 link true /test pull-etcd-e2e-arm64
pull-etcd-integration-2-cpu-arm64 4445265 link true /test pull-etcd-integration-2-cpu-arm64
pull-etcd-integration-1-cpu-arm64 4445265 link true /test pull-etcd-integration-1-cpu-arm64
pull-etcd-integration-1-cpu-amd64 4445265 link true /test pull-etcd-integration-1-cpu-amd64
pull-etcd-govulncheck 4445265 link true /test pull-etcd-govulncheck
pull-etcd-verify 4445265 link true /test pull-etcd-verify
pull-etcd-unit-test-386 4445265 link true /test pull-etcd-unit-test-386
pull-etcd-integration-4-cpu-amd64 4445265 link true /test pull-etcd-integration-4-cpu-amd64
pull-etcd-e2e-amd64 4445265 link true /test pull-etcd-e2e-amd64
pull-etcd-unit-test-amd64 4445265 link true /test pull-etcd-unit-test-amd64
pull-etcd-e2e-386 4445265 link true /test pull-etcd-e2e-386
pull-etcd-build 4445265 link true /test pull-etcd-build
pull-etcd-integration-4-cpu-arm64 4445265 link true /test pull-etcd-integration-4-cpu-arm64
pull-etcd-robustness-arm64 4445265 link true /test pull-etcd-robustness-arm64
pull-etcd-integration-2-cpu-amd64 4445265 link true /test pull-etcd-integration-2-cpu-amd64
pull-etcd-robustness-amd64 4445265 link true /test pull-etcd-robustness-amd64

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

@mmorel-35 mmorel-35 deleted the server/errorlint branch October 24, 2024 15:18
@ivanvc
Copy link
Member

ivanvc commented Oct 24, 2024

@ahrtr,

There is no suggested assignee here. Do you know why ? Who shall be assigned then ?

Hi @mmorel-35, given the size of the etcd team, I don't think we're currently using the assignee field in pull requests. Feel free to keep adding them or skip them 😅. We have some maintainers who are on leave and others who are not tech leads. The tech leads are @ahrtr and @serathius :)

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.

7 participants