Description of problem:
When running the `make fmt` target in the repository the command can fail due to a mismatch of versions between the go language and the goimports dependency.
Version-Release number of selected component (if applicable):
4.16.z
How reproducible:
always
Steps to Reproduce:
1.checkout release-4.16 branch 2.run `make fmt`
Actual results:
INFO[2024-10-01T14:41:15Z] make fmt make[1]: Entering directory '/go/src/github.com/openshift/cluster-cloud-controller-manager-operator' hack/goimports.sh go: downloading golang.org/x/tools v0.25.0 go: golang.org/x/tools/cmd/goimports@latest: golang.org/x/tools@v0.25.0 requires go >= 1.22.0 (running go 1.21.11; GOTOOLCHAIN=local)
Expected results:
successful completion of `make fmt`
Additional info:
our goimports.sh script file reference `goimports@latest` which means that this problem will most likely affect older branches as well. we will need to set a specific version of the goimports package for those branches. given that the CCCMO includes golangci-lint, and uses it for a test, we should include goimports through golangci-lint which will solve this problem without needing special versions of goimports.
- blocks
-
OCPBUGS-43389 Cloud controller manager operator can fail when running goimports through fmt make target
- Closed
- is cloned by
-
OCPBUGS-43163 Cloud controller manager operator can fail when running goimports through fmt make target
- ASSIGNED
-
OCPBUGS-43389 Cloud controller manager operator can fail when running goimports through fmt make target
- Closed
- is depended on by
-
OCPBUGS-43163 Cloud controller manager operator can fail when running goimports through fmt make target
- ASSIGNED
- links to
-
RHEA-2024:6122 OpenShift Container Platform 4.18.z bug fix update