make generate
modifies Kubernetes version permanently
#4611
Labels
kind/bug
Categorizes issue or PR as related to a bug.
What broke? What's expected?
The
make generate
command currently changes the value ofkubernetesVendorVersion
incmd/version.go
permanently, possibly as a side effect of kubebuilder issue #4588.I believe that, IF the version is only needed for generating documentation, persisting this change introduces an unnecessary diff in commits, as shown in this PR review.
The desired behavior is to reset the value to
unknown
after the process completes to avoid the diff and potential side effects.Taking a look into the
Makefile
might be a good starting point to find out what may be causing this issue.Reproducing this issue
kubernetesVendorVersion
variable in thecmd/version.go
file is initially set tounknown
.make generate
.cmd/version.go
file and observe that the change inkubernetesVendorVersion
value has persisted.KubeBuilder (CLI) Version
Version: main.version{KubeBuilderVersion:"4.5.1", KubernetesVendor:"1.32.1", GitCommit:"0ace7a8753c52b35014e43edc2a0b0454b78e769", BuildDate:"2025-02-21T20:16:18Z", GoOs:"linux", GoArch:"amd64"}
PROJECT version
3
Plugin versions
- go.kubebuilder.io/v4
Other versions
No response
Extra Labels
No response
The text was updated successfully, but these errors were encountered: