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 golang to 1.23.3 and golangci-lint to 1.60.3 #2087

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tuminoid
Copy link
Member

@tuminoid tuminoid commented Nov 12, 2024

  • Bump Golang to 1.23.3.
  • Bump Golangci-lint to 1.60.3 to support Go 1.23.
    1. Get rid of deprecated golangci-lint configs
    2. add timeout to the action, otherwise it'll be timed out in 1 minute. 15 minutes is consistent with "make lint" timeout.
  • Fix issues coming via new golangci-lint
    1. Fix new linter errors by removing the return value which is always nil (unparam linter), and thus meaningless.
    2. "exportloopref" is not needed from Go 1.22 onwards, replaced by "copyloopvar" in golangci-lint 1.60.2.
    3. Ambiguous string warnings in Wrapf fixed.
    4. Fix gosec issue about int32 overflow

Fixes: #2047

@metal3-io-bot metal3-io-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 12, 2024
@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from tuminoid. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@metal3-io-bot metal3-io-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 12, 2024
@tuminoid tuminoid changed the title WIP: bump golang to 1.23.3 and golangci-lint ot 1.60.1 WIP: 🌱 bump golang to 1.23.3 and golangci-lint ot 1.60.1 Nov 12, 2024
@tuminoid tuminoid changed the title WIP: 🌱 bump golang to 1.23.3 and golangci-lint ot 1.60.1 🌱 bump golang to 1.23.3 and golangci-lint ot 1.60.1 Nov 15, 2024
@metal3-io-bot metal3-io-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 15, 2024
@tuminoid tuminoid changed the title 🌱 bump golang to 1.23.3 and golangci-lint ot 1.60.1 🌱 bump golang to 1.23.3 and golangci-lint to 1.60.1 Nov 15, 2024
@tuminoid tuminoid changed the title 🌱 bump golang to 1.23.3 and golangci-lint to 1.60.1 🌱 bump golang to 1.23.3 and golangci-lint to 1.60.3 Nov 15, 2024
@tuminoid tuminoid force-pushed the tuomo/bump-golang-1.23 branch 5 times, most recently from 7fd0052 to 0fe0188 Compare November 15, 2024 13:28
@tuminoid
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main metal3-ubuntu-e2e-integration-test-main

Bump golang to 1.23.3 and golangci-lint to 1.60.3 which supports Go
1.23.

Get rid of deprecated golangci-lint configs, and add timeout to the
action, otherwise it'll be timed out in 1 minute. 15 minutes is
consistent with "make lint" timeout.

Linter fixes:
- Fix new linter errors by removing the return value which is always
nil (unparam linter), and thus meaningless.
- "exportloopref" is not needed from Go 1.22 onwards, replaced by
"copyloopvar" in golangci-lint 1.60.2.
- Ambiguous string warnings in Wrapf fixed.

Signed-off-by: Tuomo Tanskanen <[email protected]>
@tuminoid
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main metal3-ubuntu-e2e-integration-test-main

@tuminoid
Copy link
Member Author

@tuminoid
Copy link
Member Author

Our local "make lint" and "make test" don't definitely run same stuff as the linter action, this PR was locally clean long time ago, but PR checks came up with issues not seen locally. Quite sad setup ...

@tuminoid
Copy link
Member Author

Manual cherry-pick for 1.8 here: #2099

Release 1.7 does not need one as it is going out of support along with 1.9 and Golang 1.22 is supported for the rest of its life.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bump Golang to 1.23 and golangci-lint 1.60.x
2 participants