Add special case handlers in get_version.go for components that require
non-standard version extraction methods:
- docsy: Extract git submodule commit hash
- kubernetes: Read DefaultKubernetesVersion from constants
- kubeadm-constants: Parse latest version from kubeadm images map
- kubernetes-versions-list: Count and summarize supported versions
- site-node: Use existing node version extraction from netlify.toml
Remove all entries from noVersionCheck map in update_all.go to enable
before/after version comparison for these components.
This allows 'DEP=component make get-dependency-version' commands to work
for all components, improving the auto-updater workflow.
* add update all go script
* add update all make target
* add update all make target
* standardize the component name for look up
* standardize amd amd component name
* rename all hack update go code to match component name to standardize
* delete extra folder
* update makefile with new standard filenames
* update component name amd
* fix amd gpu name
* skip amd for now till broken
* fix cilium helm update
* standard name for cloud spanner emulator
* standard crio name
* set max to 100
* delete old folder
* skip docsy for update all
* return error if fail to apply
* docsy versoin
* update files with go-github
* update file names
* move all make targets to same location
* standard name for golang comp
* skip istio addon
* skip kicbase version since it is not related
* skip kubeadm constant too
* skip kubernetes version too
* run components that dont support before/after
* update kubeadm constant
* skip kubeadm constant on non linux
* add kubernetes_versions_list to not support before/after
* list preload version as one of the internal jobs
* list preload version as one of the internal jobs
* simpllify the code
* use log for printing
* add boiler plates
* add gh workflow
Using go workspace breaks iso build, and may affect the builds in
unwanted ways, bringing dependencies from the hack module into the
minikube module.
Remove the go.work file and add a replace directive to the hack module,
so it can access minikube packages from the local directory.
Some programs working directory was the source directory. With this
change all programs and scripts in the hack module are run from the
hack directory. Paths updated to the programs can find files in the
minikube root directory.
Some updaters and benchmarks are broken in master and are still broken
with this change.
These updates fail to pull non-existing images:
- make update-istio-operator-version
- make update-amd-gpu-device-plugin-version
These try to install try to install in /usr/local/bin with sudo and
neede rewrite:
- make cpu-benchmark-idle
- make cpu-benchmark-autopause
- make time-to-k8s-benchmark
* fix QF1011: could omit type *os.File from declaration; it will be inferred from the right-hand side
* fix QF1012: Use fmt.Fprintf(x, ...) instead of x.Write(fmt.Sprintf(...))
* fix QF1001: could apply De Morgan's law
* fix QF1003: could use tagged switch
* fix weakCond: suspicious ; nil check may not be enough, check for len (gocritic)
* fix docStub: silencing go lint doc-comment warnings is unadvised
* fix builtinShadow: shadowing of predeclared identifier: error
* fix importShadow: shadow of imported package
* fix nestingReduce: invert if cond, replace body with , move old body after the statement
* useless-break: useless break in case clause (revive)
* Clear the redundant content in golangci.yaml file
* Prevent Unnecessary Version Bumps in `go.mod` During Go Version Updates
This PR addresses issue #20770, where the minikube automation (triggered by make `update-golang-version`) unnecessarily bumped minor or patch versions in `go.mod` when updating the Go version. Following Kubernetes' practice, which avoids such bumps in `go.mod`, this change ensures only the go directive is updated to the stable Go version.
**Changes:**
- Added `go.mod` to the schema map in `hack/update/golang_version/update_golang_version.go` with a regex (go 1\.\d+\.\d+) to update the go directive to {{.StableVersion}} (e.g., go 1.24.2).
- This ensures the automation updates only the go directive without modifying module dependencies, aligning with Kubernetes' `go.mod` behavior.
**Impact:**
- Running make `update-golang-version` now updates the go directive (e.g., from go 1.22.3 to go 1.24.2) without unintended dependency version bumps.
- Tested by setting go 1.22.3 in go.mod, running go mod tidy and make update-golang-version, and verifying only the go directive and toolchain changed.
fixes: #20773
* Pin `go.mod` to Major.Minor Go Version (e.g., `1.24.0`)
**Description**:
Fixes#20773 by updating the automation to pin the `go` directive in `go.mod` to the major.minor Go version (e.g., `1.24.0`) instead of the full version (e.g., `1.24.2`), aligning with Kubernetes’ `go.mod`. This prevents breaking users relying on minikube packages.
**Changes**:
- Modified `hack/update/golang_version/update_golang_version.go` to compute `MajorMinor` version (e.g., `1.24.0`) from `StableVersion`.
- Updated `schema` to set `go.mod`’s `go` directive to `{{.MajorMinor}}`.
- Tested by setting `go 1.23.4`, running `make update-golang-version`, and verifying `go 1.24.0` with no dependency bumps.
**Closes**: #20773
* Reverted all 66 files to upstream master except update_golang_version.go