Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description Set go version to 1.21.7 because controller-gen throws nil error with go 1.22 ``` => Generating CRDs for ucp.dev... controller-gen object paths=./pkg/ucp/store/apiserverstore/api/ucp.dev/v1alpha1/... object:headerFile=./boilerplate.go.txt panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa0117e] goroutine 81 [running]: go/types.(*Checker).handleBailout(0xc0002e6600, 0xc000459d40) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/check.go:367 +0x88 panic({0xbb2600?, 0x128ed00?}) /opt/hostedtoolcache/go/1.22.0/x64/src/runtime/panic.go:770 +0x132 go/types.(*StdSizes).Sizeof(0x0, {0xda56d8, 0x1297540}) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/sizes.go:228 +0x31e go/types.(*Config).sizeof(...) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/sizes.go:333 go/types.representableConst.func1({0xda56d8?, 0x1297540?}) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/const.go:76 +0x9e go/types.representableConst({0xdab9f8, 0x12635a0}, 0xc0002e6600, 0x1297540, 0x0) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/const.go:92 +0x192 go/types.(*Checker).arrayLength(0xc0002e6600, {0xda9d08, 0xc00093cbc0?}) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/typexpr.go:510 +0x2d3 go/types.(*Checker).typInternal(0xc0002e6600, {0xda8358, 0xc000936f60}, 0x0) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/typexpr.go:299 +0x49d go/types.(*Checker).definedType(0xc0002e6600, {0xda8358, 0xc000936f60}, 0xc000459328?) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/typexpr.go:180 +0x37 go/types.(*Checker).varType(0xc0002e6600, {0xda8358, 0xc000936f60}) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/typexpr.go:145 +0x25 go/types.(*Checker).structType(0xc0002e6600, 0xc00095e660, 0xc00095e660?) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/struct.go:113 +0x19f go/types.(*Checker).typInternal(0xc0002e6600, {0xda82c8, 0xc000935728}, 0xc00095b590) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/typexpr.go:316 +0x1345 go/types.(*Checker).definedType(0xc0002e6600, {0xda82c8, 0xc000935728}, 0xc7a5e2?) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/typexpr.go:180 +0x37 go/types.(*Checker).typeDecl(0xc0002e6600, 0xc00095b590, 0xc0009389c0, 0x0) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/decl.go:615 +0x44d go/types.(*Checker).objDecl(0xc0002e6600, {0xdb0e58, 0xc00095b590}, 0x0) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/decl.go:197 +0xa7f go/types.(*Checker).packageObjects(0xc0002e6600) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/resolver.go:681 +0x425 go/types.(*Checker).checkFiles(0xc0002e6600, {0xc000580ed0, 0x3, 0x3}) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/check.go:408 +0x1a5 go/types.(*Checker).Files(...) /opt/hostedtoolcache/go/1.22.0/x64/src/go/types/check.go:372 sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc0003eb080, 0xc0004[2008](https://github.com/radius-project/radius/actions/runs/7924253811/job/21635483458?pr=7179#step:13:2009)0) /home/runner/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.1/pkg/loader/loader.go:286 +0x36a sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc000420080) /home/runner/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.1/pkg/loader/loader.go:99 +0x39 sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc0003b60c0, 0xc000420080) /home/runner/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.1/pkg/loader/refs.go:268 +0x2b7 sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x51?) /home/runner/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.1/pkg/loader/refs.go:262 +0x53 created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 9 /home/runner/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.1/pkg/loader/refs.go:260 +0x1c5 make: *** [build/generate.mk:65: generate-ucp-crd] Error 2 Error: Process completed with exit code 2. ``` ## Type of change - This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional). <!-- Please update the following to link the associated issue. This is required for some kinds of changes (see above). --> Fixes: #issue_number Signed-off-by: Young Bu Park <youngp@microsoft.com>