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 lint: move to Github Action #658

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

jkh52
Copy link
Contributor

@jkh52 jkh52 commented Oct 3, 2024

Update golangci-lint from 1.54.0 to v1.56.2, per needed for go1.22 per golangci/golangci-lint#4273.

Introduce a Github Action based linter.

Fix resulting findings.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 3, 2024
@jkh52
Copy link
Contributor Author

jkh52 commented Oct 3, 2024

Now, golangci-lint appears to succeed but then "hangs". Any ideas, @liangyuanpeng or @cheftako ?

golangci-lint supports go1.22 since v1.56.0, per golangci/golangci-lint#4273.

Switch to using Github Actions for lint check.
@jkh52
Copy link
Contributor Author

jkh52 commented Oct 4, 2024

The lint authors recommend using Github Actions: https://golangci-lint.run/welcome/install/#ci-installation

After we get this in place, we can remove the problematic linter from test-infra.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 4, 2024
@jkh52
Copy link
Contributor Author

jkh52 commented Oct 4, 2024

Although pull-apiserver-network-proxy-make-lint-master continues to fail, see the successful golangci-lint / lint (pull_request).

/retest

@jkh52
Copy link
Contributor Author

jkh52 commented Oct 7, 2024

@cheftako friendly ping.

It would be nice to get lint working again against mainline. I would have liked to simply adjust Makefile but I never solved a remaining mystery why it hangs when invoked from kubekins / test-infra. At the same linter version it succeeds very quickly via Github Action. Migrating lint to Github Actions might be superior going forward, even if we did not have that mystery.

@jkh52 jkh52 changed the title Fix lint: upgrade to support go1.22 Fix lint: move to Github Action Oct 8, 2024
@liangyuanpeng
Copy link
Contributor

I first tried to reproduce it in the local /github action, but with no luck, I am trying to test it by upgrading golangci-lint to 1.59.0 in #664

@cheftako
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 15, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheftako, jkh52

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

@k8s-ci-robot k8s-ci-robot merged commit 71572c2 into kubernetes-sigs:master Oct 15, 2024
23 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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", 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.

4 participants