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

Update the installation URL of golangci-lint #784

Conversation

JohnTitor
Copy link
Contributor

@JohnTitor JohnTitor commented May 25, 2022

Installation via https://install.goreleaser.com has been deprecated and now the server is unavailable, this replaces it with a recommend way stated on https://golangci-lint.run/usage/install/.
This will fix the CI issue e.g. https://github.com/kubernetes-sigs/krew/actions/runs/2384314784

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 25, 2022
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 25, 2022
@@ -23,7 +23,7 @@ gopath="$(go env GOPATH)"
if ! [[ -x "$gopath/bin/golangci-lint" ]]; then
echo >&2 'Installing golangci-lint'
curl --silent --fail --location \
https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b "$gopath/bin" v1.44.0
https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$gopath/bin" v1.44.0
Copy link
Member

Choose a reason for hiding this comment

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

let's just do go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2 as the project page suggests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that the project doesn't recommend it:

Install from Source
Note: such go install/go get installation aren't guaranteed to work. We recommend using binary installation.

Anyway, pushed the change via d80edeb (it's a bit slower than the binary installation, comparing https://github.com/kubernetes-sigs/krew/runs/6596083051?check_suite_focus=true and https://github.com/kubernetes-sigs/krew/runs/6592749482?check_suite_focus=true).
Didn't update the version because some newer versions have a lint issue, see #778 (comment).

Copy link
Member

Choose a reason for hiding this comment

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

we can revert back to https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$gopath/bin" v1.44.0 if you want.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm new here and don't have a strong opinion, but using the precompiled binary seems enough on CI. Dropped the commit but if someone prefers go install one, I'm happy to push back it :)

@JohnTitor JohnTitor force-pushed the update-install-url-golangci-lint branch from d80edeb to a9a0f28 Compare May 25, 2022 22:17
@ahmetb
Copy link
Member

ahmetb commented Jun 6, 2022

/lgtm
/approve
Thanks!

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmetb, JohnTitor

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 6, 2022
@k8s-ci-robot k8s-ci-robot merged commit beb4c91 into kubernetes-sigs:master Jun 6, 2022
@JohnTitor JohnTitor deleted the update-install-url-golangci-lint branch June 6, 2022 07:53
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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants