Skip to content

ci(agent): bump golangci-lint to v2.14.0, let Renovate track the tools (MK8S-470) - #35

Open
ezekiel-alexrod wants to merge 2 commits into
mainfrom
chore/MK8S-470-golangci-lint-v2.14
Open

ezekiel-alexrod wants to merge 2 commits into
mainfrom
chore/MK8S-470-golangci-lint-v2.14

Conversation

@ezekiel-alexrod

@ezekiel-alexrod ezekiel-alexrod commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Component

agent, ci, docs

Problem

Renovate's Go 1.27 bump (#14) fails lint: golangci-lint v2.12.2 can't read Go 1.27 export data (export data version 5 is greater than maximum supported version 4). Renovate never proposed a newer linter, and it doesn't see kustomize or controller-gen either: nothing tells it where those versions live.

Fix

Start with the second commit, it's the one with a choice in it. The first one is mechanical.

  • golangci-lint v2.12.2 -> v2.14.0, in agent/Makefile and agent/.custom-gcl.yml. v2.15.0 came out on Oct 16, Renovate will bring it after the usual delay.
  • # renovate: annotations on golangci-lint (both files), kustomize and controller-gen. The platform-renovate custom managers then bump them, golangci-lint in one PR for both files.
  • v2.14.0 raises one modernize finding on main: errors.As -> errors.AsType in internal/puller/puller_test.go.
  • The test job now fails when make test leaves a diff. It regenerated the CRDs but never compared them, so a controller-gen bump would have merged with stale CRDs. Such a bump now needs make manifests committed, like any API change. CONTRIBUTING.md said the opposite, it's updated.

The Go 1.27 bump itself comes in a follow-up PR once this one is merged.

Test

Check Result
make -C agent lint on main + this PR, Go 1.26.9, after cache clean 0 issues
make -C agent test on main + this PR OK, and git status --porcelain stays empty
same with CONTROLLER_TOOLS_VERSION=v0.23.0 the CRD changes, the new check fails as it should
v2.14.0 on main + #14, Go 1.27.2 lint runs again: this finding plus the embedlit ones of the follow-up
platform-renovate Makefile and YAML regexes on both files match golangci-lint v2.14.0, kustomize v5.8.1, controller-tools v0.21.0
actionlint .github/workflows/agent-ci.yaml OK

Out of scope

  • The Go 1.27 bump, see above.
  • The logcheck plugin stays on latest in .custom-gcl.yml.
  • make lint rebuilds golangci-lint on every run: the rule comes as is from the kubebuilder scaffold.

Relates-to: MK8S-470

v2.12.2 can't read Go 1.27 export data, so the lint job fails on the
Go 1.27 bump. Renovate didn't track the linter here: the annotations
let the platform-renovate custom managers pick up the Makefile and
.custom-gcl.yml together.

v2.14.0 raises one modernize finding on main, fixed with
errors.AsType.

Refs: MK8S-470
Comment thread agent/Makefile
@ezekiel-alexrod
ezekiel-alexrod marked this pull request as draft October 16, 2026 16:46
Renovate didn't see the kustomize and controller-gen versions in the
Makefile. The annotations let the platform-renovate Makefile custom
manager bump them.

The test job regenerated the CRDs, RBAC and deepcopy code but never
compared the result with what is committed, so a controller-gen bump
or an edited API type could merge with stale files. The job now fails
when make test leaves a diff. YEAR is fixed in the Makefile, or every
generated header would change each January.

Nothing ran kustomize in CI, so the job now builds config/default too.

Refs: MK8S-470
@ezekiel-alexrod ezekiel-alexrod changed the title chore(agent): bump golangci-lint to v2.14.0 (MK8S-470) ci(agent): bump golangci-lint to v2.14.0, let Renovate track the tools (MK8S-470) Oct 19, 2026
@ezekiel-alexrod
ezekiel-alexrod marked this pull request as ready for review October 19, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant