Problem
The Go module currently selects a Go container version from the top-level Go configuration, defaulting to 1.26 unless the caller passes version or base.
That makes all discovered modules use the same golang:<version>-alpine base. It is easy for this to drift from the go directive in a module's go.mod; for example, the e2e harness can use an older Go image while helpers/go-includes/go.mod requires a newer Go version.
Proposal
Automatically select the Go container image version from each module's go.mod when the caller has not explicitly configured a version or custom base.
Design questions to settle:
- Whether to use the
go directive only, or also honor toolchain when present.
- How to map patch-level directives like
go 1.26.1 to available golang image tags.
- How explicit
version should interact with per-module auto-selection.
- How custom
base should disable or bypass version selection.
Acceptance criteria
- A module with
go.mod declaring a newer Go version runs helper/test/generate containers with a compatible Go image by default.
- Workspaces with mixed module Go versions can run
lintAll, testAll, and generateAll without one global version forcing every module.
- Explicit
version remains a predictable override.
- Custom
base behavior remains unchanged and does not infer version.
- E2e coverage includes at least one module whose
go.mod requires a different Go version than the default.
Problem
The Go module currently selects a Go container version from the top-level
Goconfiguration, defaulting to1.26unless the caller passesversionorbase.That makes all discovered modules use the same
golang:<version>-alpinebase. It is easy for this to drift from thegodirective in a module'sgo.mod; for example, the e2e harness can use an older Go image whilehelpers/go-includes/go.modrequires a newer Go version.Proposal
Automatically select the Go container image version from each module's
go.modwhen the caller has not explicitly configured a version or custom base.Design questions to settle:
godirective only, or also honortoolchainwhen present.go 1.26.1to availablegolangimage tags.versionshould interact with per-module auto-selection.baseshould disable or bypass version selection.Acceptance criteria
go.moddeclaring a newer Go version runs helper/test/generate containers with a compatible Go image by default.lintAll,testAll, andgenerateAllwithout one global version forcing every module.versionremains a predictable override.basebehavior remains unchanged and does not inferversion.go.modrequires a different Go version than the default.