Skip to content

Conversation

@faiq
Copy link
Contributor

@faiq faiq commented Dec 8, 2025

What type of PR is this?
/kind bug

What this PR does / why we need it:

bumps golangci lint to work with go 1.24+

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Checklist:

  • squashed commits
  • includes documentation
  • includes emoji in title
  • adds unit tests
  • adds or updates e2e tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. needs-priority labels Dec 8, 2025
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 8, 2025
@dlipovetsky
Copy link
Contributor

/approve
/lgtm

Thank you!

Fixes the problem described in #5792 (comment)

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

LGTM label has been added.

Git tree hash: dc91c08ef862a03f29d8982b90296bfbac48c09d

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dlipovetsky

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 Dec 8, 2025
@faiq faiq force-pushed the faiq/bump-golint-ci branch from 3c0cfe4 to d6529ed Compare December 8, 2025 21:11
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 8, 2025
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 8, 2025
@faiq faiq force-pushed the faiq/bump-golint-ci branch 2 times, most recently from 33f99a9 to 4e6cc9f Compare December 9, 2025 17:58
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 9, 2025
@faiq faiq force-pushed the faiq/bump-golint-ci branch 5 times, most recently from 863fb3b to b28f9be Compare December 9, 2025 19:50
@faiq
Copy link
Contributor Author

faiq commented Dec 9, 2025

/test pull-cluster-api-provider-aws-e2e-blocking

@faiq faiq force-pushed the faiq/bump-golint-ci branch from b28f9be to 8ecc4f4 Compare December 9, 2025 20:46
@faiq faiq force-pushed the faiq/bump-golint-ci branch 5 times, most recently from bfe75dd to f5a6466 Compare December 9, 2025 23:28
@faiq faiq force-pushed the faiq/bump-golint-ci branch from f5a6466 to 9c9071e Compare December 9, 2025 23:45
@dlipovetsky
Copy link
Contributor

dlipovetsky commented Dec 10, 2025

cd hack/tools; /home/runner/work/cluster-api-provider-aws/cluster-api-provider-aws/hack/tools/bin/golangci-lint-v2.5.0 custom --verbose
level=info msg="Cloning golangci-lint repository"
level=info msg="error: invalid key:  advice.detachedHead\nfatal: unable to write parameters to config file\n"
Error: build process: clone golangci-lint: git clone --branch v2.5.0 --single-branch --depth 1 -c advice.detachedHead=false -q https://github.com/golangci/golangci-lint.git: exit status 128
The command is terminated due to an error: build process: clone golangci-lint: git clone --branch v2.5.0 --single-branch --depth 1 -c advice.detachedHead=false -q https://github.com/golangci/golangci-lint.git: exit status 128

We use golangci-lint to build the Kubernetes API Linter (KAL), and golangci-lint calls git clone with some flags. But git v2.52.0 breaks flag parsing. What worked previously no longer works. Unfortunately, we have no control over the way golangci-lint calls git.

Here are some issues reported for other projects that call git with flags:

Looks like golangci-lint fixed this in golangci/golangci-lint#6205, and released the fix in https://github.com/golangci/golangci-lint/releases/tag/v2.7.0

@faiq Please try the v2.7.0 release in this PR 🙏

@chrischdi
Copy link
Member

Ack, golangci-lint v2.7.0 solves this issue.

We also tackled it in CAPI:

@damdo
Copy link
Member

damdo commented Dec 10, 2025

I'd say let's go with the same approach that core CAPI went with :)

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. kind/bug Categorizes issue or PR as related to a bug. needs-priority release-note-none Denotes a PR that doesn't merit a release note. 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.

5 participants