Repository navigation
Read the e2e Go version from go.mod and apply the safe go fix modernizers - #4677
Conversation
e60d1ef to
a137f54
Compare
|
Hey @Okabe-Junya , I'm currently bumping all dependencies, just so you know |
dd39794 to
e499087
Compare
|
Thank you for sharing and happy to hear that!! If so, I could leave this work to you. Could you handle instead?
WDYT about these? and could you include these in your PRs? (Or I could handle these stuffs instead :) ) |
e499087 to
be89226
Compare
|
Hi Nikola, thank you for all your work to release 0.15.0!! Could you have a look when you have time? Thank you!! |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Kubernetes-container e2e jobs retain a hard-coded Go image version and can drift from go.mod.
Review effort: Balanced
Findings: 1
What changed in this PR
Updates e2e Go-version selection and applies mechanical Go modernizations.
Changes:
- Parses
go.modto configuresetup-go, preferringtoolchain. - Promotes
golang.org/x/modto a direct dependency. - Uses modern range, maps, slices, strings, reflection, and
anyAPIs.
| File | Description |
|---|---|
testing/runtime/runtime.go |
Replaces interface{} with any. |
testing/kubectl.go |
Uses strings.SplitSeq. |
test/e2e/e2e_test.go |
Reads the e2e setup-go version from go.mod. |
logging/transport.go |
Replaces interface{} with any. |
logging/logger.go |
Uses slices.Contains. |
hash/hash.go |
Modernizes generic parameters to any. |
hash/fnv.go |
Modernizes variadic parameters to any. |
go.mod |
Makes golang.org/x/mod direct. |
controllers/actions.github.com/predicates_test.go |
Uses reflect.Type.Fields. |
controllers/actions.github.com/ephemeralrunnerset_controller_test.go |
Uses range-over-int. |
charts/gha-runner-scale-set/tests/template_test.go |
Uses maps.Copy. |
charts/gha-runner-scale-set-controller/tests/metrics_test.go |
Uses strings.SplitSeq. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
be89226 to
fef3b47
Compare
| if f.Toolchain != nil { | ||
| return strings.TrimPrefix(f.Toolchain.Name, "go") |

What
go fixmodernizers that are mechanical and self-contained, one family per commit: range-over-int,maps.Copy/slices.Contains,strings.SplitSeq,interface{}→any,reflect.Type.Fields