Bump Go to 1.26 and use newer language features#85
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request attempts to upgrade Go from version 1.25 to 1.26 and modernize the codebase by replacing the k8s.io/utils/ptr package with Go's built-in new() function and using the standard library maps.Copy() function. However, the PR contains critical bugs in the implementation of these changes.
Changes:
- Update Go version to 1.26.0 across go.mod, go.work, api/go.mod, Dockerfile, and GitHub Actions
- Replace
ptr.To()calls withnew()for creating pointers to primitive values - Replace manual map copying loops with
maps.Copy()function
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| go.work | Updates Go version directive to 1.26.0 |
| go.mod | Updates Go version directive to 1.26.0 |
| api/go.mod | Updates Go version directive to 1.26.0 |
| Dockerfile | Updates base image to golang:1.26.0-alpine3.23 |
| .github/actions/setup-go/action.yml | Updates default Go version to 1.26 |
| internal/webhooks/buildkit_template.go | Removes ptr import, attempts to replace ptr.To() with new() |
| internal/controllers/buildkit/builder_test.go | Removes ptr import, attempts to replace ptr.To() with new() |
| internal/controllers/buildkit/builder.go | Removes ptr import, attempts to replace ptr.To() with new() |
| internal/controllers/buildkit/resources/merge.go | Adds maps import, replaces manual map copying with maps.Copy() |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #85 +/- ##
==========================================
- Coverage 76.30% 76.22% -0.09%
==========================================
Files 14 14
Lines 574 572 -2
==========================================
- Hits 438 436 -2
Misses 117 117
Partials 19 19 ☔ View full report in Codecov by Sentry. |
No description provided.