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

Merged
merged 1 commit into from
Nov 18, 2024

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 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 force-pushed the tuomo/bump-golang-1.23 branch from 39c1cdb to da72ba7 Compare November 15, 2024 12:54
@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 force-pushed the tuomo/bump-golang-1.23 branch from da72ba7 to 36807b0 Compare November 15, 2024 13:04
@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 <tuomo.tanskanen@est.tech>
@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.

@tuminoid
Copy link
Member Author

/retest

Copy link
Member Author

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

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

Left some self-comments on the PR that we should consider.

baremetal/metal3machine_manager.go Show resolved Hide resolved
test/e2e/remediation.go Show resolved Hide resolved
Copy link
Member

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

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

/approve

baremetal/metal3machine_manager.go Show resolved Hide resolved
@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lentzi90

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

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 18, 2024
Copy link
Member

@kashifest kashifest left a comment

Choose a reason for hiding this comment

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

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 18, 2024
@tuminoid
Copy link
Member Author

/retest

@tuminoid
Copy link
Member Author

If this aborts again due to timeout, I'll override it, as the log is filled with unrelated Jenkins agent issues and network flakes. Ubuntu has passed long time ago.

@tuminoid
Copy link
Member Author

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

@metal3-io-bot
Copy link
Contributor

@tuminoid: Overrode contexts on behalf of tuminoid: metal3-centos-e2e-integration-test-main

In response to this:

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

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.

@metal3-io-bot metal3-io-bot merged commit 71a1a5f into metal3-io:main Nov 18, 2024
21 checks passed
@metal3-io-bot metal3-io-bot deleted the tuomo/bump-golang-1.23 branch November 18, 2024 13:07
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. lgtm Indicates that a PR is ready to be merged. 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
4 participants