chore: bump Go to 1.26.5 and centralize the Go version in go.mod#295
Conversation
📝 WalkthroughWalkthroughThis PR updates Go version references to 1.26.5 in go.mod files and documentation, changes CI and Makefile logic to read the Go toolchain version from go.mod instead of hardcoded values, and rewires Kind-related version outputs in the operator CI workflow. It also refactors operator/versions.sh and operator/versions.yaml to use generic YAML-path lookups, with dependent Makefile and documentation updates for the new keys and shell usage. Estimated code review effort: 4 (Complex) | ~45 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/operator-ci.yaml:
- Around line 76-80: The workflow outputs in the operator CI job expose the same
value twice via kind-version and kind-node-image-version, so keep only one
canonical alias and remove the duplicate from the outputs block. Update the
workflow definition that maps steps.versions.outputs so only the preferred
output name remains, and verify any references to the removed alias are not
needed elsewhere in the repo.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 496e9ae2-e559-4d73-8bc1-f772fbbb028a
📒 Files selected for processing (14)
.claude/CLAUDE.md.github/workflows/agent-ci.yaml.github/workflows/agent-go-ci.yaml.github/workflows/cli-release.yaml.github/workflows/operator-ci.yaml.gitlab-ci.ymlagent/go/go.moddocs/development.mdoperator/Makefileoperator/README.mdoperator/deps.mkoperator/go.modoperator/versions.shoperator/versions.yaml
💤 Files with no reviewable changes (1)
- .gitlab-ci.yml
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/operator-ci.yaml:
- Line 372: The GO_VERSION build-arg is inlining a GitHub expression in the run
script, which breaks the step’s existing injection-safe pattern used for
GIT_SHA, VERSION, and PLATFORM. Update the workflow step that builds the
operator image so the GO_VERSION value is passed through env and referenced as a
shell variable in the run command, matching the same hardening approach already
used in this step.
In `@operator/versions.sh`:
- Around line 166-171: The sourcing branch in versions.sh applies whatever
`_versions_export` emits even if that helper fails partway, so update the `else`
path to check the export command’s exit status before running `eval`. Use the
existing `_versions_export` and `eval` flow, but capture the command output and
abort with an error message if `_versions_export` returns nonzero, so the caller
shell doesn’t end up with a partial `VERSIONS_*` environment.
- Around line 95-102: _versions_export is emitting single-quoted shell
assignments without escaping embedded quotes, which can break the generated
output and make the later eval unsafe. Update _versions_export to shell-escape
both the env name/value correctly before printing, using the existing
_versions_export/_versions_env_name/_versions_value flow so any quote characters
in versions.yaml values are handled safely.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 8b1eeef8-185d-4642-be1e-7d12f200fcd3
📒 Files selected for processing (14)
.claude/CLAUDE.md.github/workflows/agent-ci.yaml.github/workflows/agent-go-ci.yaml.github/workflows/cli-release.yaml.github/workflows/operator-ci.yaml.gitlab-ci.ymlagent/go/go.moddocs/development.mdoperator/Makefileoperator/README.mdoperator/deps.mkoperator/go.modoperator/versions.shoperator/versions.yaml
💤 Files with no reviewable changes (1)
- .gitlab-ci.yml
Coverage Report for CI Build 29047186718Warning No base build found for commit Coverage: 82.243%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/operator-ci.yaml:
- Line 349: The GO_VERSION derivation in the workflow currently reads only the
go directive, so update the shell logic used in the operator-ci job to prefer a
toolchain entry from go.mod when present and fall back to the go version
otherwise. Make the same change in both places where GO_VERSION is computed so
the container build and CI stay aligned with the version selected by
actions/setup-go.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 0ce7304e-0424-47c8-9a1f-ad24e4c4e695
📒 Files selected for processing (14)
.claude/CLAUDE.md.github/workflows/agent-ci.yaml.github/workflows/agent-go-ci.yaml.github/workflows/cli-release.yaml.github/workflows/operator-ci.yaml.gitlab-ci.ymlagent/go/go.moddocs/development.mdoperator/Makefileoperator/README.mdoperator/deps.mkoperator/go.modoperator/versions.shoperator/versions.yaml
💤 Files with no reviewable changes (1)
- .gitlab-ci.yml
Bump the Go toolchain to 1.26.5 in both modules. go.mod is now the single source for the Go version: CI setup-go uses go-version-file, the operator Makefile and image build-arg read it via awk, and versions.yaml no longer carries go.version. Refactor operator/versions.sh into a generic reader. --get takes a yq path and forwards yq flags; --print and --export enumerate the keys in versions.yaml and derive each consumer name from the key path, so there is no hardcoded name table. envtest.k8s.version is nested so it derives to the ENVTEST_K8S_VERSION the test lib expects. --get now fails on a missing key, and sourcing in a non-bash shell points at eval "$(versions.sh --export)". Also drop the unused gitlint-ci include from .gitlab-ci.yml. Signed-off-by: Brian Lockwood <lockwobr@gmail.com>
Summary
Bumps the Go toolchain to 1.26.5 and removes the version duplication that came with it.
go.modis now the single source for the Go version, andoperator/versions.shis refactored into a generic, data-driven reader.Go version → single source (
go.mod)go.modmust carry the Go version as a literal anyway, so everything reads from it:actions/setup-gousesgo-version-file: <module>/go.mod(matching the existingmerge-gate.yaml/release.yml).MakefileGO_VERSIONand the image build-arg read it viaawk.GO_VERSION-prefix and addoperator/go.modtohashFiles(same invalidation, no value needed).versions.yamlno longer carriesgo.version; the workflowenv: GO_VERSIONliterals are gone.versions.shrefactoroperator/versions.yamlnow owns only the k8s/kind/envtest versions, andoperator/versions.shreads it generically:--get <yq-path> [yq-args...]prepends the root.and forwards yq flags; a missing key is an error (exit 1) instead of printingnull.--print(GitHub Actions output shape) and--export(export NAME=valuefor eval/source) enumerate the yaml's keys and derive each consumer name from the key path. No hardcoded name mapping.envtest.k8s.versionyields theENVTEST_K8S_VERSIONthe test lib expects.eval "$(./versions.sh --export)"instead of failing with a misleading error.CI
--printconsumers inoperator-ci.yaml/agent-ci.yamlwere repointed to the derived key names; job-output names and downstreamneeds.*.outputs.*are unchanged.Also
Drops the unused
gitlint-ciinclude from.gitlab-ci.yml(unrelated cleanup).Testing
versions.sh --get/--print/--exportexercised locally, including against the CI-pinnedyq v4.44.3; missing-key exits 1; shellcheck clean.GO_VERSION=1.26.5fromgo.mod; theawkbuild-arg agrees.go build ./...).yq -eandgit grep; GitHub Actions logic verified by inspection + parse (not run locally).docs/development.md,versions.yamlheader,--help).