Skip to content

Katib image build failed because of Golang version #2016

@elenzio9

Description

@elenzio9

/kind bug

What steps did you take and what happened:
Trying to build the katib image, I'm getting the following error:

Step 27/32 : RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -o katib-ui  ./cmd/new-ui/v1beta1
 ---> Running in 1361a0fd83b9
# k8s.io/apimachinery/third_party/forked/golang/reflect
/go/pkg/mod/k8s.io/apimachinery@v0.25.3/third_party/forked/golang/reflect/deep_equal.go:376:7: undefined: reflect.Pointer
note: module requires Go 1.19
# k8s.io/apimachinery/pkg/util/validation/field
/go/pkg/mod/k8s.io/apimachinery@v0.25.3/pkg/util/validation/field/errors.go:69:33: undefined: reflect.Pointer
note: module requires Go 1.19
# k8s.io/apimachinery/pkg/conversion/queryparams
/go/pkg/mod/k8s.io/apimachinery@v0.25.3/pkg/conversion/queryparams/convert.go:58:17: undefined: reflect.Pointer
/go/pkg/mod/k8s.io/apimachinery@v0.25.3/pkg/conversion/queryparams/convert.go:142:7: undefined: reflect.Pointer
note: module requires Go 1.19
# sigs.k8s.io/json/internal/golang/encoding/json
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:96:31: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:177:35: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:428:37: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:937:48: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:1143:45: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:1160:42: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:1195:52: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:1261:42: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/encode.go:158:16: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/encode.go:175:22: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/encode.go:175:22: too many errors
note: module requires Go 1.18
# k8s.io/apimachinery/third_party/forked/golang/json
/go/pkg/mod/k8s.io/apimachinery@v0.25.3/third_party/forked/golang/json/fields.go:31:17: undefined: reflect.Pointer
/go/pkg/mod/k8s.io/apimachinery@v0.25.3/third_party/forked/golang/json/fields.go:186:40: undefined: reflect.Pointer
note: module requires Go 1.19
# k8s.io/client-go/third_party/forked/golang/template
/go/pkg/mod/k8s.io/client-go@v0.25.3/third_party/forked/golang/template/exec.go:20:20: undefined: reflect.Pointer
/go/pkg/mod/k8s.io/client-go@v0.25.3/third_party/forked/golang/template/exec.go:34:17: undefined: reflect.Pointer
/go/pkg/mod/k8s.io/client-go@v0.25.3/third_party/forked/golang/template/exec.go:42:22: undefined: reflect.PointerTo
note: module requires Go 1.19
The command '/bin/sh -c CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -o katib-ui  ./cmd/new-ui/v1beta1' returned a non-zero code: 2

I also tried docker build . -f cmd/new-ui/v1beta1/Dockerfile -t ${IMG}:${TAG} --no-cache in case of having an older golang image cached but the error persists.

Impacted by this bug? Give it a 👍 We prioritize the issues with the most 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions