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

[v1.13] golangci: Enable errorlint #31796

Merged
merged 5 commits into from
Apr 23, 2024
Merged

[v1.13] golangci: Enable errorlint #31796

merged 5 commits into from
Apr 23, 2024

Conversation

jrajahalme
Copy link
Member

@jrajahalme jrajahalme commented Apr 5, 2024

Note: Added commit updating golangci-lint version used by make lint to match that of the GH Go lint action.

Once this PR is merged, a GitHub action will update the labels of these PRs:

 31458 23983

@jrajahalme jrajahalme added kind/backports This PR provides functionality previously merged into master. backport/1.13 This PR represents a backport for Cilium 1.13.x of a PR that was merged to main. labels Apr 5, 2024
@jrajahalme jrajahalme requested review from a team as code owners April 5, 2024 13:51
@jrajahalme
Copy link
Member Author

/test-backport-1.13

Copy link
Contributor

@chancez chancez left a comment

Choose a reason for hiding this comment

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

Hubble changes LGTM

@jrajahalme
Copy link
Member Author

Backported #23983 to bump vagrant boxes used for runtime tests to Go 1.20, which is already used in v1.13 development. G0 1.20 added support for multiple %w formatters in fmt.Errorf().

@jrajahalme
Copy link
Member Author

jrajahalme commented Apr 8, 2024

/test-backport-1.13

Job 'Cilium-PR-K8s-1.21-kernel-4.19' hit: #30802 (89.99% similarity)

@jrajahalme
Copy link
Member Author

/test-1.21-4.19

@jrajahalme
Copy link
Member Author

/test-1.23-4.19

@jrajahalme
Copy link
Member Author

/test-1.24-5.4

@jrajahalme
Copy link
Member Author

/test-1.26-net-next

@jrajahalme
Copy link
Member Author

/test-upstream-k8s

@jrajahalme
Copy link
Member Author

/test-1.24-5.4

@jrajahalme
Copy link
Member Author

/test-1.26-net-next

@jrajahalme
Copy link
Member Author

/test-1.24-5.4

Copy link
Contributor

@learnitall learnitall left a comment

Choose a reason for hiding this comment

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

Thanks!

@jrajahalme
Copy link
Member Author

rebased & resolved conflicts

@jrajahalme
Copy link
Member Author

jrajahalme commented Apr 16, 2024

/test-backport-1.13

Job 'Cilium-PR-K8s-1.22-kernel-4.19' hit: #30802 (92.04% similarity)

@jrajahalme
Copy link
Member Author

/test-runtime

@jrajahalme
Copy link
Member Author

/test-1.24-5.4

@jrajahalme
Copy link
Member Author

/test-1.22-4.19

@jrajahalme
Copy link
Member Author

jrajahalme commented Apr 17, 2024

/test-backport-1.13

Job 'Cilium-PR-K8s-1.22-kernel-4.19' hit: #30802 (90.95% similarity)

@jrajahalme
Copy link
Member Author

Added a commit to bump up VM provisioning timeouts

@jrajahalme
Copy link
Member Author

/test-backport-1.13

@aditighag aditighag added the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label Apr 17, 2024
jrajahalme and others added 5 commits April 18, 2024 12:57
Build already uses Go 1.20, so lint for it.

Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
[ upstream commit d20f15e ]

Enable errorlint in golangci-lint to catch uses of improper formatters
for Go errors. This helps avoid unnecessary error/warning logs that
cause CI flakes, when benign error cases are not caught due to failing
error unwrapping when a string or value formatter has been used instead
of the dedicated `%w`.

Related: #31147
Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
[ upstream commit fe46958 ]

Precede each `%w` formatter with a colon.

Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
[ upstream commit 197b763 ]

The new box versions include Go 1.20.1 which is now required for
development.

Backporter note: 4.9 box was not updated.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
vagrant-ci-start.sh script in test-1.24-5.4 jenkins workflow keeps timing
out due to the step "Installing NFS client" seemingly stalling for upto
15 minutes on the new box image. Bump the timeout to mitigate.

Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
@jrajahalme
Copy link
Member Author

Rebased

@jrajahalme jrajahalme removed the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label Apr 18, 2024
@jrajahalme
Copy link
Member Author

jrajahalme commented Apr 18, 2024

/test-backport-1.13

Job 'Cilium-PR-K8s-1.21-kernel-4.19' hit: #30802 (91.90% similarity)

@jrajahalme
Copy link
Member Author

/test-1.21-4.19

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Apr 23, 2024
@ti-mo ti-mo merged commit 1f332a0 into v1.13 Apr 23, 2024
148 of 149 checks passed
@ti-mo ti-mo deleted the fix-error-wrapping-1.13 branch April 23, 2024 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.13 This PR represents a backport for Cilium 1.13.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants