tinkerbell / rufio

Kubernetes Controller for BMC Interactions
Apache License 2.0
36 stars 16 forks source link

Go > 1.18 is required to build Rufio #112

Closed jacobweinstock closed 1 year ago

jacobweinstock commented 1 year ago

The sigs.k8s.io/controller-runtime v0.14.6 dependency requires k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a which does not build with Go 1.18.

root@a34dfa4af2ea:/code# make build
/code/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...
go vet ./...
# k8s.io/kube-openapi/pkg/cached
/go/pkg/mod/k8s.io/kube-openapi@v0.0.0-20230308215209-15aac26d736a/pkg/cached/cache.go:242:16: undefined: atomic.Pointer
make: *** [Makefile:58: vet] Error 2
go mod graph |grep -E "controller-runtime.*kube-openapi"
sigs.k8s.io/controller-runtime@v0.14.6 k8s.io/kube-openapi@v0.0.0-20221012153701-172d655c2280

It does build with Go 1.19.

root@f29d7677c51e:/code# make build
go: creating new go.mod: module tmp
Downloading sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0
go: downloading sigs.k8s.io/controller-tools v0.8.0
go: downloading golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff
go: downloading github.com/spf13/cobra v1.2.1
go: downloading sigs.k8s.io/yaml v1.3.0
go: downloading github.com/gobuffalo/flect v0.2.3
go: downloading k8s.io/apiextensions-apiserver v0.23.0
go: downloading k8s.io/apimachinery v0.23.0
go: downloading github.com/fatih/color v1.12.0
go: downloading k8s.io/api v0.23.0
go: downloading gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/mattn/go-colorable v0.1.8
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b
go: downloading github.com/google/gofuzz v1.1.0
go: downloading k8s.io/klog/v2 v2.30.0
go: downloading sigs.k8s.io/structured-merge-diff/v4 v4.1.2
go: downloading sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6
go: downloading golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e
go: downloading gopkg.in/inf.v0 v0.9.1
go: downloading github.com/google/go-cmp v0.5.6
go: downloading github.com/go-logr/logr v1.2.0
go: downloading github.com/json-iterator/go v1.1.12
go: downloading golang.org/x/net v0.0.0-20210825183410-e898025ed96a
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: downloading golang.org/x/mod v0.4.2
go: downloading github.com/modern-go/reflect2 v1.0.2
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading golang.org/x/text v0.3.7
/code/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...
go vet ./...
go build -o bin/manager main.go

Expected Behaviour

Current Behaviour

Possible Solution

We should update go.mod to > 1.18

Steps to Reproduce (for bugs)

  1. docker run -it --rm -v ${PWD}:/code -w /code golang:1.18
  2. make build

Context

Your Environment