-
Notifications
You must be signed in to change notification settings - Fork 8
build: Update all tools and fix up for golangci-lint v2 #1108
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates various tool configurations and code formatting in preparation for golangci-lint v2 while reworking some method calls across the codebase. Key changes include:
- Updating field and method references (e.g. using obj.Generation, invoking e.Start instead of e.Manager.Start).
- Adjusting assertions in test files and auto-generated deep copy functions.
- Bumping controller-gen versions in CRD annotations and updating .golangci.yml settings.
Reviewed Changes
Copilot reviewed 21 out of 25 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/handlers/generic/lifecycle/addons/helmaddon.go | Updated to use obj.Generation instead of obj.ObjectMeta.Generation. |
| pkg/controllers/namespacesync/copy_test.go | Updated Get() method invocation from env.Client.Get to env.Get. |
| internal/test/envtest/environment.go | Replaced Manager-based calls with unified methods on e (Start, Delete, Patch, Create). |
| internal/test/builder/builders.go | Refactored label assignment to use machine.Labels directly. |
| hack/tools/fetch-images/main.go | Reformatted call to unstructured.NestedStringMap into multiple lines. |
| hack/tools/coredns-versions/main.go | Reformatted warning output and multiline flag settings. |
| api/versions/coredns_test.go | Swapped assert.Equal with assert.Empty for improved clarity. |
| api/v1alpha1/zz_generated.deepcopy.go | Auto-generated deep copy function formatting adjustments. |
| Various CRD YAML files | Incremented the controller-gen version annotation from v0.17.2 to v0.17.3. |
| .golangci.yml | Updated version setting, linter defaults, and formatting settings. |
Files not reviewed (4)
- devbox.json: Language not supported
- hack/flakes/flake.nix: Language not supported
- make/apis.mk: Language not supported
- make/go.mk: Language not supported
thunderboltsid
approved these changes
Apr 24, 2025
5cf810a to
b521a73
Compare
mhrabovcin
approved these changes
Apr 25, 2025
Merged
dkoshkin
added a commit
that referenced
this pull request
Jun 3, 2025
🤖 I have created a release *beep* *boop* --- ## 0.29.0 (2025-06-03) <!-- Release notes generated using configuration in .github/release.yaml at main --> ## What's Changed ### Exciting New Features 🎉 * feat: Explicitly disable profiling for CP components by @jimmidyson in #1109 * feat: add registry addon by @dkoshkin in #1116 * feat: use registryMirror addon as Containerd mirror by @dkoshkin in #1117 * feat: Add k8s version logic for external cloud-provider flag by @jimmidyson in #1134 * feat: Update all addon versions by @jimmidyson in #1139 * feat: generate a self-signed cert for registry addon by @dkoshkin in #1127 * feat: CIS benchmark improvements by @jimmidyson in #1137 * feat: update handler version by @dkoshkin in #1144 ### Fixes 🔧 * fix: uses consistent spelling by @faiq in #1115 * fix: Ensure metallb speaker runs on tainted nodepools by @jimmidyson in #1138 * fix: Avoid rollout due to updated auditpolicy handler by @jimmidyson in #1147 ### Other Changes * ci: include correct kube-vip version when listing images by @dkoshkin in #1113 * build: Update all tools and fix up for golangci-lint v2 by @jimmidyson in #1108 * test(e2e): Disable Calico tests by @jimmidyson in #1120 * test(e2e): Update Nutanix images by @jimmidyson in #1121 * refactor: Register types with scheme using pattern from Cluster API by @dlipovetsky in #1124 * ci: use templating for capx tests by @faiq in #1123 * test: Return root module root dir when using go.work by @dlipovetsky in #1125 * build: Update Docker k8s versions by @jimmidyson in #1133 * refactor: Remove unnecessary loop vars by @jimmidyson in #1146 **Full Changelog**: v0.28.2...v0.29.0 --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reworked formatting to use
golangci-lint fmtand applied formatting and linting changes to all files.