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

Download golangci-lint instead of building it #226

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

hrak
Copy link
Contributor

@hrak hrak commented Mar 8, 2023

Description of changes:

This PR downloads golangci-lint instead of building it, as recommended by the authors of golangci-lint, and similar to how its done in CAPI

The PR also bumps the version of golangci-lint from v1.46.2 to v1.51.2 and staticcheck from v0.3.1 to 2023.1.2 (v0.4.2)

This will also eventually be required for upgrading the clusterapi dependency, because while testing with clusterapi 1.2.11 i had to update to minimal go 1.19, which required a golangci-lint update, and ran into the issue outlined here .

Testing performed:

make build

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@netlify
Copy link

netlify bot commented Mar 8, 2023

Deploy Preview for kubernetes-sigs-cluster-api-cloudstack ready!

Name Link
🔨 Latest commit 62fac75
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-cloudstack/deploys/641425440ad1dd000893d1ed
😎 Deploy Preview https://deploy-preview-226--kubernetes-sigs-cluster-api-cloudstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 8, 2023
@k8s-ci-robot k8s-ci-robot requested review from davidjumani and dims March 8, 2023 09:22
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 8, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @hrak. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 8, 2023
@@ -21,7 +21,6 @@ package tools
import (
_ "github.com/a8m/envsubst"
_ "github.com/golang/mock/mockgen"
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
Copy link
Member

Choose a reason for hiding this comment

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

If I'm not mistaken, tools like dependabot will struggle to flag anything not in the manifest.

Do you have any insight?

Copy link
Contributor Author

@hrak hrak Mar 14, 2023

Choose a reason for hiding this comment

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

Yes, it does mean you will lose dependabot bumps, but it also means we can move forward to Go 1.19 / 1.20, use the recommended way of installing it, and do it the same as most other CAPI related projects (See 1 2)

trying to install a recent version using go build / go install on Go >= 1.19 results in import "github.com/t-yuki/gocover-cobertura" is a program, not an importable package

Copy link
Member

Choose a reason for hiding this comment

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

Ah, that's painful. Thanks!

@hrak
Copy link
Contributor Author

hrak commented Mar 16, 2023

A little more on the issue this is trying to solve: ryancurrah/gomodguard#33

Another way of working around the issue is shown here where they've changed the build tag for the tools to be something other than tools

@chrisdoherty4
Copy link
Member

/lgtm

@k8s-ci-robot
Copy link
Contributor

@chrisdoherty4: changing LGTM is restricted to collaborators

In response to this:

/lgtm

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/test-infra repository.

@jweite-amazon
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 16, 2023
@hrak hrak force-pushed the golangci-lint-download branch from be57597 to 62fac75 Compare March 17, 2023 08:30
@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 17, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: chrisdoherty4, hrak
Once this PR has been reviewed and has the lgtm label, please ask for approval from jweite-amazon. 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

@jweite-amazon
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 17, 2023
@jweite-amazon jweite-amazon merged commit cecc7f9 into kubernetes-sigs:main Mar 17, 2023
@jweite-amazon
Copy link
Contributor

jweite-amazon commented Mar 17, 2023

Thank you for your contributions @hrak.

@k8s-ci-robot
Copy link
Contributor

@hrak: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
capi-provider-cloudstack-presubmit-build 62fac75 link true /test capi-provider-cloudstack-presubmit-build
capi-provider-cloudstack-presubmit-unit-test 62fac75 link true /test capi-provider-cloudstack-presubmit-unit-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants