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

Bump golangci-lint to v1.58.0 #4930

Merged
merged 1 commit into from
May 15, 2024

Conversation

zhzhuang-zju
Copy link
Contributor

@zhzhuang-zju zhzhuang-zju commented May 11, 2024

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
Bump golangci-lint to v1.58.0. The following tasks are included:

  • Update the golangci-lint version in hack/verify-staticcheck.sh
  • The configuration option run.skip-dirs is deprecated, use issues.exclude-dirs instead.
  • The configuration option run.skip-dirs-use-default is deprecated, use issues.exclude-dirs-use-default instead.
  • Fix newly scanned errors

Which issue(s) this PR fixes:
Fixes #4907

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@karmada-bot karmada-bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label May 11, 2024
@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 11, 2024
@liangyuanpeng
Copy link
Contributor

since this is the last task, so i think you can fix the issue with fixes #4907

@codecov-commenter
Copy link

codecov-commenter commented May 11, 2024

Codecov Report

Attention: Patch coverage is 34.88372% with 28 lines in your changes are missing coverage. Please review.

Project coverage is 53.19%. Comparing base (4ccffcc) to head (309c677).

Files Patch % Lines
pkg/util/helper/predicate.go 69.23% 4 Missing ⚠️
pkg/controllers/status/common.go 0.00% 3 Missing ⚠️
pkg/karmadactl/token/token.go 0.00% 0 Missing and 3 partials ⚠️
...acefuleviction/crb_graceful_eviction_controller.go 0.00% 2 Missing ⚠️
...racefuleviction/rb_graceful_eviction_controller.go 0.00% 2 Missing ⚠️
...controllers/unifiedauth/unified_auth_controller.go 0.00% 2 Missing ⚠️
operator/pkg/util/util.go 50.00% 1 Missing ⚠️
...ionfailover/crb_application_failover_controller.go 0.00% 1 Missing ⚠️
...tionfailover/rb_application_failover_controller.go 0.00% 1 Missing ⚠️
...ers/binding/cluster_resource_binding_controller.go 0.00% 1 Missing ⚠️
... and 8 more

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

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4930   +/-   ##
=======================================
  Coverage   53.18%   53.19%           
=======================================
  Files         252      252           
  Lines       20510    20510           
=======================================
+ Hits        10909    10911    +2     
+ Misses       8882     8880    -2     
  Partials      719      719           
Flag Coverage Δ
unittests 53.19% <34.88%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

.golangci.yml Outdated Show resolved Hide resolved
@@ -82,6 +82,7 @@ func DoRequest(urlPath string, token string) (int, error) {

// #nosec
Copy link
Member

Choose a reason for hiding this comment

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

Do we not need this line anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's no longer needed. I'll remove it.

Copy link
Member

Choose a reason for hiding this comment

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

Does this PR need to wait for #4934?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no need

Signed-off-by: zhzhuang-zju <m17799853869@163.com>
Comment on lines +116 to +119
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{corev1.ServiceAccountUIDKey: uuid},
},
Data: map[string][]byte{key: []byte(value)},
Copy link
Member

Choose a reason for hiding this comment

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

Can you remind me why ObjectMeta and Data are required here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function retainSecretServiceAccountToken is used to retain the uid and data of observed secret when its type is SA. Therefore the input secret of its test case should contain ObjectMeta(for uid) and Data. The previous implementations didn't actually test the ability to retain uid and data, because ObjectMeta and Data weren't used when creating test case secrets

Copy link
Member

Choose a reason for hiding this comment

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

Got it, thanks.

@XiShanYongYe-Chang I'm not sure if you have to revisit this test at #4940 after this.

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label May 15, 2024
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 15, 2024
@karmada-bot karmada-bot merged commit 6cfed59 into karmada-io:master May 15, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bump Kubernetes related dependencies
6 participants